wifi: rtw89: chan: MCC take reconfig into account
authorZong-Zhe Yang <kevin_yang@realtek.com>
Tue, 6 Feb 2024 03:06:24 +0000 (11:06 +0800)
committerKalle Valo <kvalo@kernel.org>
Mon, 12 Feb 2024 15:37:09 +0000 (17:37 +0200)
commit162bf67f74c71d56889c1c938d7901cfb76e2cbd
treec621ef871999c373946a92b0a133aaa1d8924e6c
parent1ae9fbaf22ee82bb3ed47ac12ea92dbb7c51769f
wifi: rtw89: chan: MCC take reconfig into account

During mac80211 reconfig, chanctx ops of multiple channels might not
be called in order as normal cases. However, we expect the first active
chanctx always to be put at our sub entity index 0. So, if it does not,
we do a swap there. Besides, reconfig won't allocate a new chanctx object.
So, we should reset the reference count when ops add chanctx.

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://msgid.link/20240206030624.23382-7-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/chan.c