diff options
Diffstat (limited to 'net/mac80211/ht.c')
-rw-r--r-- | net/mac80211/ht.c | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c index a71d891794a4..61ac7c48ac0c 100644 --- a/net/mac80211/ht.c +++ b/net/mac80211/ht.c | |||
@@ -62,6 +62,9 @@ void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata, | |||
62 | __check_htcap_disable(sdata, ht_cap, IEEE80211_HT_CAP_SUP_WIDTH_20_40); | 62 | __check_htcap_disable(sdata, ht_cap, IEEE80211_HT_CAP_SUP_WIDTH_20_40); |
63 | __check_htcap_disable(sdata, ht_cap, IEEE80211_HT_CAP_SGI_40); | 63 | __check_htcap_disable(sdata, ht_cap, IEEE80211_HT_CAP_SGI_40); |
64 | 64 | ||
65 | /* Allow user to disable SGI-20 (SGI-40 is handled above) */ | ||
66 | __check_htcap_disable(sdata, ht_cap, IEEE80211_HT_CAP_SGI_20); | ||
67 | |||
65 | /* Allow user to disable the max-AMSDU bit. */ | 68 | /* Allow user to disable the max-AMSDU bit. */ |
66 | __check_htcap_disable(sdata, ht_cap, IEEE80211_HT_CAP_MAX_AMSDU); | 69 | __check_htcap_disable(sdata, ht_cap, IEEE80211_HT_CAP_MAX_AMSDU); |
67 | 70 | ||
@@ -117,6 +120,21 @@ void ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_sub_if_data *sdata, | |||
117 | IEEE80211_HT_CAP_SGI_20 | | 120 | IEEE80211_HT_CAP_SGI_20 | |
118 | IEEE80211_HT_CAP_SGI_40 | | 121 | IEEE80211_HT_CAP_SGI_40 | |
119 | IEEE80211_HT_CAP_DSSSCCK40)); | 122 | IEEE80211_HT_CAP_DSSSCCK40)); |
123 | |||
124 | /* Unset 40 MHz if we're not using a 40 MHz channel */ | ||
125 | switch (sdata->vif.bss_conf.chandef.width) { | ||
126 | case NL80211_CHAN_WIDTH_20_NOHT: | ||
127 | case NL80211_CHAN_WIDTH_20: | ||
128 | ht_cap->cap &= ~IEEE80211_HT_CAP_SGI_40; | ||
129 | ht_cap->cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40; | ||
130 | break; | ||
131 | case NL80211_CHAN_WIDTH_40: | ||
132 | case NL80211_CHAN_WIDTH_80: | ||
133 | case NL80211_CHAN_WIDTH_80P80: | ||
134 | case NL80211_CHAN_WIDTH_160: | ||
135 | break; | ||
136 | } | ||
137 | |||
120 | /* | 138 | /* |
121 | * The STBC bits are asymmetric -- if we don't have | 139 | * The STBC bits are asymmetric -- if we don't have |
122 | * TX then mask out the peer's RX and vice versa. | 140 | * TX then mask out the peer's RX and vice versa. |
@@ -179,16 +197,19 @@ void ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_sub_if_data *sdata, | |||
179 | ieee80211_apply_htcap_overrides(sdata, ht_cap); | 197 | ieee80211_apply_htcap_overrides(sdata, ht_cap); |
180 | } | 198 | } |
181 | 199 | ||
182 | void ieee80211_sta_tear_down_BA_sessions(struct sta_info *sta, bool tx) | 200 | void ieee80211_sta_tear_down_BA_sessions(struct sta_info *sta, |
201 | enum ieee80211_agg_stop_reason reason) | ||
183 | { | 202 | { |
184 | int i; | 203 | int i; |
185 | 204 | ||
186 | cancel_work_sync(&sta->ampdu_mlme.work); | 205 | cancel_work_sync(&sta->ampdu_mlme.work); |
187 | 206 | ||
188 | for (i = 0; i < IEEE80211_NUM_TIDS; i++) { | 207 | for (i = 0; i < IEEE80211_NUM_TIDS; i++) { |
189 | __ieee80211_stop_tx_ba_session(sta, i, WLAN_BACK_INITIATOR, tx); | 208 | __ieee80211_stop_tx_ba_session(sta, i, reason); |
190 | __ieee80211_stop_rx_ba_session(sta, i, WLAN_BACK_RECIPIENT, | 209 | __ieee80211_stop_rx_ba_session(sta, i, WLAN_BACK_RECIPIENT, |
191 | WLAN_REASON_QSTA_LEAVE_QBSS, tx); | 210 | WLAN_REASON_QSTA_LEAVE_QBSS, |
211 | reason != AGG_STOP_DESTROY_STA && | ||
212 | reason != AGG_STOP_PEER_REQUEST); | ||
192 | } | 213 | } |
193 | } | 214 | } |
194 | 215 | ||
@@ -245,8 +266,7 @@ void ieee80211_ba_session_work(struct work_struct *work) | |||
245 | if (tid_tx && test_and_clear_bit(HT_AGG_STATE_WANT_STOP, | 266 | if (tid_tx && test_and_clear_bit(HT_AGG_STATE_WANT_STOP, |
246 | &tid_tx->state)) | 267 | &tid_tx->state)) |
247 | ___ieee80211_stop_tx_ba_session(sta, tid, | 268 | ___ieee80211_stop_tx_ba_session(sta, tid, |
248 | WLAN_BACK_INITIATOR, | 269 | AGG_STOP_LOCAL_REQUEST); |
249 | true); | ||
250 | } | 270 | } |
251 | mutex_unlock(&sta->ampdu_mlme.mtx); | 271 | mutex_unlock(&sta->ampdu_mlme.mtx); |
252 | } | 272 | } |
@@ -314,8 +334,7 @@ void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata, | |||
314 | __ieee80211_stop_rx_ba_session(sta, tid, WLAN_BACK_INITIATOR, 0, | 334 | __ieee80211_stop_rx_ba_session(sta, tid, WLAN_BACK_INITIATOR, 0, |
315 | true); | 335 | true); |
316 | else | 336 | else |
317 | __ieee80211_stop_tx_ba_session(sta, tid, WLAN_BACK_RECIPIENT, | 337 | __ieee80211_stop_tx_ba_session(sta, tid, AGG_STOP_PEER_REQUEST); |
318 | true); | ||
319 | } | 338 | } |
320 | 339 | ||
321 | int ieee80211_send_smps_action(struct ieee80211_sub_if_data *sdata, | 340 | int ieee80211_send_smps_action(struct ieee80211_sub_if_data *sdata, |