aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mesh_plink.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/mesh_plink.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/mesh_plink.c')
-rw-r--r--net/mac80211/mesh_plink.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index 3ab34d816897..8a8b459610b6 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -252,6 +252,8 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata,
252 mgmt->u.action.u.self_prot.action_code = action; 252 mgmt->u.action.u.self_prot.action_code = action;
253 253
254 if (action != WLAN_SP_MESH_PEERING_CLOSE) { 254 if (action != WLAN_SP_MESH_PEERING_CLOSE) {
255 enum ieee80211_band band = ieee80211_get_sdata_band(sdata);
256
255 /* capability info */ 257 /* capability info */
256 pos = skb_put(skb, 2); 258 pos = skb_put(skb, 2);
257 memset(pos, 0, 2); 259 memset(pos, 0, 2);
@@ -260,10 +262,8 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata,
260 pos = skb_put(skb, 2); 262 pos = skb_put(skb, 2);
261 memcpy(pos + 2, &plid, 2); 263 memcpy(pos + 2, &plid, 2);
262 } 264 }
263 if (ieee80211_add_srates_ie(sdata, skb, true, 265 if (ieee80211_add_srates_ie(sdata, skb, true, band) ||
264 local->oper_channel->band) || 266 ieee80211_add_ext_srates_ie(sdata, skb, true, band) ||
265 ieee80211_add_ext_srates_ie(sdata, skb, true,
266 local->oper_channel->band) ||
267 mesh_add_rsn_ie(skb, sdata) || 267 mesh_add_rsn_ie(skb, sdata) ||
268 mesh_add_meshid_ie(skb, sdata) || 268 mesh_add_meshid_ie(skb, sdata) ||
269 mesh_add_meshconf_ie(skb, sdata)) 269 mesh_add_meshconf_ie(skb, sdata))
@@ -343,7 +343,7 @@ static struct sta_info *mesh_peer_init(struct ieee80211_sub_if_data *sdata,
343 struct ieee802_11_elems *elems) 343 struct ieee802_11_elems *elems)
344{ 344{
345 struct ieee80211_local *local = sdata->local; 345 struct ieee80211_local *local = sdata->local;
346 enum ieee80211_band band = local->oper_channel->band; 346 enum ieee80211_band band = ieee80211_get_sdata_band(sdata);
347 struct ieee80211_supported_band *sband; 347 struct ieee80211_supported_band *sband;
348 u32 rates, basic_rates = 0; 348 u32 rates, basic_rates = 0;
349 struct sta_info *sta; 349 struct sta_info *sta;