diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-07-25 07:51:49 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-08-20 08:13:38 -0400 |
commit | 466f310d100ff54f346c1be481af9935c42467b3 (patch) | |
tree | 419fe4d27f6b24f8c9979f0c2717b8339fc656bb /net/mac80211/mesh.c | |
parent | d348f69f59af769c405c2f43a2d326d7123ef75a (diff) |
mac80211: mesh: don't use global channel type
Using local->_oper_channel_type in the mesh code is
completely wrong as this value is the combination
of the various interface channel types and can be
a different value from the mesh interface in case
there are multiple virtual interfaces.
Use sdata->vif.bss_conf.channel_type instead as it
tracks the per-vif channel type.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mesh.c')
-rw-r--r-- | net/mac80211/mesh.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 035cd0c8ce33..f2d0d213bcfb 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c | |||
@@ -109,11 +109,11 @@ bool mesh_matches_local(struct ieee80211_sub_if_data *sdata, | |||
109 | 109 | ||
110 | /* Disallow HT40+/- mismatch */ | 110 | /* Disallow HT40+/- mismatch */ |
111 | if (ie->ht_operation && | 111 | if (ie->ht_operation && |
112 | (local->_oper_channel_type == NL80211_CHAN_HT40MINUS || | 112 | (sdata->vif.bss_conf.channel_type == NL80211_CHAN_HT40MINUS || |
113 | local->_oper_channel_type == NL80211_CHAN_HT40PLUS) && | 113 | sdata->vif.bss_conf.channel_type == NL80211_CHAN_HT40PLUS) && |
114 | (sta_channel_type == NL80211_CHAN_HT40MINUS || | 114 | (sta_channel_type == NL80211_CHAN_HT40MINUS || |
115 | sta_channel_type == NL80211_CHAN_HT40PLUS) && | 115 | sta_channel_type == NL80211_CHAN_HT40PLUS) && |
116 | local->_oper_channel_type != sta_channel_type) | 116 | sdata->vif.bss_conf.channel_type != sta_channel_type) |
117 | goto mismatch; | 117 | goto mismatch; |
118 | 118 | ||
119 | return true; | 119 | return true; |
@@ -375,7 +375,7 @@ int mesh_add_ht_cap_ie(struct sk_buff *skb, | |||
375 | 375 | ||
376 | sband = local->hw.wiphy->bands[local->oper_channel->band]; | 376 | sband = local->hw.wiphy->bands[local->oper_channel->band]; |
377 | if (!sband->ht_cap.ht_supported || | 377 | if (!sband->ht_cap.ht_supported || |
378 | local->_oper_channel_type == NL80211_CHAN_NO_HT) | 378 | sdata->vif.bss_conf.channel_type == NL80211_CHAN_NO_HT) |
379 | return 0; | 379 | return 0; |
380 | 380 | ||
381 | if (skb_tailroom(skb) < 2 + sizeof(struct ieee80211_ht_cap)) | 381 | if (skb_tailroom(skb) < 2 + sizeof(struct ieee80211_ht_cap)) |
@@ -392,7 +392,8 @@ int mesh_add_ht_oper_ie(struct sk_buff *skb, | |||
392 | { | 392 | { |
393 | struct ieee80211_local *local = sdata->local; | 393 | struct ieee80211_local *local = sdata->local; |
394 | struct ieee80211_channel *channel = local->oper_channel; | 394 | struct ieee80211_channel *channel = local->oper_channel; |
395 | enum nl80211_channel_type channel_type = local->_oper_channel_type; | 395 | enum nl80211_channel_type channel_type = |
396 | sdata->vif.bss_conf.channel_type; | ||
396 | struct ieee80211_supported_band *sband = | 397 | struct ieee80211_supported_band *sband = |
397 | local->hw.wiphy->bands[channel->band]; | 398 | local->hw.wiphy->bands[channel->band]; |
398 | struct ieee80211_sta_ht_cap *ht_cap = &sband->ht_cap; | 399 | struct ieee80211_sta_ht_cap *ht_cap = &sband->ht_cap; |