diff options
-rw-r--r-- | net/mac80211/ibss.c | 2 | ||||
-rw-r--r-- | net/mac80211/mesh.c | 4 | ||||
-rw-r--r-- | net/mac80211/mesh_plink.c | 8 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 12 | ||||
-rw-r--r-- | net/mac80211/rate.c | 8 |
5 files changed, 31 insertions, 3 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index caa4b4f7f6e4..3789c85282a0 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -176,6 +176,8 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, | |||
176 | 176 | ||
177 | /* add HT capability and information IEs */ | 177 | /* add HT capability and information IEs */ |
178 | if (chandef.width != NL80211_CHAN_WIDTH_20_NOHT && | 178 | if (chandef.width != NL80211_CHAN_WIDTH_20_NOHT && |
179 | chandef.width != NL80211_CHAN_WIDTH_5 && | ||
180 | chandef.width != NL80211_CHAN_WIDTH_10 && | ||
179 | sband->ht_cap.ht_supported) { | 181 | sband->ht_cap.ht_supported) { |
180 | pos = ieee80211_ie_build_ht_cap(pos, &sband->ht_cap, | 182 | pos = ieee80211_ie_build_ht_cap(pos, &sband->ht_cap, |
181 | sband->ht_cap.cap); | 183 | sband->ht_cap.cap); |
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index d5dea94216e4..447f41bbe744 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c | |||
@@ -416,7 +416,9 @@ int mesh_add_ht_cap_ie(struct ieee80211_sub_if_data *sdata, | |||
416 | 416 | ||
417 | sband = local->hw.wiphy->bands[band]; | 417 | sband = local->hw.wiphy->bands[band]; |
418 | if (!sband->ht_cap.ht_supported || | 418 | if (!sband->ht_cap.ht_supported || |
419 | sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_20_NOHT) | 419 | sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_20_NOHT || |
420 | sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_5 || | ||
421 | sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_10) | ||
420 | return 0; | 422 | return 0; |
421 | 423 | ||
422 | if (skb_tailroom(skb) < 2 + sizeof(struct ieee80211_ht_cap)) | 424 | if (skb_tailroom(skb) < 2 + sizeof(struct ieee80211_ht_cap)) |
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index 09bebed99416..02c05fa15c20 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c | |||
@@ -154,8 +154,14 @@ static u32 mesh_set_ht_prot_mode(struct ieee80211_sub_if_data *sdata) | |||
154 | u16 ht_opmode; | 154 | u16 ht_opmode; |
155 | bool non_ht_sta = false, ht20_sta = false; | 155 | bool non_ht_sta = false, ht20_sta = false; |
156 | 156 | ||
157 | if (sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_20_NOHT) | 157 | switch (sdata->vif.bss_conf.chandef.width) { |
158 | case NL80211_CHAN_WIDTH_20_NOHT: | ||
159 | case NL80211_CHAN_WIDTH_5: | ||
160 | case NL80211_CHAN_WIDTH_10: | ||
158 | return 0; | 161 | return 0; |
162 | default: | ||
163 | break; | ||
164 | } | ||
159 | 165 | ||
160 | rcu_read_lock(); | 166 | rcu_read_lock(); |
161 | list_for_each_entry_rcu(sta, &local->sta_list, list) { | 167 | list_for_each_entry_rcu(sta, &local->sta_list, list) { |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 87f2d4df31f8..e0939eb79060 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -190,6 +190,12 @@ static u32 chandef_downgrade(struct cfg80211_chan_def *c) | |||
190 | c->width = NL80211_CHAN_WIDTH_20_NOHT; | 190 | c->width = NL80211_CHAN_WIDTH_20_NOHT; |
191 | ret = IEEE80211_STA_DISABLE_HT | IEEE80211_STA_DISABLE_VHT; | 191 | ret = IEEE80211_STA_DISABLE_HT | IEEE80211_STA_DISABLE_VHT; |
192 | break; | 192 | break; |
193 | case NL80211_CHAN_WIDTH_5: | ||
194 | case NL80211_CHAN_WIDTH_10: | ||
195 | WARN_ON_ONCE(1); | ||
196 | /* keep c->width */ | ||
197 | ret = IEEE80211_STA_DISABLE_HT | IEEE80211_STA_DISABLE_VHT; | ||
198 | break; | ||
193 | } | 199 | } |
194 | 200 | ||
195 | WARN_ON_ONCE(!cfg80211_chandef_valid(c)); | 201 | WARN_ON_ONCE(!cfg80211_chandef_valid(c)); |
@@ -3771,6 +3777,12 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata, | |||
3771 | */ | 3777 | */ |
3772 | ret = ieee80211_vif_use_channel(sdata, &chandef, | 3778 | ret = ieee80211_vif_use_channel(sdata, &chandef, |
3773 | IEEE80211_CHANCTX_SHARED); | 3779 | IEEE80211_CHANCTX_SHARED); |
3780 | |||
3781 | /* don't downgrade for 5 and 10 MHz channels, though. */ | ||
3782 | if (chandef.width == NL80211_CHAN_WIDTH_5 || | ||
3783 | chandef.width == NL80211_CHAN_WIDTH_10) | ||
3784 | return ret; | ||
3785 | |||
3774 | while (ret && chandef.width != NL80211_CHAN_WIDTH_20_NOHT) { | 3786 | while (ret && chandef.width != NL80211_CHAN_WIDTH_20_NOHT) { |
3775 | ifmgd->flags |= chandef_downgrade(&chandef); | 3787 | ifmgd->flags |= chandef_downgrade(&chandef); |
3776 | ret = ieee80211_vif_use_channel(sdata, &chandef, | 3788 | ret = ieee80211_vif_use_channel(sdata, &chandef, |
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c index d3f414fe67e0..dbbcd57b0fc6 100644 --- a/net/mac80211/rate.c +++ b/net/mac80211/rate.c | |||
@@ -397,8 +397,14 @@ static void rate_idx_match_mask(struct ieee80211_tx_rate *rate, | |||
397 | return; | 397 | return; |
398 | 398 | ||
399 | /* if HT BSS, and we handle a data frame, also try HT rates */ | 399 | /* if HT BSS, and we handle a data frame, also try HT rates */ |
400 | if (chan_width == NL80211_CHAN_WIDTH_20_NOHT) | 400 | switch (chan_width) { |
401 | case NL80211_CHAN_WIDTH_20_NOHT: | ||
402 | case NL80211_CHAN_WIDTH_5: | ||
403 | case NL80211_CHAN_WIDTH_10: | ||
401 | return; | 404 | return; |
405 | default: | ||
406 | break; | ||
407 | } | ||
402 | 408 | ||
403 | alt_rate.idx = 0; | 409 | alt_rate.idx = 0; |
404 | /* keep protection flags */ | 410 | /* keep protection flags */ |