Commit 82694f76 authored by Luciano Coelho's avatar Luciano Coelho Committed by John W. Linville
Browse files

mac80211: use maximum number of AMPDU frames as default in BA RX

When the buffer size is set to zero in the block ack parameter set
field, we should use the maximum supported number of subframes.  The
existing code was bogus and was doing some unnecessary calculations
that lead to wrong values.

Thanks Johannes for helping me figure this one out.

Cc: Johannes Berg <>
Signed-off-by: default avatarLuciano Coelho <>
Reviewed-by: default avatarJohannes Berg <>
Signed-off-by: default avatarJohn W. Linville <>
parent 681c4d07
......@@ -185,8 +185,6 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
struct ieee80211_mgmt *mgmt,
size_t len)
struct ieee80211_hw *hw = &local->hw;
struct ieee80211_conf *conf = &hw->conf;
struct tid_ampdu_rx *tid_agg_rx;
u16 capab, tid, timeout, ba_policy, buf_size, start_seq_num, status;
u8 dialog_token;
......@@ -231,13 +229,8 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
goto end_no_lock;
/* determine default buffer size */
if (buf_size == 0) {
struct ieee80211_supported_band *sband;
sband = local->hw.wiphy->bands[conf->channel->band];
buf_size = IEEE80211_MIN_AMPDU_BUF;
buf_size = buf_size << sband->ht_cap.ampdu_factor;
if (buf_size == 0)
buf_size = IEEE80211_MAX_AMPDU_BUF;
/* examine state machine */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment