Jelajahi Sumber

qcacld-3.0: Refine API wlansap_disassoc_sta()

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

Change-Id: I20209f92b7313026aee712a639f3605619255079
CRs-Fixed: 2116267
Jeff Johnson 7 tahun lalu
induk
melakukan
92e867c568
2 mengubah file dengan 14 tambahan dan 21 penghapusan
  1. 12 1
      core/sap/inc/sap_api.h
  2. 2 20
      core/sap/src/sap_module.c

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

@@ -979,8 +979,19 @@ uint16_t wlansap_check_cc_intf(struct sap_context *pSapCtx);
 QDF_STATUS wlansap_set_mac_acl(struct sap_context *pSapCtx,
 			       tsap_Config_t *pConfig);
 
-QDF_STATUS wlansap_disassoc_sta(void *p_cds_gctx,
+/**
+ * wlansap_disassoc_sta() - initiate disassociation of station.
+ * @pSapCtx: Pointer to the SAP context
+ * @p_del_sta_params: pointer to station deletion parameters
+ *
+ * This api function provides for Ap App/HDD initiated disassociation of station
+ *
+ * Return: The QDF_STATUS code associated with performing the operation
+ *         QDF_STATUS_SUCCESS:  Success
+ */
+QDF_STATUS wlansap_disassoc_sta(struct sap_context *pSapCtx,
 				struct tagCsrDelStaParams *p_del_sta_params);
+
 QDF_STATUS wlansap_deauth_sta(void *p_cds_gctx,
 			struct tagCsrDelStaParams *pDelStaParams);
 QDF_STATUS wlansap_set_channel_change_with_csa(void *p_cds_gctx,

+ 2 - 20
core/sap/src/sap_module.c

@@ -1139,30 +1139,12 @@ QDF_STATUS wlansap_modify_acl(struct sap_context *sap_ctx,
 	return QDF_STATUS_SUCCESS;
 }
 
-/**
- * wlansap_disassoc_sta() - initiate disassociation of station.
- * @pCtx: Pointer to the global cds context; a handle to SAP's control block
- *        can be extracted from its context. When MBSSID feature is enabled,
- *        SAP context is directly passed to SAP APIs.
- * @p_del_sta_params: pointer to station deletion parameters
- *
- * This api function provides for Ap App/HDD initiated disassociation of station
- *
- * Return: The QDF_STATUS code associated with performing the operation
- *         QDF_STATUS_SUCCESS:  Success
- */
-QDF_STATUS wlansap_disassoc_sta(void *pCtx,
+QDF_STATUS wlansap_disassoc_sta(struct sap_context *pSapCtx,
 				struct tagCsrDelStaParams *p_del_sta_params)
 {
-	struct sap_context *pSapCtx = CDS_GET_SAP_CB(pCtx);
-
-	/*------------------------------------------------------------------------
-	   Sanity check
-	   Extract SAP control block
-	   ------------------------------------------------------------------------*/
 	if (NULL == pSapCtx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
-			  "%s: Invalid SAP pointer from pCtx", __func__);
+			  "%s: Invalid SAP pointer", __func__);
 		return QDF_STATUS_E_FAULT;
 	}