]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
wifi: rtw89: add flag check for power state
authorPo-Hao Huang <phhuang@realtek.com>
Tue, 11 Apr 2023 12:48:31 +0000 (20:48 +0800)
committerKalle Valo <kvalo@kernel.org>
Fri, 14 Apr 2023 12:11:23 +0000 (15:11 +0300)
commit6cfb6cc20a61aa17bdb5440459a3503a885ee913
tree81776acf8d49092dd7d605fc33dc87043107a7a8
parenta0e97ae3f3320a246a79db7372fc23a38556014e
wifi: rtw89: add flag check for power state

Use POWER_ON flag to make sure power on/off is symmetric. Since both
remain_on_channel and hw_scan both alter the power state, this makes
sure that we don't enter/leave IPS mode twice.
Also, replace IPS related functions with inline function that does
similar logic so we can track it more easily.

Signed-off-by: Po-Hao Huang <phhuang@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/20230411124832.14965-5-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/core.c
drivers/net/wireless/realtek/rtw89/ps.c