Ver código fonte

qcacld-3.0: Refine API wlansap_get_dfs_nol()

See change "qcacld-3.0: Refine API wlansap_open()" for the API history.
Update wlansap_get_dfs_nol() to use the true struct pointer type.

Change-Id: I4a430915f8e1cb5378f80e5d6cb34690e33160ea
CRs-Fixed: 2116267
Jeff Johnson 7 anos atrás
pai
commit
b26e270d4e
2 arquivos alterados com 19 adições e 16 exclusões
  1. 13 1
      core/sap/inc/sap_api.h
  2. 6 15
      core/sap/src/sap_module.c

+ 13 - 1
core/sap/inc/sap_api.h

@@ -1305,7 +1305,19 @@ QDF_STATUS wlansap_reset_sap_config_add_ie(tsap_Config_t *pConfig,
 void wlansap_extend_to_acs_range(tHalHandle hal, uint8_t *startChannelNum,
 		uint8_t *endChannelNum, uint8_t *bandStartChannel,
 		uint8_t *bandEndChannel);
-QDF_STATUS wlansap_get_dfs_nol(void *pSapCtx, uint8_t *nol, uint32_t *nol_len);
+
+/**
+ * wlansap_get_dfs_nol() - Get the DFS NOL
+ * @sap_ctx: SAP context
+ * @nol: Pointer to the NOL
+ * @nol_len: Length of the NOL
+ *
+ * Provides the DFS NOL
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS wlansap_get_dfs_nol(struct sap_context *sap_ctx,
+			       uint8_t *nol, uint32_t *nol_len);
 
 /**
  * wlansap_set_dfs_nol() - Set dfs nol

+ 6 - 15
core/sap/src/sap_module.c

@@ -2511,20 +2511,11 @@ QDF_STATUS wlan_sap_set_vendor_acs(void *ctx, bool is_vendor_acs)
 
 	return QDF_STATUS_SUCCESS;
 }
-/**
- * wlansap_get_dfs_nol() - Get the DFS NOL
- * @pSapCtx: SAP context
- * @nol: Pointer to the NOL
- * @nol_len: Length of the NOL
- *
- * Provides the DFS NOL
- *
- * Return: QDF_STATUS
- */
-QDF_STATUS wlansap_get_dfs_nol(void *pSapCtx, uint8_t *nol, uint32_t *nol_len)
+
+QDF_STATUS wlansap_get_dfs_nol(struct sap_context *sap_ctx,
+			       uint8_t *nol, uint32_t *nol_len)
 {
 	int i = 0, j = 0;
-	struct sap_context *sapContext = pSapCtx;
 	void *hHal = NULL;
 	tpAniSirGlobal pMac = NULL;
 	uint64_t current_time, found_time, elapsed_time;
@@ -2533,15 +2524,15 @@ QDF_STATUS wlansap_get_dfs_nol(void *pSapCtx, uint8_t *nol, uint32_t *nol_len)
 	bool bAvailable = false;
 	*nol_len = 0;
 
-	if (NULL == sapContext) {
+	if (NULL == sap_ctx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
-			  "%s: Invalid SAP pointer from p_cds_gctx", __func__);
+			  "%s: Invalid SAP pointer", __func__);
 		return QDF_STATUS_E_FAULT;
 	}
 	hHal = CDS_GET_HAL_CB();
 	if (NULL == hHal) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
-			  "%s: Invalid HAL pointer from p_cds_gctx", __func__);
+			  "%s: Invalid HAL pointer", __func__);
 		return QDF_STATUS_E_FAULT;
 	}
 	pMac = PMAC_STRUCT(hHal);