diff options
Diffstat (limited to 'net/mac80211/agg-rx.c')
-rw-r--r-- | net/mac80211/agg-rx.c | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c index 5c564a68fb50..fbf56af1bde9 100644 --- a/net/mac80211/agg-rx.c +++ b/net/mac80211/agg-rx.c | |||
@@ -131,6 +131,28 @@ void ieee80211_stop_rx_ba_session(struct ieee80211_vif *vif, u16 ba_rx_bitmap, | |||
131 | } | 131 | } |
132 | EXPORT_SYMBOL(ieee80211_stop_rx_ba_session); | 132 | EXPORT_SYMBOL(ieee80211_stop_rx_ba_session); |
133 | 133 | ||
134 | void ieee80211_change_rx_ba_max_subframes(struct ieee80211_vif *vif, | ||
135 | const u8 *addr, | ||
136 | u8 max_subframes) | ||
137 | { | ||
138 | struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif); | ||
139 | struct sta_info *sta; | ||
140 | |||
141 | if (max_subframes == 0) | ||
142 | return; | ||
143 | |||
144 | rcu_read_lock(); | ||
145 | sta = sta_info_get_bss(sdata, addr); | ||
146 | if (!sta) { | ||
147 | rcu_read_unlock(); | ||
148 | return; | ||
149 | } | ||
150 | sta->sta.max_rx_aggregation_subframes = max_subframes; | ||
151 | ieee80211_queue_work(&sta->local->hw, &sta->ampdu_mlme.work); | ||
152 | rcu_read_unlock(); | ||
153 | } | ||
154 | EXPORT_SYMBOL(ieee80211_change_rx_ba_max_subframes); | ||
155 | |||
134 | /* | 156 | /* |
135 | * After accepting the AddBA Request we activated a timer, | 157 | * After accepting the AddBA Request we activated a timer, |
136 | * resetting it after each frame that arrives from the originator. | 158 | * resetting it after each frame that arrives from the originator. |
@@ -270,13 +292,15 @@ void __ieee80211_start_rx_ba_session(struct sta_info *sta, | |||
270 | if (buf_size == 0) | 292 | if (buf_size == 0) |
271 | buf_size = IEEE80211_MAX_AMPDU_BUF; | 293 | buf_size = IEEE80211_MAX_AMPDU_BUF; |
272 | 294 | ||
273 | /* make sure the size doesn't exceed the maximum supported by the hw */ | ||
274 | if (buf_size > local->hw.max_rx_aggregation_subframes) | ||
275 | buf_size = local->hw.max_rx_aggregation_subframes; | ||
276 | |||
277 | /* examine state machine */ | 295 | /* examine state machine */ |
278 | mutex_lock(&sta->ampdu_mlme.mtx); | 296 | mutex_lock(&sta->ampdu_mlme.mtx); |
279 | 297 | ||
298 | /* make sure the size doesn't exceed the maximum supported by link */ | ||
299 | if (buf_size > sta->sta.max_rx_aggregation_subframes) | ||
300 | buf_size = sta->sta.max_rx_aggregation_subframes; | ||
301 | |||
302 | ht_dbg(sta->sdata, "AddBA Req buf_size=%d\n", buf_size); | ||
303 | |||
280 | if (sta->ampdu_mlme.tid_rx[tid]) { | 304 | if (sta->ampdu_mlme.tid_rx[tid]) { |
281 | ht_dbg_ratelimited(sta->sdata, | 305 | ht_dbg_ratelimited(sta->sdata, |
282 | "unexpected AddBA Req from %pM on tid %u\n", | 306 | "unexpected AddBA Req from %pM on tid %u\n", |