1 From: Ryder Lee <ryder.lee@mediatek.com>
2 Date: Sat, 18 Feb 2023 01:50:05 +0800
3 Subject: [PATCH] wifi: mac80211: introduce
4 ieee80211_refresh_tx_agg_session_timer()
6 This allows low level drivers to refresh the tx agg session timer, based on
7 querying stats from the firmware usually. Especially for some mt76 devices
8 support .net_fill_forward_path would bypass mac80211, which leads to tx BA
9 session timeout for certain clients.
11 Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
14 --- a/include/net/mac80211.h
15 +++ b/include/net/mac80211.h
16 @@ -5968,6 +5968,18 @@ void ieee80211_queue_delayed_work(struct
20 + * ieee80211_refresh_tx_agg_session_timer - Refresh a tx agg session timer.
21 + * @sta: the station for which to start a BA session
22 + * @tid: the TID to BA on.
24 + * This function allows low level driver to refresh tx agg session timer
25 + * to maintain BA session, the session level will still be managed by the
28 +void ieee80211_refresh_tx_agg_session_timer(struct ieee80211_sta *sta,
32 * ieee80211_start_tx_ba_session - Start a tx Block Ack session.
33 * @sta: the station for which to start a BA session
34 * @tid: the TID to BA on.
35 --- a/net/mac80211/agg-tx.c
36 +++ b/net/mac80211/agg-tx.c
37 @@ -552,6 +552,23 @@ void ieee80211_tx_ba_session_handle_star
38 ieee80211_send_addba_with_timeout(sta, tid_tx);
41 +void ieee80211_refresh_tx_agg_session_timer(struct ieee80211_sta *pubsta,
44 + struct sta_info *sta = container_of(pubsta, struct sta_info, sta);
45 + struct tid_ampdu_tx *tid_tx;
47 + if (WARN_ON_ONCE(tid >= IEEE80211_NUM_TIDS))
50 + tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]);
54 + tid_tx->last_tx = jiffies;
56 +EXPORT_SYMBOL(ieee80211_refresh_tx_agg_session_timer);
59 * After accepting the AddBA Response we activated a timer,
60 * resetting it after each frame that we send.