aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-02-08 06:07:44 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-02-11 12:44:57 -0500
commit1f4ac5a63f897a480fffd0d5c843b03f02c384a5 (patch)
treed7ae579e6dff49cfc5c8eca2812fa04faa7246fc /net/mac80211/cfg.c
parent757af6fefd53628bcfe75f7fbd302c5d4c02eba5 (diff)
mac80211: explicitly copy channels to VLANs where needed
Currently the code assigns channel contexts to VLANs (for use by the TX/RX code) when the AP master gets its channel context assigned. This works fine, but in the upcoming radar detection work the VLANs don't require a channel context (during radar detection) and assigning one to them anyway causes issues with locking and also inconsistencies -- a VLAN interface that is added before radar detection would get the channel context, while one added during it wouldn't. Fix these issues moving the channel context copying to a new explicit operation that will not be used in the radar detection code. Acked-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index f4f7e7691077..8f6b593a921f 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -933,6 +933,7 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev,
933 IEEE80211_CHANCTX_SHARED); 933 IEEE80211_CHANCTX_SHARED);
934 if (err) 934 if (err)
935 return err; 935 return err;
936 ieee80211_vif_copy_chanctx_to_vlans(sdata, false);
936 937
937 /* 938 /*
938 * Apply control port protocol, this allows us to 939 * Apply control port protocol, this allows us to
@@ -1047,6 +1048,7 @@ static int ieee80211_stop_ap(struct wiphy *wiphy, struct net_device *dev)
1047 local->total_ps_buffered -= skb_queue_len(&sdata->u.ap.ps.bc_buf); 1048 local->total_ps_buffered -= skb_queue_len(&sdata->u.ap.ps.bc_buf);
1048 skb_queue_purge(&sdata->u.ap.ps.bc_buf); 1049 skb_queue_purge(&sdata->u.ap.ps.bc_buf);
1049 1050
1051 ieee80211_vif_copy_chanctx_to_vlans(sdata, true);
1050 ieee80211_vif_release_channel(sdata); 1052 ieee80211_vif_release_channel(sdata);
1051 1053
1052 return 0; 1054 return 0;