]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: rtw89: mcc: use anchor pattern when bcn offset less than min of tob
authorChih-Kang Chang <gary.chang@realtek.com>
Tue, 10 Jun 2025 13:00:32 +0000 (21:00 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Mon, 16 Jun 2025 05:35:57 +0000 (13:35 +0800)
When the beacon offset is less than minimum of auxiliary tob
(aux->duration - aux->limit.max_toa), the upper bound of the reference
toa might be negative and lower than the lower bound, which causes the
auxiliary result to exceed the NoA limit. Therefore, in this case, the
anchor pattern is used for calculation.

Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20250610130034.14692-11-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/chan.c

index c83c4036151db0cb7454f91b45369a28eafb8643..2a77b1978c380b29c38d74c2c4c7c511021c222b 100644 (file)
@@ -1273,6 +1273,8 @@ static int __rtw89_mcc_calc_pattern_anchor(struct rtw89_dev *rtwdev,
 
        if (bcn_ofst < RTW89_MCC_MIN_RX_BCN_TIME)
                small_bcn_ofst = true;
+       else if (bcn_ofst < aux->duration - aux->limit.max_toa)
+               small_bcn_ofst = true;
        else if (mcc_intvl - bcn_ofst < RTW89_MCC_MIN_RX_BCN_TIME)
                small_bcn_ofst = false;
        else