diff options
Diffstat (limited to 'net/mac80211/agg-rx.c')
-rw-r--r-- | net/mac80211/agg-rx.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c index 9c0d76cdca9..fd1aaf2a4a6 100644 --- a/net/mac80211/agg-rx.c +++ b/net/mac80211/agg-rx.c | |||
@@ -100,6 +100,29 @@ void __ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid, | |||
100 | mutex_unlock(&sta->ampdu_mlme.mtx); | 100 | mutex_unlock(&sta->ampdu_mlme.mtx); |
101 | } | 101 | } |
102 | 102 | ||
103 | void ieee80211_stop_rx_ba_session(struct ieee80211_vif *vif, u16 ba_rx_bitmap, | ||
104 | const u8 *addr) | ||
105 | { | ||
106 | struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif); | ||
107 | struct sta_info *sta; | ||
108 | int i; | ||
109 | |||
110 | rcu_read_lock(); | ||
111 | sta = sta_info_get(sdata, addr); | ||
112 | if (!sta) { | ||
113 | rcu_read_unlock(); | ||
114 | return; | ||
115 | } | ||
116 | |||
117 | for (i = 0; i < STA_TID_NUM; i++) | ||
118 | if (ba_rx_bitmap & BIT(i)) | ||
119 | set_bit(i, sta->ampdu_mlme.tid_rx_stop_requested); | ||
120 | |||
121 | ieee80211_queue_work(&sta->local->hw, &sta->ampdu_mlme.work); | ||
122 | rcu_read_unlock(); | ||
123 | } | ||
124 | EXPORT_SYMBOL(ieee80211_stop_rx_ba_session); | ||
125 | |||
103 | /* | 126 | /* |
104 | * After accepting the AddBA Request we activated a timer, | 127 | * After accepting the AddBA Request we activated a timer, |
105 | * resetting it after each frame that arrives from the originator. | 128 | * resetting it after each frame that arrives from the originator. |
@@ -247,7 +270,11 @@ void ieee80211_process_addba_request(struct ieee80211_local *local, | |||
247 | "%pM on tid %u\n", | 270 | "%pM on tid %u\n", |
248 | mgmt->sa, tid); | 271 | mgmt->sa, tid); |
249 | #endif /* CONFIG_MAC80211_HT_DEBUG */ | 272 | #endif /* CONFIG_MAC80211_HT_DEBUG */ |
250 | goto end; | 273 | |
274 | /* delete existing Rx BA session on the same tid */ | ||
275 | ___ieee80211_stop_rx_ba_session(sta, tid, WLAN_BACK_RECIPIENT, | ||
276 | WLAN_STATUS_UNSPECIFIED_QOS, | ||
277 | false); | ||
251 | } | 278 | } |
252 | 279 | ||
253 | /* prepare A-MPDU MLME for Rx aggregation */ | 280 | /* prepare A-MPDU MLME for Rx aggregation */ |