From b0721b96927b986f3682428e941ed4fb863d0737 Mon Sep 17 00:00:00 2001 From: Ryder Lee Date: Sat, 18 Feb 2023 01:50:38 +0800 Subject: [PATCH] wifi: mt76: connac: refresh tx session timer for WED device There's no keep-alive packet being received by mac80211 stack when WED is enabled, which leads to tx BA session timeout. This patch calls ieee80211_refresh_tx_agg_session_timer() to refresh timer according to tx status reporting. Signed-off-by: Ryder Lee --- mt76_connac_mac.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mt76_connac_mac.c b/mt76_connac_mac.c index aed4ee95f..8d316d3aa 100644 --- a/mt76_connac_mac.c +++ b/mt76_connac_mac.c @@ -582,6 +582,17 @@ bool mt76_connac2_mac_fill_txs(struct mt76_dev *dev, struct mt76_wcid *wcid, le32_get_bits(txs_data[6], MT_TXS6_MPDU_FAIL_CNT); stats->tx_retries += le32_get_bits(txs_data[7], MT_TXS7_MPDU_RETRY_CNT); + + if (wcid->sta) { + struct ieee80211_sta *sta; + u8 tid; + + sta = container_of((void *)wcid, struct ieee80211_sta, + drv_priv); + tid = FIELD_GET(MT_TXS0_TID, txs); + + ieee80211_refresh_tx_agg_session_timer(sta, tid); + } } txrate = FIELD_GET(MT_TXS0_TX_RATE, txs);