wifi: rtw89: chan: re-config default chandef only when none is registered
authorZong-Zhe Yang <kevin_yang@realtek.com>
Thu, 5 Jun 2025 11:42:04 +0000 (19:42 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Tue, 10 Jun 2025 01:45:40 +0000 (09:45 +0800)
commit6c661eec292cd62a7c7abced8e91fc1b6ebf7f3a
tree3bf065d51cb87b4ab8beb7baee6ad41b7bbd86ae
parent6cd93f85af7a1573c2fdb1da8977cd200a1c157e
wifi: rtw89: chan: re-config default chandef only when none is registered

Previously, default chandef is configured if no chanctx is active, i.e. no
chanctx is assigned to some vif. For normal cases, it's fine. However, for
impending CSA support, need to consider that one chanctx may be added, or
called registered, ahead without being assigned immediately. Then, it will
keep inactive, and might be covered by the default one when re-calculating
chanctxs happens in certain sequences. So now, don't re-config the default
chandef unless no chanctx is registered.

Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20250605114207.12381-3-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/chan.c
drivers/net/wireless/realtek/rtw89/chan.h