]> git.baikalelectronics.ru Git - kernel.git/commit
wifi: rtw89: rewrite decision on channel by entity state
authorZong-Zhe Yang <kevin_yang@realtek.com>
Tue, 9 Aug 2022 10:49:40 +0000 (18:49 +0800)
committerKalle Valo <kvalo@kernel.org>
Fri, 2 Sep 2022 08:29:00 +0000 (11:29 +0300)
commit348d937789922011a99e2ba38dd713aec6538aec
tree0cc14902e14bb9ddc9a53870d761d68e6b6a26fd
parent694582bb28a18e2b0612f357ac12ecd37003f1a2
wifi: rtw89: rewrite decision on channel by entity state

We need to invoke the callback of the changed band at the first
set_channel() after every power-off. Originally, we forced the
channel to be 0 when doing power-off, and then determined things
by comparing channel with 0.

However, deciding on such things by channel might be confusing.
It's also confusing to use this kind of decision when we consider
multiple channels in the follow-up patches. So, another flag,
entity_active, is added ahead to HAL to deal with this.

Besides, we also need to check if entity is active when we set
TX power.

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/20220809104952.61355-2-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/chan.h [new file with mode: 0644]
drivers/net/wireless/realtek/rtw89/core.c
drivers/net/wireless/realtek/rtw89/core.h
drivers/net/wireless/realtek/rtw89/mac.c
drivers/net/wireless/realtek/rtw89/regd.c
drivers/net/wireless/realtek/rtw89/sar.c