diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-02-07 14:54:51 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-02-07 14:56:01 -0500 |
commit | d601cd8d950c85032cefdcda162b8cd2cda363bb (patch) | |
tree | 82b15f2a30749369f7f08c5ec87261567ea30b35 /net/mac80211/mlme.c | |
parent | 9887dbf5b2163bcf69cd4456c21352e9a81c6003 (diff) |
mac80211: fix managed mode channel context use
My commit f2d9d270c15ae0139b54a7e7466d738327e97e03
("mac80211: support VHT association") introduced a
very stupid bug: the loop to downgrade the channel
width never attempted to actually use it again so
it would downgrade all the way to 20_NOHT. Fix it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index a3552929a21d..3b9cb510aa36 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -3529,8 +3529,11 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata, | |||
3529 | */ | 3529 | */ |
3530 | ret = ieee80211_vif_use_channel(sdata, &chandef, | 3530 | ret = ieee80211_vif_use_channel(sdata, &chandef, |
3531 | IEEE80211_CHANCTX_SHARED); | 3531 | IEEE80211_CHANCTX_SHARED); |
3532 | while (ret && chandef.width != NL80211_CHAN_WIDTH_20_NOHT) | 3532 | while (ret && chandef.width != NL80211_CHAN_WIDTH_20_NOHT) { |
3533 | ifmgd->flags |= chandef_downgrade(&chandef); | 3533 | ifmgd->flags |= chandef_downgrade(&chandef); |
3534 | ret = ieee80211_vif_use_channel(sdata, &chandef, | ||
3535 | IEEE80211_CHANCTX_SHARED); | ||
3536 | } | ||
3534 | return ret; | 3537 | return ret; |
3535 | } | 3538 | } |
3536 | 3539 | ||