]> git.ipfire.org Git - thirdparty/linux.git/commit
wifi: rtw89: introduce beacon tracking to improve connection stability
authorKuan-Chung Chen <damon.chen@realtek.com>
Mon, 11 Aug 2025 12:37:37 +0000 (20:37 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Tue, 19 Aug 2025 01:00:29 +0000 (09:00 +0800)
commitd360551f265e3c942ce06cd6f4d2f7f67741bcbd
treea68bbe8b5d1b0cbe56bff3ae92654fdc403bcb98
parent5846154126541b27281fbc9aba0c8ee97e22597b
wifi: rtw89: introduce beacon tracking to improve connection stability

In ideal scenario, AP's beacon should transmit at the Target Beacon
Transmission Time (TBTT). However, in practice, beacon may be slightly
off-schedule. This beacon "drift" prevents the firmware from receiving
beacon at the expected TBTT, leading to connection disruptions.

To address this, we introduce beacon tracking mechanism to enhance overall
connection stability. This mechanism executes the following steps in each
cycle (2 seconds): 1) Based on the last 32 received beacons, compute the
minimum TBTT offset to use for the next cycle 2) Using the same 32 beacons,
calculate the drift of each. A histogram is plotted, and outliers are
identified using a boxplot. 3) According to the statistical results from
the second step, a maximum receive window size (beacon timeout) is selected
to cover approximately 80% of the beacons and applied to the next cycle.

Signed-off-by: Kuan-Chung Chen <damon.chen@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20250811123744.15361-2-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/core.c
drivers/net/wireless/realtek/rtw89/core.h
drivers/net/wireless/realtek/rtw89/fw.c
drivers/net/wireless/realtek/rtw89/fw.h
drivers/net/wireless/realtek/rtw89/mac.c
drivers/net/wireless/realtek/rtw89/phy.c
drivers/net/wireless/realtek/rtw89/ps.c