Просмотр исходного кода

qcacld-3.0: Reset cac state before precac sap start

Host creates a precac adapter and uses it for all the precac
request instances from userspace. To avoid cac state impact
of previous instance on current precac request, reset the
cac_state before starting a prepcac adapter.

Change-Id: I8bb7a2d10350eeeafaac9bea60947a52a1e8686e
CRs-Fixed: 2970505
Abhishek Ambure 3 лет назад
Родитель
Сommit
1d037f5650
3 измененных файлов с 16 добавлено и 2 удалено
  1. 3 0
      core/hdd/src/wlan_hdd_sap_cond_chan_switch.c
  2. 11 0
      core/sap/inc/sap_api.h
  3. 2 2
      core/sap/src/sap_fsm.c

+ 3 - 0
core/hdd/src/wlan_hdd_sap_cond_chan_switch.c

@@ -283,6 +283,9 @@ static int __wlan_hdd_request_pre_cac(struct hdd_context *hdd_ctx,
 		}
 	}
 
+	sap_clear_global_dfs_param(mac_handle,
+				   WLAN_HDD_GET_SAP_CTX_PTR(pre_cac_adapter));
+
 	/*
 	 * This interface is internally created by the driver. So, no interface
 	 * up comes for this interface from user space and hence starting

+ 11 - 0
core/sap/inc/sap_api.h

@@ -1473,6 +1473,17 @@ void sap_get_cac_dur_dfs_region(struct sap_context *sap_ctx,
 				uint32_t *cac_duration_ms,
 				uint32_t *dfs_region);
 
+/**
+ * sap_clear_global_dfs_param() - Reset global dfs param of sap ctx
+ * @mac_handle: pointer to mac handle
+ * @sap_ctx: sap context
+ *
+ * This API resets global dfs param of sap ctx.
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS sap_clear_global_dfs_param(mac_handle_t mac_handle,
+				      struct sap_context *sap_ctx);
 
 /**
  * sap_dfs_set_current_channel() - Set current channel params in dfs component

+ 2 - 2
core/sap/src/sap_fsm.c

@@ -1111,8 +1111,8 @@ sap_find_valid_concurrent_session(mac_handle_t mac_handle)
 	return NULL;
 }
 
-static QDF_STATUS sap_clear_global_dfs_param(mac_handle_t mac_handle,
-					     struct sap_context *sap_ctx)
+QDF_STATUS sap_clear_global_dfs_param(mac_handle_t mac_handle,
+				      struct sap_context *sap_ctx)
 {
 	struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
 	struct sap_context *con_sap_ctx;