summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorThomas Pedersen <thomas@cozybit.com>2012-04-18 19:24:13 -0700
committerAndy Green <andy.green@linaro.org>2012-06-22 10:14:57 +0800
commit5abeef85391d22c96d77b9e753e0b43a7bd92244 (patch)
tree45dd826300d35ae90cd522d451d08542b1e9863e /net
parentc9fd34f801581cc161479b312045572e9e2e7193 (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')
-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,
spin_lock_bh(&sta->lock);
sta->last_rx = jiffies;
sta->sta.supp_rates[band] = rates;
- if (elems->ht_cap_elem)
+ if (elems->ht_cap_elem &&
+ sdata->local->_oper_channel_type != NL80211_CHAN_NO_HT)
ieee80211_ht_cap_ie_to_sta_ht_cap(sdata, sband,
elems->ht_cap_elem,
&sta->sta.ht_cap);