diff options
author | Johannes Berg <johannes.berg@intel.com> | 2018-06-18 16:39:29 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2018-06-18 16:39:39 -0400 |
commit | b8042b3da925f390c1482bf9dc0898dc0b3ea7b5 (patch) | |
tree | 62ca783069af1d7d1ee6ae12a352a9b11051050b | |
parent | 95a28eeaf1491bcb8bf521bad4784683333705ee (diff) |
ieee80211: bump IEEE80211_MAX_AMPDU_BUF to support HE
Bump the IEEE80211_MAX_AMPDU_BUF size to 0x100 for HE support
and - for now - use IEEE80211_MAX_AMPDU_BUF_HT everywhere.
This is derived from my internal patch, parts of which Luca
had sent upstream.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | drivers/net/wireless/realtek/rtlwifi/base.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8188eu/include/wifi.h | 1 | ||||
-rw-r--r-- | drivers/staging/rtl8712/wifi.h | 1 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/include/wifi.h | 1 | ||||
-rw-r--r-- | drivers/staging/rtlwifi/base.c | 2 | ||||
-rw-r--r-- | include/linux/ieee80211.h | 10 | ||||
-rw-r--r-- | net/mac80211/agg-rx.c | 4 | ||||
-rw-r--r-- | net/mac80211/agg-tx.c | 2 | ||||
-rw-r--r-- | net/mac80211/ht.c | 2 | ||||
-rw-r--r-- | net/mac80211/main.c | 4 |
10 files changed, 14 insertions, 15 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c b/drivers/net/wireless/realtek/rtlwifi/base.c index 39c817eddd78..31bd6f714052 100644 --- a/drivers/net/wireless/realtek/rtlwifi/base.c +++ b/drivers/net/wireless/realtek/rtlwifi/base.c | |||
@@ -1904,7 +1904,7 @@ void rtl_rx_ampdu_apply(struct rtl_priv *rtlpriv) | |||
1904 | reject_agg, ctrl_agg_size, agg_size); | 1904 | reject_agg, ctrl_agg_size, agg_size); |
1905 | 1905 | ||
1906 | rtlpriv->hw->max_rx_aggregation_subframes = | 1906 | rtlpriv->hw->max_rx_aggregation_subframes = |
1907 | (ctrl_agg_size ? agg_size : IEEE80211_MAX_AMPDU_BUF); | 1907 | (ctrl_agg_size ? agg_size : IEEE80211_MAX_AMPDU_BUF_HT); |
1908 | } | 1908 | } |
1909 | EXPORT_SYMBOL(rtl_rx_ampdu_apply); | 1909 | EXPORT_SYMBOL(rtl_rx_ampdu_apply); |
1910 | 1910 | ||
diff --git a/drivers/staging/rtl8188eu/include/wifi.h b/drivers/staging/rtl8188eu/include/wifi.h index 084a246eec19..6790b7c8cfb1 100644 --- a/drivers/staging/rtl8188eu/include/wifi.h +++ b/drivers/staging/rtl8188eu/include/wifi.h | |||
@@ -575,7 +575,6 @@ enum ht_cap_ampdu_factor { | |||
575 | * According to IEEE802.11n spec size varies from 8K to 64K (in powers of 2) | 575 | * According to IEEE802.11n spec size varies from 8K to 64K (in powers of 2) |
576 | */ | 576 | */ |
577 | #define IEEE80211_MIN_AMPDU_BUF 0x8 | 577 | #define IEEE80211_MIN_AMPDU_BUF 0x8 |
578 | #define IEEE80211_MAX_AMPDU_BUF 0x40 | ||
579 | 578 | ||
580 | 579 | ||
581 | #define OP_MODE_PURE 0 | 580 | #define OP_MODE_PURE 0 |
diff --git a/drivers/staging/rtl8712/wifi.h b/drivers/staging/rtl8712/wifi.h index 0ed2f44ab4e9..00a4302e9983 100644 --- a/drivers/staging/rtl8712/wifi.h +++ b/drivers/staging/rtl8712/wifi.h | |||
@@ -574,7 +574,6 @@ struct ieee80211_ht_addt_info { | |||
574 | * According to IEEE802.11n spec size varies from 8K to 64K (in powers of 2) | 574 | * According to IEEE802.11n spec size varies from 8K to 64K (in powers of 2) |
575 | */ | 575 | */ |
576 | #define IEEE80211_MIN_AMPDU_BUF 0x8 | 576 | #define IEEE80211_MIN_AMPDU_BUF 0x8 |
577 | #define IEEE80211_MAX_AMPDU_BUF 0x40 | ||
578 | 577 | ||
579 | 578 | ||
580 | /* Spatial Multiplexing Power Save Modes */ | 579 | /* Spatial Multiplexing Power Save Modes */ |
diff --git a/drivers/staging/rtl8723bs/include/wifi.h b/drivers/staging/rtl8723bs/include/wifi.h index 08bc79840b23..559bf2606fb7 100644 --- a/drivers/staging/rtl8723bs/include/wifi.h +++ b/drivers/staging/rtl8723bs/include/wifi.h | |||
@@ -799,7 +799,6 @@ enum HT_CAP_AMPDU_FACTOR { | |||
799 | * According to IEEE802.11n spec size varies from 8K to 64K (in powers of 2) | 799 | * According to IEEE802.11n spec size varies from 8K to 64K (in powers of 2) |
800 | */ | 800 | */ |
801 | #define IEEE80211_MIN_AMPDU_BUF 0x8 | 801 | #define IEEE80211_MIN_AMPDU_BUF 0x8 |
802 | #define IEEE80211_MAX_AMPDU_BUF 0x40 | ||
803 | 802 | ||
804 | 803 | ||
805 | /* Spatial Multiplexing Power Save Modes */ | 804 | /* Spatial Multiplexing Power Save Modes */ |
diff --git a/drivers/staging/rtlwifi/base.c b/drivers/staging/rtlwifi/base.c index e46e47d93d7d..094827c1879a 100644 --- a/drivers/staging/rtlwifi/base.c +++ b/drivers/staging/rtlwifi/base.c | |||
@@ -1838,7 +1838,7 @@ void rtl_rx_ampdu_apply(struct rtl_priv *rtlpriv) | |||
1838 | reject_agg, ctrl_agg_size, agg_size); | 1838 | reject_agg, ctrl_agg_size, agg_size); |
1839 | 1839 | ||
1840 | rtlpriv->hw->max_rx_aggregation_subframes = | 1840 | rtlpriv->hw->max_rx_aggregation_subframes = |
1841 | (ctrl_agg_size ? agg_size : IEEE80211_MAX_AMPDU_BUF); | 1841 | (ctrl_agg_size ? agg_size : IEEE80211_MAX_AMPDU_BUF_HT); |
1842 | } | 1842 | } |
1843 | 1843 | ||
1844 | /********************************************************* | 1844 | /********************************************************* |
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index e6a6503bfa33..9c03a7d5e400 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -1433,11 +1433,13 @@ struct ieee80211_ht_operation { | |||
1433 | #define IEEE80211_DELBA_PARAM_INITIATOR_MASK 0x0800 | 1433 | #define IEEE80211_DELBA_PARAM_INITIATOR_MASK 0x0800 |
1434 | 1434 | ||
1435 | /* | 1435 | /* |
1436 | * A-PMDU buffer sizes | 1436 | * A-MPDU buffer sizes |
1437 | * According to IEEE802.11n spec size varies from 8K to 64K (in powers of 2) | 1437 | * According to HT size varies from 8 to 64 frames |
1438 | * HE adds the ability to have up to 256 frames. | ||
1438 | */ | 1439 | */ |
1439 | #define IEEE80211_MIN_AMPDU_BUF 0x8 | 1440 | #define IEEE80211_MIN_AMPDU_BUF 0x8 |
1440 | #define IEEE80211_MAX_AMPDU_BUF 0x40 | 1441 | #define IEEE80211_MAX_AMPDU_BUF_HT 0x40 |
1442 | #define IEEE80211_MAX_AMPDU_BUF 0x100 | ||
1441 | 1443 | ||
1442 | 1444 | ||
1443 | /* Spatial Multiplexing Power Save Modes (for capability) */ | 1445 | /* Spatial Multiplexing Power Save Modes (for capability) */ |
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c index e83c19d4c292..3ffd853b483f 100644 --- a/net/mac80211/agg-rx.c +++ b/net/mac80211/agg-rx.c | |||
@@ -274,7 +274,7 @@ void ___ieee80211_start_rx_ba_session(struct sta_info *sta, | |||
274 | /* XXX: check own ht delayed BA capability?? */ | 274 | /* XXX: check own ht delayed BA capability?? */ |
275 | if (((ba_policy != 1) && | 275 | if (((ba_policy != 1) && |
276 | (!(sta->sta.ht_cap.cap & IEEE80211_HT_CAP_DELAY_BA))) || | 276 | (!(sta->sta.ht_cap.cap & IEEE80211_HT_CAP_DELAY_BA))) || |
277 | (buf_size > IEEE80211_MAX_AMPDU_BUF)) { | 277 | (buf_size > IEEE80211_MAX_AMPDU_BUF_HT)) { |
278 | status = WLAN_STATUS_INVALID_QOS_PARAM; | 278 | status = WLAN_STATUS_INVALID_QOS_PARAM; |
279 | ht_dbg_ratelimited(sta->sdata, | 279 | ht_dbg_ratelimited(sta->sdata, |
280 | "AddBA Req with bad params from %pM on tid %u. policy %d, buffer size %d\n", | 280 | "AddBA Req with bad params from %pM on tid %u. policy %d, buffer size %d\n", |
@@ -283,7 +283,7 @@ void ___ieee80211_start_rx_ba_session(struct sta_info *sta, | |||
283 | } | 283 | } |
284 | /* determine default buffer size */ | 284 | /* determine default buffer size */ |
285 | if (buf_size == 0) | 285 | if (buf_size == 0) |
286 | buf_size = IEEE80211_MAX_AMPDU_BUF; | 286 | buf_size = IEEE80211_MAX_AMPDU_BUF_HT; |
287 | 287 | ||
288 | /* make sure the size doesn't exceed the maximum supported by the hw */ | 288 | /* make sure the size doesn't exceed the maximum supported by the hw */ |
289 | if (buf_size > sta->sta.max_rx_aggregation_subframes) | 289 | if (buf_size > sta->sta.max_rx_aggregation_subframes) |
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c index ac4295296514..86c6bc0432ba 100644 --- a/net/mac80211/agg-tx.c +++ b/net/mac80211/agg-tx.c | |||
@@ -514,7 +514,7 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid) | |||
514 | /* send AddBA request */ | 514 | /* send AddBA request */ |
515 | ieee80211_send_addba_request(sdata, sta->sta.addr, tid, | 515 | ieee80211_send_addba_request(sdata, sta->sta.addr, tid, |
516 | tid_tx->dialog_token, params.ssn, | 516 | tid_tx->dialog_token, params.ssn, |
517 | IEEE80211_MAX_AMPDU_BUF, | 517 | IEEE80211_MAX_AMPDU_BUF_HT, |
518 | tid_tx->timeout); | 518 | tid_tx->timeout); |
519 | } | 519 | } |
520 | 520 | ||
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c index 26a7ba3b698f..f849ea814993 100644 --- a/net/mac80211/ht.c +++ b/net/mac80211/ht.c | |||
@@ -352,7 +352,7 @@ void ieee80211_ba_session_work(struct work_struct *work) | |||
352 | test_and_clear_bit(tid, | 352 | test_and_clear_bit(tid, |
353 | sta->ampdu_mlme.tid_rx_manage_offl)) | 353 | sta->ampdu_mlme.tid_rx_manage_offl)) |
354 | ___ieee80211_start_rx_ba_session(sta, 0, 0, 0, 1, tid, | 354 | ___ieee80211_start_rx_ba_session(sta, 0, 0, 0, 1, tid, |
355 | IEEE80211_MAX_AMPDU_BUF, | 355 | IEEE80211_MAX_AMPDU_BUF_HT, |
356 | false, true); | 356 | false, true); |
357 | 357 | ||
358 | if (test_and_clear_bit(tid + IEEE80211_NUM_TIDS, | 358 | if (test_and_clear_bit(tid + IEEE80211_NUM_TIDS, |
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index a6f8e3a646d4..070f77862014 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -597,8 +597,8 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len, | |||
597 | local->hw.queues = 1; | 597 | local->hw.queues = 1; |
598 | local->hw.max_rates = 1; | 598 | local->hw.max_rates = 1; |
599 | local->hw.max_report_rates = 0; | 599 | local->hw.max_report_rates = 0; |
600 | local->hw.max_rx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF; | 600 | local->hw.max_rx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF_HT; |
601 | local->hw.max_tx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF; | 601 | local->hw.max_tx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF_HT; |
602 | local->hw.offchannel_tx_hw_queue = IEEE80211_INVAL_HW_QUEUE; | 602 | local->hw.offchannel_tx_hw_queue = IEEE80211_INVAL_HW_QUEUE; |
603 | local->hw.conf.long_frame_max_tx_count = wiphy->retry_long; | 603 | local->hw.conf.long_frame_max_tx_count = wiphy->retry_long; |
604 | local->hw.conf.short_frame_max_tx_count = wiphy->retry_short; | 604 | local->hw.conf.short_frame_max_tx_count = wiphy->retry_short; |