aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/mac80211.h8
-rw-r--r--net/mac80211/agg-rx.c3
-rw-r--r--net/mac80211/main.c1
3 files changed, 12 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 62c0ce2d1dc8..d024fc563e7b 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1147,6 +1147,13 @@ enum ieee80211_hw_flags {
1147 * @napi_weight: weight used for NAPI polling. You must specify an 1147 * @napi_weight: weight used for NAPI polling. You must specify an
1148 * appropriate value here if a napi_poll operation is provided 1148 * appropriate value here if a napi_poll operation is provided
1149 * by your driver. 1149 * by your driver.
1150
1151 * @max_rx_aggregation_subframes: maximum buffer size (number of
1152 * sub-frames) to be used for A-MPDU block ack receiver
1153 * aggregation.
1154 * This is only relevant if the device has restrictions on the
1155 * number of subframes, if it relies on mac80211 to do reordering
1156 * it shouldn't be set.
1150 */ 1157 */
1151struct ieee80211_hw { 1158struct ieee80211_hw {
1152 struct ieee80211_conf conf; 1159 struct ieee80211_conf conf;
@@ -1165,6 +1172,7 @@ struct ieee80211_hw {
1165 u8 max_rates; 1172 u8 max_rates;
1166 u8 max_report_rates; 1173 u8 max_report_rates;
1167 u8 max_rate_tries; 1174 u8 max_rate_tries;
1175 u8 max_rx_aggregation_subframes;
1168}; 1176};
1169 1177
1170/** 1178/**
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c
index f138b195d657..002db5e86eb6 100644
--- a/net/mac80211/agg-rx.c
+++ b/net/mac80211/agg-rx.c
@@ -239,6 +239,9 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
239 buf_size = buf_size << sband->ht_cap.ampdu_factor; 239 buf_size = buf_size << sband->ht_cap.ampdu_factor;
240 } 240 }
241 241
242 /* make sure the size doesn't exceed the maximum supported by the hw */
243 if (buf_size > local->hw.max_rx_aggregation_subframes)
244 buf_size = local->hw.max_rx_aggregation_subframes;
242 245
243 /* examine state machine */ 246 /* examine state machine */
244 mutex_lock(&sta->ampdu_mlme.mtx); 247 mutex_lock(&sta->ampdu_mlme.mtx);
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 485d36bc9a46..1c507c6972e6 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -552,6 +552,7 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
552 local->hw.queues = 1; 552 local->hw.queues = 1;
553 local->hw.max_rates = 1; 553 local->hw.max_rates = 1;
554 local->hw.max_report_rates = 0; 554 local->hw.max_report_rates = 0;
555 local->hw.max_rx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF;
555 local->hw.conf.long_frame_max_tx_count = wiphy->retry_long; 556 local->hw.conf.long_frame_max_tx_count = wiphy->retry_long;
556 local->hw.conf.short_frame_max_tx_count = wiphy->retry_short; 557 local->hw.conf.short_frame_max_tx_count = wiphy->retry_short;
557 local->user_power_level = -1; 558 local->user_power_level = -1;