Răsfoiți Sursa

qcacld-3.0: Refine BW for SAP for concurrent case

When concurrent STA is present and DBS is capable:
If the concurrent channel is DFS channel, make sure
the maximum SAP BW is equal or less than BW of STA;
If it's NOT, and the maximum SAP BW to be set is 160MHz,
reduce it to 80MHz.

Change-Id: Id2460b9d316bf7b91175611687bada0da11d5a93
CRs-Fixed: 3032225
Yu Wang 3 ani în urmă
părinte
comite
8a23dab257
1 a modificat fișierele cu 12 adăugiri și 5 ștergeri
  1. 12 5
      core/sap/src/sap_module.c

+ 12 - 5
core/sap/src/sap_module.c

@@ -576,7 +576,19 @@ enum phy_ch_width wlan_sap_get_concurrent_bw(struct wlan_objmgr_pdev *pdev,
 							&sta_vdev_id,
 							con_ch_freq,
 							&sta_ch_width);
+	if (sta_present) {
+		sta_chan_width = policy_mgr_get_ch_width(sta_ch_width);
+		if (wlan_reg_is_dfs_for_freq(pdev, con_ch_freq) ||
+		    sta_chan_width == CH_WIDTH_160MHZ)
+			is_con_chan_dfs = true;
+	}
+
 	if (policy_mgr_is_hw_dbs_capable(psoc)) {
+		if (is_con_chan_dfs)
+			channel_width = QDF_MIN(sta_chan_width, channel_width);
+		else if (sta_present && channel_width == CH_WIDTH_160MHZ)
+			channel_width = CH_WIDTH_80MHZ;
+
 		policy_mgr_get_sta_sap_scc_on_dfs_chnl(
 					psoc, &sta_sap_scc_on_dfs_chnl);
 		if (sta_sap_scc_on_dfs_chnl ==
@@ -607,11 +619,6 @@ enum phy_ch_width wlan_sap_get_concurrent_bw(struct wlan_objmgr_pdev *pdev,
 	if (!sta_present)
 		return CH_WIDTH_80MHZ;
 
-	sta_chan_width = policy_mgr_get_ch_width(sta_ch_width);
-	if (wlan_reg_is_dfs_for_freq(pdev, con_ch_freq) ||
-	    sta_chan_width == CH_WIDTH_160MHZ)
-		is_con_chan_dfs = true;
-
 	/* if STA not on DFS return max of BW and 80MHZ */
 	if (!is_con_chan_dfs)
 		return  QDF_MAX(sta_chan_width, CH_WIDTH_80MHZ);