Explorar el Código

qcacld-3.0: Don't disable DCS firmware event indication

Always enable DCS firmware wmi_dcs_interference_event_id event
indication as CCA feature requires, so dcs wmi enable command
doesn't need to be sent after dynamic ACS done. When all SAPs
are stopped, send dcs wmi disable command to disable dcs
firmware event indication.

Change-Id: Ida7aa95b364f7dd2dc7664b3036bf1e2c0c54a21
CRs-Fixed: 2804275
hqu hace 4 años
padre
commit
e6874ece11
Se han modificado 2 ficheros con 24 adiciones y 21 borrados
  1. 13 12
      core/hdd/src/wlan_hdd_dcs.c
  2. 11 9
      core/wma/src/wma_dev_if.c

+ 13 - 12
core/hdd/src/wlan_hdd_dcs.c

@@ -182,8 +182,7 @@ static void hdd_dcs_hostapd_enable_wlan_interference_mitigation(
 	if (wlansap_dcs_is_wlan_interference_mitigation_enabled(
 			WLAN_HDD_GET_SAP_CTX_PTR(adapter)) &&
 	    wlan_reg_is_5ghz_ch_freq(adapter->session.ap.operating_chan_freq))
-		ucfg_config_dcs_enable(hdd_ctx->psoc, mac_id, CAP_DCS_WLANIM);
-	ucfg_wlan_dcs_cmd(hdd_ctx->psoc, mac_id, true);
+		ucfg_config_dcs_event_data(hdd_ctx->psoc, mac_id, true);
 }
 
 void hdd_dcs_chan_select_complete(struct hdd_adapter *adapter)
@@ -222,16 +221,18 @@ void hdd_dcs_clear(struct hdd_adapter *adapter)
 
 	psoc = hdd_ctx->psoc;
 
-	if (wlansap_dcs_is_wlan_interference_mitigation_enabled(
-				WLAN_HDD_GET_SAP_CTX_PTR(adapter))) {
-		status = policy_mgr_get_mac_id_by_session_id(psoc,
-							     adapter->vdev_id,
-							     &mac_id);
-		if (QDF_IS_STATUS_ERROR(status)) {
-			hdd_err("get mac id failed");
-			return;
-		}
-		if (policy_mgr_get_sap_go_count_on_mac(psoc, list, mac_id) <= 1)
+	status = policy_mgr_get_mac_id_by_session_id(psoc, adapter->vdev_id,
+						     &mac_id);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		hdd_err("get mac id failed");
+		return;
+	}
+
+	if (policy_mgr_get_sap_go_count_on_mac(psoc, list, mac_id) <= 1) {
+		ucfg_config_dcs_disable(psoc, mac_id, CAP_DCS_WLANIM);
+		ucfg_wlan_dcs_cmd(psoc, mac_id, true);
+		if (wlansap_dcs_is_wlan_interference_mitigation_enabled(
+					WLAN_HDD_GET_SAP_CTX_PTR(adapter)))
 			ucfg_dcs_clear(psoc, mac_id);
 	}
 

+ 11 - 9
core/wma/src/wma_dev_if.c

@@ -1059,7 +1059,7 @@ static void wma_dcs_clear_vdev_starting(struct mac_context *mac_ctx,
  * interference mitigation
  * @mac_ctx: mac context
  * @mac_id: mac id
- * @vdev_id: vdev id
+ * @rsp: vdev start response
  *
  * This function is used to enable wlan interference mitigation through
  * send dcs command
@@ -1069,14 +1069,14 @@ static void wma_dcs_clear_vdev_starting(struct mac_context *mac_ctx,
 static void wma_dcs_wlan_interference_mitigation_enable(
 					struct mac_context *mac_ctx,
 					uint32_t mac_id,
-					uint32_t vdev_id)
+					struct vdev_start_response *rsp)
 {
 	int vdev_index;
 	uint32_t list[MAX_NUMBER_OF_CONC_CONNECTIONS];
 	uint32_t count;
 	bool wlan_interference_mitigation_enable =
 			mac_ctx->sap.dcs_info.
-				wlan_interference_mitigation_enable[vdev_id];
+			wlan_interference_mitigation_enable[rsp->vdev_id];
 
 	count = policy_mgr_get_sap_go_count_on_mac(
 			mac_ctx->psoc, list, mac_id);
@@ -1094,15 +1094,18 @@ static void wma_dcs_wlan_interference_mitigation_enable(
 	}
 
 	if (wlan_interference_mitigation_enable)
-		ucfg_config_dcs_enable(
-			mac_ctx->psoc, mac_id, CAP_DCS_WLANIM);
-	ucfg_wlan_dcs_cmd(mac_ctx->psoc, mac_id, true);
+		ucfg_config_dcs_event_data(mac_ctx->psoc, mac_id, true);
+
+	if (rsp->resp_type == WMI_HOST_VDEV_START_RESP_EVENT) {
+		ucfg_config_dcs_enable(mac_ctx->psoc, mac_id, CAP_DCS_WLANIM);
+		ucfg_wlan_dcs_cmd(mac_ctx->psoc, mac_id, true);
+	}
 }
 #else
 static void wma_dcs_wlan_interference_mitigation_enable(
 					struct mac_context *mac_ctx,
 					uint32_t mac_id,
-					uint32_t vdev_id)
+					struct vdev_start_response *rsp)
 {
 }
 
@@ -1234,8 +1237,7 @@ QDF_STATUS wma_vdev_start_resp_handler(struct vdev_mlme_obj *vdev_mlme,
 	if (wma_is_vdev_in_ap_mode(wma, rsp->vdev_id)) {
 		wma_dcs_clear_vdev_starting(mac_ctx, rsp->vdev_id);
 		wma_dcs_wlan_interference_mitigation_enable(mac_ctx,
-							    iface->mac_id,
-							    rsp->vdev_id);
+							    iface->mac_id, rsp);
 	}
 
 #ifdef FEATURE_AP_MCC_CH_AVOIDANCE