Ver código fonte

qcacld-3.0: Refine API wlansap_scan_callback()

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

Change-Id: I7c77827de37a4beb4bedcfb5716e61573c27eaad
CRs-Fixed: 2116267
Jeff Johnson 7 anos atrás
pai
commit
ffa38768fa
2 arquivos alterados com 19 adições e 19 exclusões
  1. 3 14
      core/sap/src/sap_api_link_cntl.c
  2. 16 5
      core/sap/src/sap_internal.h

+ 3 - 14
core/sap/src/sap_api_link_cntl.c

@@ -88,24 +88,13 @@
  * Function Declarations and Documentation
  * -------------------------------------------------------------------------*/
 
-/*
- * wlansap_scan_callback() - Callback for Scan (scan results) Events
- *
- * @hal_handle  : tHalHandle passed in with the scan request
- * @ctx   : The second context pass in for the caller (sapContext)
- * @scanID      : scanID got after the scan
- *
- *  Callback for Scan (scan results) Events
- *
- * Return: Status
- */
 QDF_STATUS wlansap_scan_callback(tHalHandle hal_handle,
-				 void *ctx,   /* Opaque SAP handle */
+				 struct sap_context *sap_ctx,
 				 uint8_t session_id,
-				 uint32_t scan_id, eCsrScanStatus scan_status) {
+				 uint32_t scan_id, eCsrScanStatus scan_status)
+{
 	tScanResultHandle result = NULL;
 	QDF_STATUS get_result_status = QDF_STATUS_E_FAILURE;
-	struct sap_context *sap_ctx = ctx;
 	tWLAN_SAPEvent sapEvent;        /* State machine event */
 	uint8_t operChannel = 0;
 	QDF_STATUS sap_sm_status;

+ 16 - 5
core/sap/src/sap_internal.h

@@ -286,11 +286,22 @@ typedef struct sWLAN_SAPEvent {
 QDF_STATUS wlansap_context_get(struct sap_context *ctx);
 void wlansap_context_put(struct sap_context *ctx);
 
-QDF_STATUS
-wlansap_scan_callback
-	(tHalHandle halHandle,
-	void *pContext,
-	uint8_t sessionId, uint32_t scanID, eCsrScanStatus scanStatus);
+/**
+ * wlansap_scan_callback() - Callback for Scan (scan results) Events
+ * @hal_handle: tHalHandle passed in with the scan request
+ * @sap_ctx: The sap context
+ * @session_id: ID of the current session
+ * @scan_id: ID assigned to the scan
+ * @scan_status: Status of the scan
+ *
+ * Callback for Scan (scan results) Events
+ *
+ * Return: Status
+ */
+QDF_STATUS wlansap_scan_callback(tHalHandle hal_handle,
+				 struct sap_context *sap_ctx,
+				 uint8_t session_id,
+				 uint32_t scan_id, eCsrScanStatus scan_status);
 
 QDF_STATUS
 wlansap_pre_start_bss_acs_scan_callback(