Pārlūkot izejas kodu

qcacld-3.0: Refine API wlansap_set_key_sta()

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

Change-Id: I401f5dcf04547b263daf89b75cd17a6768d9f1d5
CRs-Fixed: 2116267
Jeff Johnson 7 gadi atpakaļ
vecāks
revīzija
e6b25d9878
2 mainītis faili ar 16 papildinājumiem un 19 dzēšanām
  1. 12 2
      core/sap/inc/sap_api.h
  2. 4 17
      core/sap/src/sap_module.c

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

@@ -1023,8 +1023,18 @@ QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sapContext,
 					       enum phy_ch_width target_bw,
 					       bool strict);
 
-QDF_STATUS wlansap_set_key_sta(void *p_cds_gctx,
-	tCsrRoamSetKey *pSetKeyInfo);
+/**
+ * wlansap_set_key_sta() - set keys for a stations.
+ * @pSapCtx: Pointer to the SAP context
+ * @pSetKeyInfo : tCsrRoamSetKey structure for the station
+ *
+ * This api function provides for Ap App/HDD to set key for a station.
+ *
+ * Return: The QDF_STATUS code associated with performing the operation
+ *         QDF_STATUS_SUCCESS:  Success
+ */
+QDF_STATUS wlansap_set_key_sta(struct sap_context *pSapCtx,
+			       tCsrRoamSetKey *pSetKeyInfo);
 
 /**
  * wlan_sap_getstation_ie_information() - RSNIE Population

+ 4 - 17
core/sap/src/sap_module.c

@@ -1425,37 +1425,24 @@ QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sapContext,
 	return QDF_STATUS_SUCCESS;
 }
 
-/**
- * wlansap_set_key_sta() - set keys for a stations.
- * @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.
- * @pSetKeyInfo : tCsrRoamSetKey structure for the station
- *
- * This api function provides for Ap App/HDD to set key for a station.
- *
- * Return: The QDF_STATUS code associated with performing the operation
- *         QDF_STATUS_SUCCESS:  Success
- */
-QDF_STATUS wlansap_set_key_sta(void *pCtx, tCsrRoamSetKey *pSetKeyInfo)
+QDF_STATUS wlansap_set_key_sta(struct sap_context *pSapCtx,
+			       tCsrRoamSetKey *pSetKeyInfo)
 {
 	QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
-	struct sap_context *pSapCtx = NULL;
 	void *hHal = NULL;
 	QDF_STATUS qdf_ret_status = QDF_STATUS_E_FAILURE;
 	uint32_t roamId = 0xFF;
 
-	pSapCtx = CDS_GET_SAP_CB(pCtx);
 	if (NULL == pSapCtx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
-			  "%s: Invalid SAP pointer from pCtx",
+			  "%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",
+			  "%s: Invalid HAL pointer",
 			  __func__);
 		return QDF_STATUS_E_FAULT;
 	}