aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/sta_info.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-07-26 11:24:39 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-10-17 05:02:09 -0400
commit55de908ab292c03f1eb280f51170ddb9c6b57e31 (patch)
treebc75bb5cea581cadf6fe8b4f121cce02d07c276a /net/mac80211/sta_info.c
parentfe57d9f5c0a2c1ef97ba8cdc42cfda5743f287b8 (diff)
mac80211: use channel contexts
Instead of operating on a single channel only, use the new channel context infrastructure in all mac80211 code. This enables drivers that want to use the new channel context infrastructure to use multiple channels, while nothing should change for all the other drivers that don't support it. Right now this disables both TX power settings and spatial multiplexing powersave. Both need to be re-enabled on a channel context basis. Additionally, when channel contexts are used drop the connection when channel switch is received rather than trying to handle it. This will have to be improved later. [With fixes from Eliad and Emmanuel incorporated] Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/sta_info.c')
-rw-r--r--net/mac80211/sta_info.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 797dd36a220d..fa639f41aa5b 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -1008,6 +1008,7 @@ static void ieee80211_send_null_response(struct ieee80211_sub_if_data *sdata,
1008 __le16 fc; 1008 __le16 fc;
1009 bool qos = test_sta_flag(sta, WLAN_STA_WME); 1009 bool qos = test_sta_flag(sta, WLAN_STA_WME);
1010 struct ieee80211_tx_info *info; 1010 struct ieee80211_tx_info *info;
1011 struct ieee80211_chanctx_conf *chanctx_conf;
1011 1012
1012 if (qos) { 1013 if (qos) {
1013 fc = cpu_to_le16(IEEE80211_FTYPE_DATA | 1014 fc = cpu_to_le16(IEEE80211_FTYPE_DATA |
@@ -1057,7 +1058,16 @@ static void ieee80211_send_null_response(struct ieee80211_sub_if_data *sdata,
1057 1058
1058 drv_allow_buffered_frames(local, sta, BIT(tid), 1, reason, false); 1059 drv_allow_buffered_frames(local, sta, BIT(tid), 1, reason, false);
1059 1060
1060 ieee80211_xmit(sdata, skb); 1061 rcu_read_lock();
1062 chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
1063 if (WARN_ON(!chanctx_conf)) {
1064 rcu_read_unlock();
1065 kfree_skb(skb);
1066 return;
1067 }
1068
1069 ieee80211_xmit(sdata, skb, chanctx_conf->channel->band);
1070 rcu_read_unlock();
1061} 1071}
1062 1072
1063static void 1073static void