From 2563e838ea1e04368067a7c8180be7fb9f30e7c3 Mon Sep 17 00:00:00 2001 From: Ajit Pal Singh Date: Thu, 4 May 2017 22:58:42 +0530 Subject: [PATCH] qcacmn: Use macro WLAN_POLICY_MGR_ENABLE around policy_mgr API usage Policy manager API usage in common scan module should be enclosed in macro WLAN_POLICY_MGR_ENABLE, so that it can be optionally used along with policy manager. Change-Id: I76602657b4945a973f30d6b129a6b3896b9fdf9e CRs-Fixed: 2042734 --- os_if/linux/scan/src/wlan_cfg80211_scan.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/os_if/linux/scan/src/wlan_cfg80211_scan.c b/os_if/linux/scan/src/wlan_cfg80211_scan.c index 63269b128d0a..eac5daf29a14 100644 --- a/os_if/linux/scan/src/wlan_cfg80211_scan.c +++ b/os_if/linux/scan/src/wlan_cfg80211_scan.c @@ -34,7 +34,9 @@ #include #include #include +#ifdef WLAN_POLICY_MGR_ENABLE #include +#endif #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)) static uint32_t hdd_config_sched_scan_start_delay( @@ -973,17 +975,19 @@ int wlan_cfg80211_scan(struct wlan_objmgr_pdev *pdev, if (request->n_channels) { char chl[(request->n_channels * 5) + 1]; int len = 0; +#ifdef WLAN_POLICY_MGR_ENABLE bool ap_or_go_present = policy_mgr_mode_specific_connection_count( psoc, QDF_SAP_MODE, NULL) || policy_mgr_mode_specific_connection_count( psoc, QDF_P2P_GO_MODE, NULL); +#endif for (i = 0; i < request->n_channels; i++) { channel = request->channels[i]->hw_value; if (wlan_is_dsrc_channel(wlan_chan_to_freq(channel))) continue; - +#ifdef WLAN_POLICY_MGR_ENABLE if (ap_or_go_present) { bool ok; int ret; @@ -1001,6 +1005,7 @@ int wlan_cfg80211_scan(struct wlan_objmgr_pdev *pdev, if (!ok) continue; } +#endif len += snprintf(chl + len, 5, "%d ", channel); req->scan_req.chan_list[i] = wlan_chan_to_freq(channel);