]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
rt2x00: Only specify interface combinations if more then one interface is possible
authorHelmut Schaa <helmut.schaa@googlemail.com>
Mon, 3 Dec 2012 21:35:39 +0000 (22:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jan 2013 16:45:44 +0000 (08:45 -0800)
commit f5685ba675449b072feab6a5391a9ef9f604bc94 upstream.

Otherwise rt2500* triggers a warning in cfg80211, from net/wireless/core.c:

/* Combinations with just one interface aren't real */
if (WARN_ON(c->max_interfaces < 2))

This was introduced in commit 55d2e9da744ba11eae900b4bfc2da72eace3c1e1:
rt2x00: Replace open coded interface checking with interface combinations.

Reported-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/rt2x00/rt2x00dev.c

index 69097d1faeb676d97ddd27c7ba7dc3f575cd2f6f..dafb4481c8358600d2ab3eff88bc6fb66739f176 100644 (file)
@@ -1123,6 +1123,9 @@ static inline void rt2x00lib_set_if_combinations(struct rt2x00_dev *rt2x00dev)
        struct ieee80211_iface_limit *if_limit;
        struct ieee80211_iface_combination *if_combination;
 
+       if (rt2x00dev->ops->max_ap_intf < 2)
+               return;
+
        /*
         * Build up AP interface limits structure.
         */