Ver código fonte

qcacld-3.0: Refine API wlansap_de_register_mgmt_frame()

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

Change-Id: I41231b3ed7d43bdd8d3e250673b3ad1985ecd60d
CRs-Fixed: 2116267
Jeff Johnson 7 anos atrás
pai
commit
42e7c403e5
2 arquivos alterados com 23 adições e 22 exclusões
  1. 18 3
      core/sap/inc/sap_api.h
  2. 5 19
      core/sap/src/sap_module.c

+ 18 - 3
core/sap/inc/sap_api.h

@@ -990,9 +990,24 @@ QDF_STATUS wlansap_register_mgmt_frame(struct sap_context *pSapCtx,
 				       uint8_t *match_data,
 				       uint16_t match_len);
 
-QDF_STATUS wlansap_de_register_mgmt_frame
-	(void *p_cds_gctx,
-	 uint16_t frameType, uint8_t *matchData, uint16_t matchLen);
+/**
+ * wlansap_de_register_mgmt_frame() - de register management frame
+ * @pSapCtx: Pointer to SAP context
+ * @frame_type: frame type that needs to be de-registered with PE.
+ * @match_data: pointer to data which should be matched after @frame_type
+ *              is matched.
+ * @match_len: Length of the @match_data
+ *
+ * HDD use this API to deregister a previously registered frame
+ *
+ * Return: The QDF_STATUS code associated with performing the operation
+ *         QDF_STATUS_SUCCESS:  Success and error code otherwise
+ */
+QDF_STATUS wlansap_de_register_mgmt_frame(struct sap_context *pSapCtx,
+					  uint16_t frame_type,
+					  uint8_t *match_data,
+					  uint16_t match_len);
+
 QDF_STATUS wlansap_channel_change_request(void *p_cds_gctx,
 		uint8_t tArgetChannel);
 QDF_STATUS wlansap_start_beacon_req(void *pSapCtx);

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

@@ -2012,28 +2012,14 @@ QDF_STATUS wlansap_register_mgmt_frame(struct sap_context *pSapCtx,
 	return QDF_STATUS_E_FAULT;
 }
 
-/**
- * wlansap_de_register_mgmt_frame() - de register management frame
- * @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.
- * @frameType: frameType that needs to be De-registered with PE.
- * @matchData: Data pointer which should be matched after frame type is matched.
- * @matchLen: Length of the matchData
- *
- * This API is used to deregister previously registered frame.
- *
- * Return: The QDF_STATUS code associated with performing the operation
- *         QDF_STATUS_SUCCESS:  Success and error code otherwise
- */
-QDF_STATUS wlansap_de_register_mgmt_frame
-	(void *pCtx,
-	uint16_t frameType, uint8_t *matchData, uint16_t matchLen) {
-	struct sap_context *pSapCtx = NULL;
+QDF_STATUS wlansap_de_register_mgmt_frame(struct sap_context *pSapCtx,
+					  uint16_t frameType,
+					  uint8_t *matchData,
+					  uint16_t matchLen)
+{
 	void *hHal = NULL;
 	QDF_STATUS qdf_ret_status = QDF_STATUS_E_FAILURE;
 
-	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",