According to https://git.ti.com/cgit/wilink8-wlan/build-utilites/commit/?h=r8.9&id=a2ee50aa5190ed3b334373d6cd09b1bff56ffcf7 the patch below should be used with firmware 8.9.1.0.2 . Does it make sense to include this in upstream kernel? I cannot really say if it improves stability or not: I don't have the possibility to run WFA test 5.2.27, and I am still seing issues with firmware 8.9.1.0.2 and 6.6 kernel (with all 80211 fixes). Testing of this patch with older wl18xx firmware is ongoing. From ac0695f9bf6810ae91cd0e441199102f0c16e507 Mon Sep 17 00:00:00 2001 From: Itzhak Date: Thu, 28 Dec 2023 08:47:58 +0200 Subject: [PATCH 25/27] allocated packets tracking mechanism may get broken It is observed that at some scenarios, the best effort queue that should always show positive or 0 count, may show negative. This cause the best effort queue to look full to the network stack and thus causing the network stack to push less packets than to other QoS queues. It would cause specific WFA tests like 5.2.27 to fail. Signed-off-by: Itzhak --- drivers/net/wireless/ti/wlcore/tx.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c index b6e19c2d66b0..02727bb9bc50 100644 --- a/drivers/net/wireless/ti/wlcore/tx.c +++ b/drivers/net/wireless/ti/wlcore/tx.c @@ -27,6 +27,19 @@ */ #include "../wl12xx/reg.h" +/* mapping tid to AC queue + */ +static const int ieee802_tid_to_ac[8] = { + CONF_TX_AC_BE, + CONF_TX_AC_BK, + CONF_TX_AC_BK, + CONF_TX_AC_BE, + CONF_TX_AC_VI, + CONF_TX_AC_VI, + CONF_TX_AC_VO, + CONF_TX_AC_VO +}; + static int wl1271_set_default_wep_key(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 id) { @@ -287,6 +300,18 @@ static void wl1271_tx_fill_hdr(struct wl1271 *wl, struct wl12xx_vif *wlvif, /* queue */ ac = wl1271_tx_get_queue(skb_get_queue_mapping(skb)); desc->tid = skb->priority; + + /* check that tid is aligned with ac, if not, align with ac */ + if ( (desc->tid >= 0) && (desc->tid <= 7) && (ieee802_tid_to_ac[desc->tid] != ac) ) + { + /* decrement the wrong allocated ac and increment according to tid */ + wl->tx_allocated_pkts[ac]--; + wl->tx_allocated_pkts[ieee802_tid_to_ac[desc->tid]]++; + + wl1271_debug(DEBUG_TX, + "tx_fill_hdr: tid: %d. ac: %d", + desc->tid, ac); + } if (is_dummy) { /* -- 2.25.0.windows.1 Br, Peter Åstrand