]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
wil6210: increase RX rings and RX buff array size
authorMaya Erez <merez@codeaurora.org>
Wed, 31 Oct 2018 08:52:11 +0000 (10:52 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 6 Nov 2018 16:02:21 +0000 (18:02 +0200)
In Talyn-MB, the 11ad throughput is higher and performance drops
may occur in the current RX configuration due to unavailability
of Rx buffers.
Increase the RX descriptor ring, RX status ring and number of RX
buffers to stabilize the performance in high throughput.

Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/wil6210/main.c
drivers/net/wireless/ath/wil6210/txrx_edma.c
drivers/net/wireless/ath/wil6210/txrx_edma.h
drivers/net/wireless/ath/wil6210/wil6210.h

index c54b008996ee602049773bb31e0a3470b6ef1fac..078ad5cf664cc27200c6c4149b60c196b1b30283 100644 (file)
@@ -80,7 +80,7 @@ static const struct kernel_param_ops mtu_max_ops = {
 module_param_cb(mtu_max, &mtu_max_ops, &mtu_max, 0444);
 MODULE_PARM_DESC(mtu_max, " Max MTU value.");
 
-static uint rx_ring_order = WIL_RX_RING_SIZE_ORDER_DEFAULT;
+static uint rx_ring_order;
 static uint tx_ring_order = WIL_TX_RING_SIZE_ORDER_DEFAULT;
 static uint bcast_ring_order = WIL_BCAST_RING_SIZE_ORDER_DEFAULT;
 
@@ -1684,6 +1684,11 @@ int __wil_up(struct wil6210_priv *wil)
                return rc;
 
        /* Rx RING. After MAC and beacon */
+       if (rx_ring_order == 0)
+               rx_ring_order = wil->hw_version < HW_VER_TALYN_MB ?
+                       WIL_RX_RING_SIZE_ORDER_DEFAULT :
+                       WIL_RX_RING_SIZE_ORDER_TALYN_DEFAULT;
+
        rc = wil->txrx_ops.rx_init(wil, 1 << rx_ring_order);
        if (rc)
                return rc;
index 2bbae75b9a846373d91835cf5d5dbcc070b3cd8e..ce713588a547510b8ddb2a8f2d95b7789601a93a 100644 (file)
@@ -357,8 +357,8 @@ static int wil_init_rx_sring(struct wil6210_priv *wil,
        struct wil_status_ring *sring = &wil->srings[ring_id];
        int rc;
 
-       wil_dbg_misc(wil, "init RX sring: size=%u, ring_id=%u\n", sring->size,
-                    ring_id);
+       wil_dbg_misc(wil, "init RX sring: size=%u, ring_id=%u\n",
+                    status_ring_size, ring_id);
 
        memset(&sring->rx_data, 0, sizeof(sring->rx_data));
 
index a7fe9292fda380015cbd8d9b0017f12d4e6f5fd9..343516a03a1e4098dc9c561845c358b25e3c460f 100644 (file)
@@ -23,9 +23,9 @@
 #define WIL_SRING_SIZE_ORDER_MIN       (WIL_RING_SIZE_ORDER_MIN)
 #define WIL_SRING_SIZE_ORDER_MAX       (WIL_RING_SIZE_ORDER_MAX)
 /* RX sring order should be bigger than RX ring order */
-#define WIL_RX_SRING_SIZE_ORDER_DEFAULT        (11)
+#define WIL_RX_SRING_SIZE_ORDER_DEFAULT        (12)
 #define WIL_TX_SRING_SIZE_ORDER_DEFAULT        (12)
-#define WIL_RX_BUFF_ARR_SIZE_DEFAULT (1536)
+#define WIL_RX_BUFF_ARR_SIZE_DEFAULT (2600)
 
 #define WIL_DEFAULT_RX_STATUS_RING_ID 0
 #define WIL_RX_DESC_RING_ID 0
index abb82018d3b4344121759ee5f11c100992cbe9d0..414de541abd0cceeb2253cd7ac7ec6ea8c1cc4be 100644 (file)
@@ -81,6 +81,7 @@ static inline u32 WIL_GET_BITS(u32 x, int b0, int b1)
 
 #define WIL_TX_Q_LEN_DEFAULT           (4000)
 #define WIL_RX_RING_SIZE_ORDER_DEFAULT (10)
+#define WIL_RX_RING_SIZE_ORDER_TALYN_DEFAULT   (11)
 #define WIL_TX_RING_SIZE_ORDER_DEFAULT (12)
 #define WIL_BCAST_RING_SIZE_ORDER_DEFAULT      (7)
 #define WIL_BCAST_MCS0_LIMIT           (1024) /* limit for MCS0 frame size */