Browse Source

qcacmn: Update for policy manager frequency based APIs

Due to channel number ambiguity with introduction of 6Ghz operation
policy manager APIs are updated to use frequency values instead
of channel number. Update corresponding caller functions to
adapt for frequency usage.

Change-Id: I6c7566e1d99671a4324bd739ab8d26595d88956d
CRs-fixed: 2545125
Manikandan Mohan 5 years ago
parent
commit
0f13d10c75

+ 2 - 1
umac/scan/core/src/wlan_scan_bss_score.c

@@ -649,7 +649,8 @@ static uint32_t scm_get_sta_nss(struct wlan_objmgr_psoc *psoc,
 	 * NSS as 2*2.
 	 */
 
-	if (policy_mgr_is_chnl_in_diff_band(psoc, bss_channel) &&
+	if (policy_mgr_is_chnl_in_diff_band(
+	    psoc, wlan_chan_to_freq(bss_channel)) &&
 	    policy_mgr_is_hw_dbs_capable(psoc) &&
 	    !(policy_mgr_is_hw_dbs_2x2_capable(psoc)))
 		return 1;

+ 4 - 4
umac/scan/core/src/wlan_scan_manager.c

@@ -712,10 +712,10 @@ static void scm_req_update_concurrency_params(struct wlan_objmgr_vdev *vdev,
 	}
 
 	if (ap_present) {
-		uint8_t ap_chan;
+		uint8_t ap_chan_freq;
 		struct wlan_objmgr_pdev *pdev = wlan_vdev_get_pdev(vdev);
 
-		ap_chan = policy_mgr_get_channel(psoc, PM_SAP_MODE, NULL);
+		ap_chan_freq = policy_mgr_get_channel(psoc, PM_SAP_MODE, NULL);
 		/*
 		 * P2P/STA scan while SoftAP is sending beacons.
 		 * Max duration of CTS2self is 32 ms, which limits the
@@ -729,7 +729,7 @@ static void scm_req_update_concurrency_params(struct wlan_objmgr_vdev *vdev,
 					SCAN_ROAM_SCAN_CHANNEL_SWITCH_TIME));
 			if (!policy_mgr_is_hw_dbs_capable(psoc) ||
 			    (policy_mgr_is_hw_dbs_capable(psoc) &&
-			     WLAN_CHAN_IS_5GHZ(ap_chan))) {
+			     WLAN_REG_IS_5GHZ_CH_FREQ(ap_chan_freq))) {
 				req->scan_req.dwell_time_passive =
 					req->scan_req.dwell_time_active;
 			}
@@ -739,7 +739,7 @@ static void scm_req_update_concurrency_params(struct wlan_objmgr_vdev *vdev,
 				scan_obj->scan_def.ap_scan_burst_duration;
 		} else {
 			req->scan_req.burst_duration = 0;
-			if (utils_is_dfs_ch(pdev, ap_chan))
+			if (wlan_reg_is_dfs_for_freq(pdev, ap_chan_freq))
 				req->scan_req.burst_duration =
 					SCAN_BURST_SCAN_MAX_NUM_OFFCHANNELS *
 					req->scan_req.dwell_time_active;