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

Ian Lin <[email protected]>
Newsgroups dev.linux.lists.brcm80211,org.kernel.vger.linux-wireless
Message-ID <[email protected]>
From: Kurt Lee <[email protected]>

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 <[email protected]>
Signed-off-by: Ian Lin <[email protected]>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 3 +++
 1 file changed, 3 insertions(+)

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))) {
-- 
2.25.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.