diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-02-15 03:41:21 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-02-15 03:41:21 -0500 |
commit | 8cdc196b743c4224ffa59fef38133559c1fd2a5e (patch) | |
tree | f5de9fd936d42150ffdbfdacdbce41c6697acb8b /net/mac80211/mlme.c | |
parent | 03395003bf8ac813b1a0ac9299b3496484caf228 (diff) | |
parent | 3d9646d0abd02c552f6f15c302b31aa321c2fa8b (diff) |
Merge remote-tracking branch 'mac80211/master' into HEAD
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 99be3b61a225..ac1374a8c30a 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -3488,6 +3488,7 @@ ieee80211_determine_chantype(struct ieee80211_sub_if_data *sdata, | |||
3488 | 3488 | ||
3489 | ret = 0; | 3489 | ret = 0; |
3490 | 3490 | ||
3491 | out: | ||
3491 | while (!cfg80211_chandef_usable(sdata->local->hw.wiphy, chandef, | 3492 | while (!cfg80211_chandef_usable(sdata->local->hw.wiphy, chandef, |
3492 | IEEE80211_CHAN_DISABLED)) { | 3493 | IEEE80211_CHAN_DISABLED)) { |
3493 | if (WARN_ON(chandef->width == NL80211_CHAN_WIDTH_20_NOHT)) { | 3494 | if (WARN_ON(chandef->width == NL80211_CHAN_WIDTH_20_NOHT)) { |
@@ -3496,14 +3497,13 @@ ieee80211_determine_chantype(struct ieee80211_sub_if_data *sdata, | |||
3496 | goto out; | 3497 | goto out; |
3497 | } | 3498 | } |
3498 | 3499 | ||
3499 | ret = chandef_downgrade(chandef); | 3500 | ret |= chandef_downgrade(chandef); |
3500 | } | 3501 | } |
3501 | 3502 | ||
3502 | if (chandef->width != vht_chandef.width) | 3503 | if (chandef->width != vht_chandef.width) |
3503 | sdata_info(sdata, | 3504 | sdata_info(sdata, |
3504 | "local regulatory prevented using AP HT/VHT configuration, downgraded\n"); | 3505 | "capabilities/regulatory prevented using AP HT/VHT configuration, downgraded\n"); |
3505 | 3506 | ||
3506 | out: | ||
3507 | WARN_ON_ONCE(!cfg80211_chandef_valid(chandef)); | 3507 | WARN_ON_ONCE(!cfg80211_chandef_valid(chandef)); |
3508 | return ret; | 3508 | return ret; |
3509 | } | 3509 | } |
@@ -3617,8 +3617,11 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata, | |||
3617 | */ | 3617 | */ |
3618 | ret = ieee80211_vif_use_channel(sdata, &chandef, | 3618 | ret = ieee80211_vif_use_channel(sdata, &chandef, |
3619 | IEEE80211_CHANCTX_SHARED); | 3619 | IEEE80211_CHANCTX_SHARED); |
3620 | while (ret && chandef.width != NL80211_CHAN_WIDTH_20_NOHT) | 3620 | while (ret && chandef.width != NL80211_CHAN_WIDTH_20_NOHT) { |
3621 | ifmgd->flags |= chandef_downgrade(&chandef); | 3621 | ifmgd->flags |= chandef_downgrade(&chandef); |
3622 | ret = ieee80211_vif_use_channel(sdata, &chandef, | ||
3623 | IEEE80211_CHANCTX_SHARED); | ||
3624 | } | ||
3622 | return ret; | 3625 | return ret; |
3623 | } | 3626 | } |
3624 | 3627 | ||