wifi: rtw89: mcc: consider and determine BT duration
authorZong-Zhe Yang <kevin_yang@realtek.com>
Thu, 31 Aug 2023 05:31:30 +0000 (13:31 +0800)
committerKalle Valo <kvalo@kernel.org>
Thu, 7 Sep 2023 05:55:39 +0000 (08:55 +0300)
commit7d1704640aadc70ef4676abe101d3f99ecc098a2
tree554fa8987a47b0d62fc91cb6ee5b4fbd125db00b
parent4dc25ef1916339f92456058f22836b0aa20f40da
wifi: rtw89: mcc: consider and determine BT duration

Before calculating MCC pattern, we have to determine whether to handle BT
duration in it or not. The decision will depend on the channels that Wi-Fi
roles use. And, we have three cases shown below.
1. non-2GHz + non-2GHz
2. non-2GHz + 2GHz (different band)
3. 2GHz + 2GHz (dual 2GHz)

For case (1), we don't care BT duration in MCC pattern. For case (2), we
still don't care BT duration in MCC pattern. Instead, we try to satisfy it
by modifying duration of Wi-Fi role on non-2GHz channel. For case (3), we
need to modify Wi-Fi durations and also need to handle BT duration in MCC
pattern.

Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230831053133.24015-4-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/chan.c