Skip to contentSkip to conversation

rt2x00: Only specify interface combinations if more then one interface is possible

PATCH Helmut Schaa 1 participant 1 message Dec 6, 2012 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Forgot to CC linux-wireless.

Quoted 33 lines · Helmut Schaa

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.

---
 drivers/net/wireless/rt2x00/rt2x00dev.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/wireless/rt2x00/rt2x00dev.c +3 -1
index 69097d1..dafb448 100644
@@ -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.
         */
--

1.8.0