Kaynağa Gözat

qcacld-3.0: Refine API wlansap_is_channel_in_nol_list()

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

Change-Id: Ia15403523d27023f50d676f3c7099b018f7d21f7
CRs-Fixed: 2116267
Jeff Johnson 7 yıl önce
ebeveyn
işleme
bb4d77cb25
2 değiştirilmiş dosya ile 7 ekleme ve 9 silme
  1. 6 4
      core/sap/inc/sap_api.h
  2. 1 5
      core/sap/src/sap_module.c

+ 6 - 4
core/sap/inc/sap_api.h

@@ -874,14 +874,16 @@ typedef QDF_STATUS (*tpWLAN_SAPEventCB)(tpSap_Event pSapEvent,
 /**
  * wlansap_is_channel_in_nol_list() - This API checks if channel is
  * in nol list
- * @ctx: context pointer
- * @channel: channel
+ * @pSapCtx: SAP context pointer
+ * @channelNumber: channel number
  * @chanBondState: channel bonding state
  *
- * Return: True/False
+ * Return: True if the channel is in the NOL list, false otherwise
  */
-bool wlansap_is_channel_in_nol_list(void *p_cds_gctx, uint8_t channel_no,
+bool wlansap_is_channel_in_nol_list(struct sap_context *pSapCtx,
+				    uint8_t channelNumber,
 				    ePhyChanBondState chanBondState);
+
 /**
  * wlansap_is_channel_leaking_in_nol() - This API checks if channel is leaking
  * in nol list

+ 1 - 5
core/sap/src/sap_module.c

@@ -420,14 +420,10 @@ QDF_STATUS wlansap_close(struct sap_context *pSapCtx)
 	return QDF_STATUS_SUCCESS;
 } /* wlansap_close */
 
-bool wlansap_is_channel_in_nol_list(void *p_cds_gctx,
+bool wlansap_is_channel_in_nol_list(struct sap_context *pSapCtx,
 				    uint8_t channelNumber,
 				    ePhyChanBondState chanBondState)
 {
-	struct sap_context *pSapCtx = NULL;
-
-	pSapCtx = CDS_GET_SAP_CB(p_cds_gctx);
-
 	if (!pSapCtx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
 			  "%s: Invalid SAP pointer from pCtx", __func__);