소스 검색

qcacmn: Follow spec for NL80211_CMD_START_SCHED_SCAN

qcacld-2.0 to qca-wifi-host-cmn propagation

If no SSID are passed to NL80211_CMD_START_SCHED_SCAN cmd,
interface spec requires that an active scan is not needed.
Therefore a passive scan is now requested by cfg80211_sched_scan_request
for this case.

Change-Id: I1b1b9232ffb9d8d5c0bc9a1d75145d39c9fe9e6b
CRs-Fixed: 902092
Manjeet Singh 8 년 전
부모
커밋
c73cd7db11
3개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      os_if/linux/scan/src/wlan_cfg80211_scan.c
  2. 2 0
      umac/scan/dispatcher/inc/wlan_scan_public_structs.h
  3. 2 0
      wmi/src/wmi_unified_tlv.c

+ 6 - 0
os_if/linux/scan/src/wlan_cfg80211_scan.c

@@ -507,6 +507,12 @@ int wlan_cfg80211_sched_scan_start(struct wlan_objmgr_pdev *pdev,
 			request->match_sets[i].rssi_thold;
 	}
 
+	/* set scan to passive if no SSIDs are specified in the request */
+	if (0 == request->n_ssids)
+		req->do_passive_scan = true;
+	else
+		req->do_passive_scan = false;
+
 	for (i = 0; i < request->n_ssids; i++) {
 		j = 0;
 		while (j < req->networks_cnt) {

+ 2 - 0
umac/scan/dispatcher/inc/wlan_scan_public_structs.h

@@ -965,6 +965,7 @@ struct nlo_mawc_params {
 /**
  * struct pno_scan_req_params - PNO Scan request structure
  * @networks_cnt: Number of networks
+ * @do_passive_scan: Flag to request passive scan to fw
  * @vdev_id: vdev id
  * @fast_scan_period: Fast Scan period
  * @slow_scan_period: Slow scan period
@@ -996,6 +997,7 @@ struct nlo_mawc_params {
  */
 struct pno_scan_req_params {
 	uint32_t networks_cnt;
+	bool     do_passive_scan;
 	uint32_t vdev_id;
 	uint32_t fast_scan_period;
 	uint32_t slow_scan_period;

+ 2 - 0
wmi/src/wmi_unified_tlv.c

@@ -7544,6 +7544,8 @@ static QDF_STATUS send_pno_start_cmd_tlv(wmi_unified_t wmi_handle,
 	cmd->active_dwell_time = pno->active_dwell_time;
 	cmd->passive_dwell_time = pno->passive_dwell_time;
 
+	if (pno->do_passive_scan)
+		cmd->flags |= WMI_NLO_CONFIG_SCAN_PASSIVE;
 	/* Copy scan interval */
 	cmd->fast_scan_period = pno->fast_scan_period;
 	cmd->slow_scan_period = pno->slow_scan_period;