diff options
| author | Zong-Zhe Yang <kevin_yang@realtek.com> | 2025-04-22 09:46:16 +0800 |
|---|---|---|
| committer | Ping-Ke Shih <pkshih@realtek.com> | 2025-04-28 14:38:39 +0800 |
| commit | b8a2f9e0fab913751fbba1d452850d5cbdc633cf (patch) | |
| tree | 64e0b87adc148c4f10f8ef68b97f54e37e87fa33 | |
| parent | 50f9dc17a18180497f97d9d85541bf038bb1b0e3 (diff) | |
| download | linux-b8a2f9e0fab913751fbba1d452850d5cbdc633cf.tar.gz linux-b8a2f9e0fab913751fbba1d452850d5cbdc633cf.zip | |
wifi: rtw89: mcc: handle the case where NoA start time has passed
MCC will limit the time a role can use in a schedule according to the
periodic NoA. Original logic didn't consider the case where NoA start
time has passed. It might lead to inaccurate result. So, tweak it.
Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20250422014620.18421-9-pkshih@realtek.com
| -rw-r--r-- | drivers/net/wireless/realtek/rtw89/chan.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtw89/chan.c b/drivers/net/wireless/realtek/rtw89/chan.c index b5fb5669eefe..530f8c52efe8 100644 --- a/drivers/net/wireless/realtek/rtw89/chan.c +++ b/drivers/net/wireless/realtek/rtw89/chan.c @@ -787,6 +787,9 @@ fill: } tsf_lmt = (tsf & GENMASK_ULL(63, 32)) | start_time; + if (tsf_lmt < tsf) + tsf_lmt += roundup_u64(tsf - tsf_lmt, interval); + max_toa_us = rtw89_mcc_get_tbtt_ofst(rtwdev, mcc_role, tsf_lmt); max_dur_us = interval - duration; max_tob_us = max_dur_us - max_toa_us; |
