]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
brcmfmac: allow scanning to be suppressed in the driver
authorArend van Spriel <arend@broadcom.com>
Tue, 23 Apr 2013 10:53:11 +0000 (12:53 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 23 Apr 2013 18:14:55 +0000 (14:14 -0400)
During the DHCP protocol exchange it is benificial to suppress
scan requests which may decrease time to complete DHCP protocol.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h

index ba92d6d7dfdd62d9c519272a04eecd5d3e760fe4..29b4ea43a40fca97818c5713254d629391ac92ad 100644 (file)
@@ -856,6 +856,11 @@ brcmf_cfg80211_escan(struct wiphy *wiphy, struct brcmf_cfg80211_vif *vif,
                          cfg->scan_status);
                return -EAGAIN;
        }
+       if (test_bit(BRCMF_SCAN_STATUS_SUPPRESS, &cfg->scan_status)) {
+               brcmf_err("Scanning suppressed: status (%lu)\n",
+                         cfg->scan_status);
+               return -EAGAIN;
+       }
        if (test_bit(BRCMF_VIF_STATUS_CONNECTING, &ifp->vif->sme_state)) {
                brcmf_err("Connecting: status (%lu)\n", ifp->vif->sme_state);
                return -EAGAIN;
@@ -3017,6 +3022,11 @@ brcmf_cfg80211_sched_scan_start(struct wiphy *wiphy,
                brcmf_err("Scanning already: status (%lu)\n", cfg->scan_status);
                return -EAGAIN;
        }
+       if (test_bit(BRCMF_SCAN_STATUS_SUPPRESS, &cfg->scan_status)) {
+               brcmf_err("Scanning suppressed: status (%lu)\n",
+                         cfg->scan_status);
+               return -EAGAIN;
+       }
 
        if (!request->n_ssids || !request->n_match_sets) {
                brcmf_err("Invalid sched scan req!! n_ssids:%d\n",
index 0b9263e7dca4f92bb404743296aa9dee16a914f2..e1983464e847d43b851911bd137d8dd00ee951f3 100644 (file)
 
 
 /**
- * enum brcmf_scan_status - dongle scan status
+ * enum brcmf_scan_status - scan engine status
  *
  * @BRCMF_SCAN_STATUS_BUSY: scanning in progress on dongle.
  * @BRCMF_SCAN_STATUS_ABORT: scan being aborted on dongle.
+ * @BRCMF_SCAN_STATUS_SUPPRESS: scanning is suppressed in driver.
  */
 enum brcmf_scan_status {
        BRCMF_SCAN_STATUS_BUSY,
        BRCMF_SCAN_STATUS_ABORT,
+       BRCMF_SCAN_STATUS_SUPPRESS,
 };
 
 /**