]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: ath12k: add support for BA1024
authorBaochen Qiang <quic_bqiang@quicinc.com>
Wed, 17 Jan 2024 12:05:30 +0000 (14:05 +0200)
committerKalle Valo <quic_kvalo@quicinc.com>
Thu, 18 Jan 2024 05:52:02 +0000 (07:52 +0200)
Currently the maximum block ACK window size supported is 256.
This results in that, when connected to an AP which supports
larger BA sizes like BA512 or BA1024, only BA256 is
established, leading to a lower peak throughput.

So add support for BA1024, this is done by allocating a larger
REO queue and advertising IEEE80211_MAX_AMPDU_BUF_EHT support
to MAC80211.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4

Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20231129020414.56425-3-quic_bqiang@quicinc.com
drivers/net/wireless/ath/ath12k/dp.h
drivers/net/wireless/ath/ath12k/hal_desc.h
drivers/net/wireless/ath/ath12k/hal_rx.c
drivers/net/wireless/ath/ath12k/mac.c

index 1df3cdd461400aec42207118b5a113f5f83a876a..f8fc72a178ef3f28099d80523d5f0652a80b302c 100644 (file)
@@ -150,7 +150,7 @@ struct ath12k_pdev_dp {
 
 #define DP_RX_HASH_ENABLE      1 /* Enable hash based Rx steering */
 
-#define DP_BA_WIN_SZ_MAX       256
+#define DP_BA_WIN_SZ_MAX       1024
 
 #define DP_TCL_NUM_RING_MAX    4
 
index ec204939e50cdd0a385097318802eaf40a82f98b..63340256d3f64ef20c7759d0d2958477315a9b26 100644 (file)
@@ -2517,6 +2517,12 @@ struct hal_reo_update_rx_queue {
        __le32 pn[4];
 } __packed;
 
+struct hal_rx_reo_queue_1k {
+       struct hal_desc_header desc_hdr;
+       __le32 rx_bitmap_1023_288[23];
+       __le32 reserved[8];
+} __packed;
+
 #define HAL_REO_UNBLOCK_CACHE_INFO0_UNBLK_CACHE                BIT(0)
 #define HAL_REO_UNBLOCK_CACHE_INFO0_RESOURCE_IDX       GENMASK(2, 1)
 
index 4fc08d4f85b5969c200b4f388d5df60af9e41a56..f7c1aaa3b5d47fe766be8e83c3bdf714ba099c9a 100644 (file)
@@ -688,23 +688,28 @@ void ath12k_hal_reo_update_rx_reo_queue_status(struct ath12k_base *ab,
 
 u32 ath12k_hal_reo_qdesc_size(u32 ba_window_size, u8 tid)
 {
-       u32 num_ext_desc;
+       u32 num_ext_desc, num_1k_desc = 0;
 
        if (ba_window_size <= 1) {
                if (tid != HAL_DESC_REO_NON_QOS_TID)
                        num_ext_desc = 1;
                else
                        num_ext_desc = 0;
+
        } else if (ba_window_size <= 105) {
                num_ext_desc = 1;
        } else if (ba_window_size <= 210) {
                num_ext_desc = 2;
-       } else {
+       } else if (ba_window_size <= 256) {
                num_ext_desc = 3;
+       } else {
+               num_ext_desc = 10;
+               num_1k_desc = 1;
        }
 
        return sizeof(struct hal_rx_reo_queue) +
-               (num_ext_desc * sizeof(struct hal_rx_reo_queue_ext));
+               (num_ext_desc * sizeof(struct hal_rx_reo_queue_ext)) +
+               (num_1k_desc * sizeof(struct hal_rx_reo_queue_1k));
 }
 
 void ath12k_hal_reo_qdesc_setup(struct hal_rx_reo_queue *qdesc,
index d453e41652280357bcefa6e41a7db5a70f5576da..408f1fada3375e5fba31f2146fb3140627b224f1 100644 (file)
@@ -7602,7 +7602,7 @@ static int ath12k_mac_hw_register(struct ath12k *ar)
        hw->queues = ATH12K_HW_MAX_QUEUES;
        wiphy->tx_queue_len = ATH12K_QUEUE_LEN;
        hw->offchannel_tx_hw_queue = ATH12K_HW_MAX_QUEUES - 1;
-       hw->max_rx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF_HE;
+       hw->max_rx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF_EHT;
 
        hw->vif_data_size = sizeof(struct ath12k_vif);
        hw->sta_data_size = sizeof(struct ath12k_sta);