aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mesh_plink.c
diff options
context:
space:
mode:
authorThomas Pedersen <thomas@cozybit.com>2012-04-18 22:24:13 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-04-23 15:34:07 -0400
commite76781e48f969e044d318485274b9574f1ccc3dd (patch)
tree4d1e496a3a466aa73a620ec54bbb309d5ffe0e6f /net/mac80211/mesh_plink.c
parentf743ff4907fa5bc2b460f48ace831a560806a9fb (diff)
mac80211: don't set mesh peer ht caps if ht disabled
Blindly setting ht caps on a mesh peer's station entry would result in MCS rates being used by the rate control algorithm even if no ht had been configured. Fix this by checking the channel type before assigning ht capabilites. Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mesh_plink.c')
-rw-r--r--net/mac80211/mesh_plink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index c2af7b3d03cd..1ff2a5c63e43 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -295,7 +295,8 @@ static struct sta_info *mesh_peer_init(struct ieee80211_sub_if_data *sdata,
295 spin_lock_bh(&sta->lock); 295 spin_lock_bh(&sta->lock);
296 sta->last_rx = jiffies; 296 sta->last_rx = jiffies;
297 sta->sta.supp_rates[band] = rates; 297 sta->sta.supp_rates[band] = rates;
298 if (elems->ht_cap_elem) 298 if (elems->ht_cap_elem &&
299 sdata->local->_oper_channel_type != NL80211_CHAN_NO_HT)
299 ieee80211_ht_cap_ie_to_sta_ht_cap(sdata, sband, 300 ieee80211_ht_cap_ie_to_sta_ht_cap(sdata, sband,
300 elems->ht_cap_elem, 301 elems->ht_cap_elem,
301 &sta->sta.ht_cap); 302 &sta->sta.ht_cap);