wifi: rtw89: refine remain on channel flow to improve P2P connection
authorChih-Kang Chang <gary.chang@realtek.com>
Wed, 29 Nov 2023 07:00:45 +0000 (15:00 +0800)
committerKalle Valo <kvalo@kernel.org>
Fri, 1 Dec 2023 12:43:14 +0000 (14:43 +0200)
commite46987ce819d9c531b3389d487ae135fc54da494
treed2a4caa72929be9b54a37483c21991a47537e991
parent2f3eaccc662122704f70bfef1d02a78239033b85
wifi: rtw89: refine remain on channel flow to improve P2P connection

We add a scanning check to avoid entering IPS after ROC (remain on
channel) during scanning. Additionally, When P2P scanning, the flow is
`1. p2p_listen step` and `2. configure filter` and `3. p2p_scan starts`
in wpas, but in kernel, cfg80211 uses another workqueue to notify driver
the filter change, so sometimes we see (1 > 3 > 2), that will cause Rx
filter related to scan to be cleared. Therefore, we add a scanning check
when configure filter to avoid scan results to be filtered. Finally, we
cancel the ROC delayed workqueue before entering ROC to avoid entering
twice, which might cause leaving ROC too early.

Signed-off-by: Chih-Kang Chang <gary.chang@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/20231129070046.18443-4-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/core.c
drivers/net/wireless/realtek/rtw89/mac80211.c
drivers/net/wireless/realtek/rtw89/ps.h