Răsfoiți Sursa

qcacld-3.0: Refine API wlansap_register_mgmt_frame()

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

Change-Id: I4f1816f30b54c21e98119fe12c8bcca4a5be93de
CRs-Fixed: 2116267
Jeff Johnson 7 ani în urmă
părinte
comite
4a7ff43427
2 a modificat fișierele cu 25 adăugiri și 23 ștergeri
  1. 20 3
      core/sap/inc/sap_api.h
  2. 5 20
      core/sap/src/sap_module.c

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

@@ -970,9 +970,26 @@ QDF_STATUS wlansap_remain_on_channel
 	 uint32_t *scan_id);
 QDF_STATUS wlansap_cancel_remain_on_channel(void *p_cds_gctx,
 		uint32_t scan_id);
-QDF_STATUS wlansap_register_mgmt_frame
-	(void *p_cds_gctx,
-	 uint16_t frameType, uint8_t *matchData, uint16_t matchLen);
+
+/**
+ * wlansap_register_mgmt_frame() - register management frame
+ * @pSapCtx: Pointer to SAP context
+ * @frame_type: frame type that needs to be 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 register specified type of frame with CORE stack.
+ * On receiving such kind of frame CORE stack should pass this frame to HDD
+ *
+ * Return: The QDF_STATUS code associated with performing the operation
+ *         QDF_STATUS_SUCCESS:  Success and error code otherwise
+ */
+QDF_STATUS wlansap_register_mgmt_frame(struct sap_context *pSapCtx,
+				       uint16_t frame_type,
+				       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);

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

@@ -1977,29 +1977,14 @@ QDF_STATUS wlan_sap_get_pre_cac_vdev_id(tHalHandle handle, uint8_t *vdev_id)
 	return QDF_STATUS_E_FAILURE;
 }
 
-/**
- * wlansap_register_mgmt_frame() - 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 registered with PE.
- * @matchData: Data pointer which should be matched after frame type is matched.
- * @matchLen: Length of the matchData
- *
- * HDD use this API to register specified type of frame with CORE stack.
- * On receiving such kind of frame CORE stack should pass this frame to HDD
- *
- * Return: The QDF_STATUS code associated with performing the operation
- *         QDF_STATUS_SUCCESS:  Success and error code otherwise
- */
-QDF_STATUS wlansap_register_mgmt_frame
-	(void *pCtx,
-	uint16_t frameType, uint8_t *matchData, uint16_t matchLen) {
-	struct sap_context *pSapCtx = NULL;
+QDF_STATUS wlansap_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",