On 13-1-2017 13:47, Arend van Spriel wrote: > Have proper request id filled in the SCHED_SCAN_RESULTS notification > toward user-space by having the driver provide it through the api. > > Reviewed-by: Hante Meuleman <hante.meuleman@xxxxxxxxxxxx> > Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@xxxxxxxxxxxx> > Reviewed-by: Franky Lin <franky.lin@xxxxxxxxxxxx> > Signed-off-by: Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx> > --- > drivers/net/wireless/ath/ath6kl/wmi.c | 2 +- > .../broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +- > drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c | 2 +- > include/net/cfg80211.h | 4 ++- > net/mac80211/scan.c | 2 +- > net/wireless/core.c | 1 - > net/wireless/core.h | 1 - > net/wireless/nl80211.c | 2 ++ > net/wireless/scan.c | 30 +++++++++++----------- > net/wireless/trace.h | 17 +++++++++--- > 10 files changed, 37 insertions(+), 26 deletions(-) > > diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c > index 84a6d12..04df853 100644 > --- a/drivers/net/wireless/ath/ath6kl/wmi.c > +++ b/drivers/net/wireless/ath/ath6kl/wmi.c > @@ -1082,7 +1082,7 @@ void ath6kl_wmi_sscan_timer(unsigned long ptr) > { > struct ath6kl_vif *vif = (struct ath6kl_vif *) ptr; > > - cfg80211_sched_scan_results(vif->ar->wiphy); > + cfg80211_sched_scan_results(vif->ar->wiphy, 0); > } > > static int ath6kl_wmi_bssinfo_event_rx(struct wmi *wmi, u8 *datap, int len, > diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c > index 8280f19..34d318e 100644 > --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c > +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c > @@ -766,7 +766,7 @@ s32 brcmf_notify_escan_complete(struct brcmf_cfg80211_info *cfg, > brcmf_dbg(SCAN, "scheduled scan completed\n"); > cfg->internal_escan = false; > if (!aborted) > - cfg80211_sched_scan_results(cfg_to_wiphy(cfg)); > + cfg80211_sched_scan_results(cfg_to_wiphy(cfg), 0); > } else if (scan_request) { > struct cfg80211_scan_info info = { > .aborted = aborted, > diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c b/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c > index 8548027..12b471f 100644 > --- a/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c > +++ b/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c > @@ -1201,7 +1201,7 @@ int mwifiex_process_sta_cmdresp(struct mwifiex_private *priv, u16 cmdresp_no, > break; > case HostCmd_CMD_802_11_BG_SCAN_QUERY: > ret = mwifiex_ret_802_11_scan(priv, resp); > - cfg80211_sched_scan_results(priv->wdev.wiphy); > + cfg80211_sched_scan_results(priv->wdev.wiphy, 0); > mwifiex_dbg(adapter, CMD, > "info: CMD_RESP: BG_SCAN result is ready!\n"); > break; > diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h > index 880a57a..17c78c4 100644 > --- a/include/net/cfg80211.h > +++ b/include/net/cfg80211.h > @@ -1677,6 +1677,7 @@ struct cfg80211_sched_scan_request { > u8 mac_addr_mask[ETH_ALEN] __aligned(2); > > /* internal */ > + struct work_struct results_wk; When this worker is queued I suppose we should avoid the scheduled scan request to be freed. Probable need cancel_work_sync() in cfg80211_del_sched_scan_req(). Regards, Arend