diff options
author | Luciano Coelho <coelho@ti.com> | 2011-01-12 08:26:30 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-01-19 11:36:09 -0500 |
commit | df6ba5d80d6c9b51471d5fa046c3c06988e5f62a (patch) | |
tree | 9321170ce223172318ff6e6fa34bd3b30559cf44 /net | |
parent | dcac908babcd8ce21057e476c8df609b28ad2cd8 (diff) |
mac80211: add hw configuration for max ampdu buffer size
Some devices don't support the maximum AMDPU buffer size of 64, so we
need to add an option to configure this in the hardware configuration.
This value will be used in the ADDBA response instead of the value
suggested in the request, if the latter is greater than the max
supported.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Tested-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/agg-rx.c | 3 | ||||
-rw-r--r-- | net/mac80211/main.c | 1 |
2 files changed, 4 insertions, 0 deletions
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; |