wifi: rtw89: chan: tweak bitmap recalc ahead before MLO
authorZong-Zhe Yang <kevin_yang@realtek.com>
Tue, 6 Feb 2024 03:06:21 +0000 (11:06 +0800)
committerKalle Valo <kvalo@kernel.org>
Mon, 12 Feb 2024 15:37:09 +0000 (17:37 +0200)
commitab12a3bfbf775182dc86ef8f70eab487c5deb761
tree8d18d7c1aa235176890a7d474673d25e83c7667a
parent4f0beeefcce8ad1035d063a012db6cf510aa1ed1
wifi: rtw89: chan: tweak bitmap recalc ahead before MLO

Originally, we just declared two sub-entity, and according to rolling
down mechanism, we ensured that index 0 contained sub-entity as long
as there are sub-entity. So, we could use for-loop after deciding the
last index.

But, we are preparing to expand num of sub-entity for MLO. Then, there
won't be just two sub-entity. And, there might be holes between two bits
in the bitmap. So, we cannot simply do for-loop as before. Instead, we
need to follow the set bits.

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