brcmfmac: initialize escan function pointer during scheduled scan
authorArend van Spriel <arend@broadcom.com>
Mon, 13 Jan 2014 21:20:28 +0000 (22:20 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 16 Jan 2014 19:55:41 +0000 (14:55 -0500)
For scheduled scan results the driver does a escan to obtain BSS
details from the firmware. However, the escan uses a dynamically
determined function. This needs to be set appropriately when handling
scheduled scan results to avoid NULL pointer access.

Reviewed-by: Franky Lin <frankyl@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@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

index aad83ae..d7718a5 100644 (file)
@@ -2989,6 +2989,7 @@ brcmf_notify_sched_scan_results(struct brcmf_if *ifp,
                }
 
                set_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status);
+               cfg->escan_info.run = brcmf_run_escan;
                err = brcmf_do_escan(cfg, wiphy, ifp, request);
                if (err) {
                        clear_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status);