Skip to content

Commit

Permalink
mac80211: count interfaces correctly for combination checks
Browse files Browse the repository at this point in the history
Since moving the interface combination checks to mac80211, it's
broken because it now only considers interfaces with an assigned
channel context, so for example any interface that isn't active
can still be up, which is clearly an issue; also, in particular
P2P-Device wdevs are an issue since they never have a chanctx.

Fix this by counting running interfaces instead the ones with a
channel context assigned.

Cc: [email protected] [3.16+]
Fixes: 73de86a ("cfg80211/mac80211: move interface counting for combination check to mac80211")
Signed-off-by: Andrei Otcheretianski <[email protected]>
Signed-off-by: Emmanuel Grumbach <[email protected]>
[rewrite commit message, dig out the commit it fixes]
Signed-off-by: Johannes Berg <[email protected]>
  • Loading branch information
aotchere authored and jmberg-intel committed Mar 16, 2015
1 parent aa75ebc commit 0f611d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mac80211/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -3178,7 +3178,7 @@ int ieee80211_check_combinations(struct ieee80211_sub_if_data *sdata,
wdev_iter = &sdata_iter->wdev;

if (sdata_iter == sdata ||
rcu_access_pointer(sdata_iter->vif.chanctx_conf) == NULL ||
!ieee80211_sdata_running(sdata_iter) ||
local->hw.wiphy->software_iftypes & BIT(wdev_iter->iftype))
continue;

Expand Down

0 comments on commit 0f611d2

Please sign in to comment.