From be68e7fa0628e5a9280b2cfccc2da18d129c1250 Mon Sep 17 00:00:00 2001 From: Basamma Yakkanahalli Date: Tue, 17 Jul 2018 17:46:36 +0530 Subject: [PATCH] qcacmn: Add support to enable strict passive scan Normally probe request is sent in a passive channel if the beacon received from the AP. With the strict passive scan feature, STA doesnot send the probe request even if it receives beacon from AP. This can be enabled by using below command. iwpriv /cfg80211 wifix pas_scanen 1/0 Added a support to send strict passive scan flag to FW in cfg80211 framework during scan start command. Change-Id: Ia2c069872541dba64c3d11fc0b533c2d202ee898 CRs-Fixed: 2280181 --- os_if/linux/scan/inc/wlan_cfg80211_scan.h | 2 ++ os_if/linux/scan/src/wlan_cfg80211_scan.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/os_if/linux/scan/inc/wlan_cfg80211_scan.h b/os_if/linux/scan/inc/wlan_cfg80211_scan.h index 6a849cf2a8..919393ce74 100644 --- a/os_if/linux/scan/inc/wlan_cfg80211_scan.h +++ b/os_if/linux/scan/inc/wlan_cfg80211_scan.h @@ -121,12 +121,14 @@ struct scan_req { * @default_ie: default scan ie * @half_rate: Half rate flag * @quarter_rate: Quarter rate flag + * @strict_pscan: strict passive scan flag */ struct scan_params { uint8_t source; struct element_info default_ie; bool half_rate; bool quarter_rate; + bool strict_pscan; }; /** diff --git a/os_if/linux/scan/src/wlan_cfg80211_scan.c b/os_if/linux/scan/src/wlan_cfg80211_scan.c index f14c283e3b..ac70ac0595 100644 --- a/os_if/linux/scan/src/wlan_cfg80211_scan.c +++ b/os_if/linux/scan/src/wlan_cfg80211_scan.c @@ -1277,6 +1277,9 @@ int wlan_cfg80211_scan(struct wlan_objmgr_pdev *pdev, else if (params->quarter_rate) req->scan_req.scan_f_quarter_rate = true; + if (params->strict_pscan) + req->scan_req.scan_f_strict_passive_pch = true; + if ((request->n_ssids == 1) && request->ssids && !qdf_mem_cmp(&request->ssids[0], "DIRECT-", 7)) is_p2p_scan = true;