Quellcode durchsuchen

qcacld-3.0: Add logic to force SCC in SAP+STA concurrency with ACS

If STA is up & SAP is comings up on a ACS derived channel causing MCC,
move SAP to the other band if DBS is supported. This logic is enabled
only if gWlanMccToSccSwitchMode is set to
QDF_MCC_TO_SCC_SWITCH_FORCE_WITHOUT_DISCONNECTION.

Change-Id: I48d809f83921292f51ca1735bff4c4d6dd339975
CRs-Fixed: 2063060
Tushnim Bhattacharyya vor 7 Jahren
Ursprung
Commit
03103fd070
3 geänderte Dateien mit 34 neuen und 9 gelöschten Zeilen
  1. 12 5
      core/hdd/src/wlan_hdd_hostapd.c
  2. 20 2
      core/sap/src/sap_ch_select.c
  3. 2 2
      core/sme/src/csr/csr_util.c

+ 12 - 5
core/hdd/src/wlan_hdd_hostapd.c

@@ -2703,6 +2703,7 @@ QDF_STATUS wlan_hdd_get_channel_for_sap_restart(
 	struct hdd_context *hdd_ctx;
 	hdd_station_ctx_t *hdd_sta_ctx;
 	hdd_adapter_t *sta_adapter;
+	uint8_t temp_channel = 0;
 	hdd_adapter_t *ap_adapter = wlan_hdd_get_adapter_from_vdev(
 					psoc, vdev_id);
 	if (!ap_adapter) {
@@ -2750,11 +2751,17 @@ QDF_STATUS wlan_hdd_get_channel_for_sap_restart(
 		!policy_mgr_is_safe_channel(psoc,
 			hdd_sta_ctx->conn_info.operationChannel)) {
 		if (policy_mgr_is_hw_dbs_capable(psoc)) {
-			if (WLAN_REG_IS_5GHZ_CH(
-				hdd_sta_ctx->conn_info.operationChannel))
-				intf_ch = CDS_24_GHZ_CHANNEL_6;
-			else
-				intf_ch = CDS_5_GHZ_CHANNEL_36;
+			temp_channel =
+				policy_mgr_get_alternate_channel_for_sap(psoc);
+			if (temp_channel) {
+				intf_ch = temp_channel;
+			} else {
+				if (WLAN_REG_IS_5GHZ_CH(
+					hdd_sta_ctx->conn_info.operationChannel))
+					intf_ch = CDS_24_GHZ_CHANNEL_6;
+				else
+					intf_ch = CDS_5_GHZ_CHANNEL_36;
+			}
 		} else {
 			hdd_debug("can't move sap to %d",
 				hdd_sta_ctx->conn_info.operationChannel);

+ 20 - 2
core/sap/src/sap_ch_select.c

@@ -2302,13 +2302,31 @@ uint8_t sap_select_channel(tHalHandle hal, ptSapContext sap_ctx,
 		if (best_ch_num == SAP_CHANNEL_NOT_SELECTED)
 			continue;
 
-		if (operating_band != eCSR_DOT11_MODE_11g)
+		if (operating_band != eCSR_DOT11_MODE_11g) {
+			QDF_TRACE(QDF_MODULE_ID_SAP,
+				QDF_TRACE_LEVEL_INFO_HIGH,
+				"operating_band %d", operating_band);
 			continue;
+		}
 
 		/* Give preference to Non-overlap channels */
 		if (false == sap_filter_over_lap_ch(sap_ctx,
-				spect_info->pSpectCh[count].chNum))
+				spect_info->pSpectCh[count].chNum)) {
+			QDF_TRACE(QDF_MODULE_ID_SAP,
+				QDF_TRACE_LEVEL_INFO_HIGH,
+				"sap_filter_over_lap_ch is false");
 			continue;
+		}
+
+		if (wlan_reg_is_dfs_ch(mac_ctx->pdev,
+				spect_info->pSpectCh[count].chNum) &&
+			policy_mgr_disallow_mcc(mac_ctx->psoc,
+				spect_info->pSpectCh[count].chNum)) {
+			QDF_TRACE(QDF_MODULE_ID_SAP,
+				QDF_TRACE_LEVEL_INFO_HIGH,
+				"No DFS MCC");
+			continue;
+		}
 
 		if (spect_info->pSpectCh[count].weight_copy >
 				sap_ctx->acsBestChannelInfo.weight)

+ 2 - 2
core/sme/src/csr/csr_util.c

@@ -593,7 +593,7 @@ bool csr_scan_active_ll_remove_entry(struct sAniSirGlobal *mac_ctx,
 	found_sme_cmd = &sme_cmd->Link;
 	if (found_sme_cmd == entry)
 		return true;
-	
+
 	return false;
 }
 
@@ -1273,7 +1273,7 @@ uint16_t csr_check_concurrent_channel_overlap(tpAniSirGlobal mac_ctx,
 			QDF_MCC_TO_SCC_SWITCH_FORCE_WITHOUT_DISCONNECTION) ||
 		(cc_switch_mode ==
 			QDF_MCC_TO_SCC_SWITCH_WITH_FAVORITE_CHANNEL))) {
-		if (!((intf_ch < 14 && sap_ch < 14) ||
+		if (!((intf_ch <= 14 && sap_ch <= 14) ||
 			(intf_ch > 14 && sap_ch > 14)))
 			intf_ch = 0;
 		else if (cc_switch_mode ==