brcmfmac: On scan timeout do send received results.
authorHante Meuleman <meuleman@broadcom.com>
Tue, 30 Sep 2014 08:23:13 +0000 (10:23 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 30 Sep 2014 17:17:47 +0000 (13:17 -0400)
Increase driver scan timeout from 8 to 10 seconds and report results
to cfg80211. Without this patch the already received results were
dropped on driver timeout.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@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 12a60ca1462a24106fe2da3b9629b3ab91201ccb..6860501bc1794fc37ef3b206d842ba5b7127de8c 100644 (file)
@@ -2426,7 +2426,7 @@ static s32 brcmf_inform_bss(struct brcmf_cfg80211_info *cfg)
        s32 err = 0;
        int i;
 
-       bss_list = cfg->bss_list;
+       bss_list = (struct brcmf_scan_results *)cfg->escan_info.escan_buf;
        if (bss_list->count != 0 &&
            bss_list->version != BRCMF_BSS_INFO_VERSION) {
                brcmf_err("Version %d != WL_BSS_INFO_VERSION\n",
@@ -2602,6 +2602,7 @@ static void brcmf_cfg80211_escan_timeout_worker(struct work_struct *work)
                        container_of(work, struct brcmf_cfg80211_info,
                                     escan_timeout_work);
 
+       brcmf_inform_bss(cfg);
        brcmf_notify_escan_complete(cfg, cfg->escan_info.ifp, true, true);
 }
 
@@ -2740,12 +2741,9 @@ brcmf_cfg80211_escan_handler(struct brcmf_if *ifp,
                if (brcmf_p2p_scan_finding_common_channel(cfg, NULL))
                        goto exit;
                if (cfg->scan_request) {
-                       cfg->bss_list = (struct brcmf_scan_results *)
-                               cfg->escan_info.escan_buf;
                        brcmf_inform_bss(cfg);
                        aborted = status != BRCMF_E_STATUS_SUCCESS;
-                       brcmf_notify_escan_complete(cfg, ifp, aborted,
-                                                   false);
+                       brcmf_notify_escan_complete(cfg, ifp, aborted, false);
                } else
                        brcmf_dbg(SCAN, "Ignored scan complete result 0x%x\n",
                                  status);
index f9fb10998e7960d68ca03db0afbf2a7d84f780b2..82f8778a93fbb71f75e7444625176ddc9c0d5cbc 100644 (file)
@@ -35,7 +35,7 @@
 #define WL_SCAN_PASSIVE_TIME           120
 
 #define WL_ESCAN_BUF_SIZE              (1024 * 64)
-#define WL_ESCAN_TIMER_INTERVAL_MS     8000 /* E-Scan timeout */
+#define WL_ESCAN_TIMER_INTERVAL_MS     10000 /* E-Scan timeout */
 
 #define WL_ESCAN_ACTION_START          1
 #define WL_ESCAN_ACTION_CONTINUE       2
@@ -371,7 +371,6 @@ struct brcmf_cfg80211_info {
        struct brcmf_btcoex_info *btcoex;
        struct cfg80211_scan_request *scan_request;
        struct mutex usr_sync;
-       struct brcmf_scan_results *bss_list;
        struct brcmf_cfg80211_scan_req scan_req_int;
        struct wl_cfg80211_bss_info *bss_info;
        struct brcmf_cfg80211_ie ie;