diff mbox series

[wireless-next,3/4] wifi: brcmfmac: Improve the delay during scan

Message ID 20250604091629.3943-4-ian.lin@infineon.com
State New
Headers show
Series wifi: brcmfmac: apmode related fix | expand

Commit Message

Lin Ian (CSS ICW ENG WFS SW WFSW 1) June 4, 2025, 9:16 a.m. UTC
From: Kurt Lee <kurt.lee@cypress.com>

wpa_supplicant sends NL80211_CMD_GET_SURVEY command every time after
normal scan, which causes brcmfmac surveying each channel again.
Currently brcmfmac implments brcmf_cfg80211_dump_survey focusing on AP
mode, thus this change will return the request other than AP mode.

Signed-off-by: Kurt Lee <kurt.lee@cypress.com>
Signed-off-by: Ian Lin <ian.lin@infineon.com>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Lin Ian (CSS ICW ENG WFS SW WFSW 1) June 6, 2025, 7:49 a.m. UTC | #1
On 6/4/2025 5:54 PM, Arend van Spriel wrote:
> Caution: This e-mail originated outside Infineon Technologies. Please 
> be cautious when sharing information or opening attachments especially 
> from unknown senders. Refer to our intranet 
> guide<https://intranet-content.infineon.com/explore/aboutinfineon/rules/informationsecurity/ug/SocialEngineering/Pages/SocialEngineeringElements_en.aspx> 
> to help you identify Phishing email.
>
>
>
> On 6/4/2025 11:16 AM, Ian Lin wrote:
>> From: Kurt Lee <kurt.lee@cypress.com>
>>
>> wpa_supplicant sends NL80211_CMD_GET_SURVEY command every time after
>> normal scan, which causes brcmfmac surveying each channel again.
>> Currently brcmfmac implments brcmf_cfg80211_dump_survey focusing on AP
>> mode, thus this change will return the request other than AP mode.
>
> I am not sure if the driver should make this kind of decision. If
> wpa_supplicant wants to invoke a survey after a scan than we should
> simply comply and give what wpa_supplicant what it requests for. If you
> want to avoid the survey make it a configuration option in
> wpa_supplicant.conf.
>
Got it, ya it's much reasonable to make decision in wpa_supplicant.
We'll check what to do next.
Please abandon the change for now, thank you.

> Regards,
> Arend
>
>> Signed-off-by: Kurt Lee <kurt.lee@cypress.com>
>> Signed-off-by: Ian Lin <ian.lin@infineon.com>
>> ---
>>   drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 3 +++
>>   1 file changed, 3 insertions(+
Regards,
Ian
diff mbox series

Patch

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index 820dc5fee730..e23cd6fc0f56 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -8122,6 +8122,9 @@  brcmf_cfg80211_dump_survey(struct wiphy *wiphy, struct net_device *ndev,
 
 	brcmf_dbg(TRACE, "Enter: channel idx=%d\n", idx);
 
+	if (!brcmf_is_apmode(ifp->vif))
+		return -ENOENT;
+
 	/* Do not run survey when VIF in CONNECTING / CONNECTED states */
 	if ((test_bit(BRCMF_VIF_STATUS_CONNECTING, &ifp->vif->sme_state)) ||
 	    (test_bit(BRCMF_VIF_STATUS_CONNECTED, &ifp->vif->sme_state))) {