Procházet zdrojové kódy

qcacld-3.0: Refine API sap_cleanup_channel_list()

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

Change-Id: Iea5bc4d9f2b94622a87e66bd4e0f41b9fab54a64
CRs-Fixed: 2116267
Jeff Johnson před 7 roky
rodič
revize
e5124bba52
2 změnil soubory, kde provedl 10 přidání a 28 odebrání
  1. 9 1
      core/sap/inc/sap_api.h
  2. 1 27
      core/sap/src/sap_ch_select.c

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

@@ -848,7 +848,15 @@ QDF_STATUS wlansap_start(struct sap_context *pSapCtx,
  */
 QDF_STATUS wlansap_stop(struct sap_context *pSapCtx);
 
-void sap_cleanup_channel_list(void *sapContext);
+/**
+ * sap_cleanup_channel_list() - cleanup channel list.
+ * @pSapCtx: Pointer to the SAP context
+ *
+ * Frees up the memory allocated to the channel list.
+ *
+ * Return: None
+ */
+void sap_cleanup_channel_list(struct sap_context *pSapCtx);
 
 /**
  * sap_is_auto_channel_select() - is channel AUTO_CHANNEL_SELECT

+ 1 - 27
core/sap/src/sap_ch_select.c

@@ -484,38 +484,12 @@ void sap_update_unsafe_channel_list(tHalHandle hal, struct sap_context *pSapCtx)
 
 #endif /* FEATURE_WLAN_CH_AVOID */
 
-/*==========================================================================
-   FUNCTION    sap_cleanup_channel_list
-
-   DESCRIPTION
-    Function sap_cleanup_channel_list frees up the memory allocated to the channel list.
-
-   DEPENDENCIES
-    NA.
-
-   PARAMETERS
-
-    IN
-    NULL
-
-   RETURN VALUE
-    NULL
-   ============================================================================*/
-
-void sap_cleanup_channel_list(void *p_cds_gctx)
+void sap_cleanup_channel_list(struct sap_context *pSapCtx)
 {
-	struct sap_context *pSapCtx;
 
 	QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
 		  "Cleaning up the channel list structure");
 
-	if (NULL == p_cds_gctx) {
-		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_FATAL,
-			  "SAP Global Context is NULL");
-		return;
-	}
-
-	pSapCtx = CDS_GET_SAP_CB(p_cds_gctx);
 	if (NULL == pSapCtx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_FATAL,
 			  "SAP Context is NULL");