Commit 89b5f74a268d6a7037c8ea9d9b7d4ce35097c6fd
Exists in
smarc-imx_3.14.28_1.0.0_ga
and in
1 other branch
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
Showing 6 changed files Side-by-side Diff
drivers/net/wireless/ath/ath9k/init.c
... | ... | @@ -802,7 +802,8 @@ |
802 | 802 | IEEE80211_HW_PS_NULLFUNC_STACK | |
803 | 803 | IEEE80211_HW_SPECTRUM_MGMT | |
804 | 804 | IEEE80211_HW_REPORTS_TX_ACK_STATUS | |
805 | - IEEE80211_HW_SUPPORTS_RC_TABLE; | |
805 | + IEEE80211_HW_SUPPORTS_RC_TABLE | | |
806 | + IEEE80211_HW_SUPPORTS_HT_CCK_RATES; | |
806 | 807 | |
807 | 808 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) { |
808 | 809 | hw->flags |= IEEE80211_HW_AMPDU_AGGREGATION; |
drivers/net/wireless/ath/carl9170/main.c
... | ... | @@ -1860,7 +1860,8 @@ |
1860 | 1860 | IEEE80211_HW_PS_NULLFUNC_STACK | |
1861 | 1861 | IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC | |
1862 | 1862 | IEEE80211_HW_SUPPORTS_RC_TABLE | |
1863 | - IEEE80211_HW_SIGNAL_DBM; | |
1863 | + IEEE80211_HW_SIGNAL_DBM | | |
1864 | + IEEE80211_HW_SUPPORTS_HT_CCK_RATES; | |
1864 | 1865 | |
1865 | 1866 | if (!modparam_noht) { |
1866 | 1867 | /* |
drivers/net/wireless/rt2x00/rt2800lib.c
... | ... | @@ -6133,7 +6133,8 @@ |
6133 | 6133 | IEEE80211_HW_SUPPORTS_PS | |
6134 | 6134 | IEEE80211_HW_PS_NULLFUNC_STACK | |
6135 | 6135 | IEEE80211_HW_AMPDU_AGGREGATION | |
6136 | - IEEE80211_HW_REPORTS_TX_ACK_STATUS; | |
6136 | + IEEE80211_HW_REPORTS_TX_ACK_STATUS | | |
6137 | + IEEE80211_HW_SUPPORTS_HT_CCK_RATES; | |
6137 | 6138 | |
6138 | 6139 | /* |
6139 | 6140 | * Don't set IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING for USB devices |
include/net/mac80211.h
net/mac80211/ibss.c
... | ... | @@ -36,7 +36,7 @@ |
36 | 36 | |
37 | 37 | static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, |
38 | 38 | const u8 *bssid, const int beacon_int, |
39 | - struct ieee80211_channel *chan, | |
39 | + struct cfg80211_chan_def *req_chandef, | |
40 | 40 | const u32 basic_rates, |
41 | 41 | const u16 capability, u64 tsf, |
42 | 42 | bool creator) |
... | ... | @@ -51,6 +51,7 @@ |
51 | 51 | u32 bss_change; |
52 | 52 | u8 supp_rates[IEEE80211_MAX_SUPP_RATES]; |
53 | 53 | struct cfg80211_chan_def chandef; |
54 | + struct ieee80211_channel *chan; | |
54 | 55 | struct beacon_data *presp; |
55 | 56 | int frame_len; |
56 | 57 | |
... | ... | @@ -81,7 +82,9 @@ |
81 | 82 | |
82 | 83 | sdata->drop_unencrypted = capability & WLAN_CAPABILITY_PRIVACY ? 1 : 0; |
83 | 84 | |
84 | - chandef = ifibss->chandef; | |
85 | + /* make a copy of the chandef, it could be modified below. */ | |
86 | + chandef = *req_chandef; | |
87 | + chan = chandef.chan; | |
85 | 88 | if (!cfg80211_reg_can_beacon(local->hw.wiphy, &chandef)) { |
86 | 89 | chandef.width = NL80211_CHAN_WIDTH_20; |
87 | 90 | chandef.center_freq1 = chan->center_freq; |
88 | 91 | |
... | ... | @@ -259,10 +262,12 @@ |
259 | 262 | struct cfg80211_bss *cbss = |
260 | 263 | container_of((void *)bss, struct cfg80211_bss, priv); |
261 | 264 | struct ieee80211_supported_band *sband; |
265 | + struct cfg80211_chan_def chandef; | |
262 | 266 | u32 basic_rates; |
263 | 267 | int i, j; |
264 | 268 | u16 beacon_int = cbss->beacon_interval; |
265 | 269 | const struct cfg80211_bss_ies *ies; |
270 | + enum nl80211_channel_type chan_type; | |
266 | 271 | u64 tsf; |
267 | 272 | |
268 | 273 | sdata_assert_lock(sdata); |
... | ... | @@ -270,6 +275,26 @@ |
270 | 275 | if (beacon_int < 10) |
271 | 276 | beacon_int = 10; |
272 | 277 | |
278 | + switch (sdata->u.ibss.chandef.width) { | |
279 | + case NL80211_CHAN_WIDTH_20_NOHT: | |
280 | + case NL80211_CHAN_WIDTH_20: | |
281 | + case NL80211_CHAN_WIDTH_40: | |
282 | + chan_type = cfg80211_get_chandef_type(&sdata->u.ibss.chandef); | |
283 | + cfg80211_chandef_create(&chandef, cbss->channel, chan_type); | |
284 | + break; | |
285 | + case NL80211_CHAN_WIDTH_5: | |
286 | + case NL80211_CHAN_WIDTH_10: | |
287 | + cfg80211_chandef_create(&chandef, cbss->channel, | |
288 | + NL80211_CHAN_WIDTH_20_NOHT); | |
289 | + chandef.width = sdata->u.ibss.chandef.width; | |
290 | + break; | |
291 | + default: | |
292 | + /* fall back to 20 MHz for unsupported modes */ | |
293 | + cfg80211_chandef_create(&chandef, cbss->channel, | |
294 | + NL80211_CHAN_WIDTH_20_NOHT); | |
295 | + break; | |
296 | + } | |
297 | + | |
273 | 298 | sband = sdata->local->hw.wiphy->bands[cbss->channel->band]; |
274 | 299 | |
275 | 300 | basic_rates = 0; |
... | ... | @@ -294,7 +319,7 @@ |
294 | 319 | |
295 | 320 | __ieee80211_sta_join_ibss(sdata, cbss->bssid, |
296 | 321 | beacon_int, |
297 | - cbss->channel, | |
322 | + &chandef, | |
298 | 323 | basic_rates, |
299 | 324 | cbss->capability, |
300 | 325 | tsf, false); |
... | ... | @@ -736,7 +761,7 @@ |
736 | 761 | sdata->drop_unencrypted = 0; |
737 | 762 | |
738 | 763 | __ieee80211_sta_join_ibss(sdata, bssid, sdata->vif.bss_conf.beacon_int, |
739 | - ifibss->chandef.chan, ifibss->basic_rates, | |
764 | + &ifibss->chandef, ifibss->basic_rates, | |
740 | 765 | capability, 0, true); |
741 | 766 | } |
742 | 767 | |
... | ... | @@ -1138,6 +1163,7 @@ |
1138 | 1163 | clear_bit(SDATA_STATE_OFFCHANNEL_BEACON_STOPPED, &sdata->state); |
1139 | 1164 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED | |
1140 | 1165 | BSS_CHANGED_IBSS); |
1166 | + ieee80211_vif_release_channel(sdata); | |
1141 | 1167 | synchronize_rcu(); |
1142 | 1168 | kfree(presp); |
1143 | 1169 |
net/mac80211/rc80211_minstrel_ht.c