Skip to content

Commit

Permalink
mac80211: don't set mesh peer ht caps if ht disabled
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Pedersen authored and John W. Linville committed Apr 23, 2012
1 parent f743ff4 commit e76781e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/mac80211/mesh_plink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e76781e

Please sign in to comment.