Forráskód Böngészése

qcacld-3.0: Refine API wlansap_start()

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

Change-Id: I20c27e75c0e4d1dce52316f39ce3cad9f4187533
CRs-Fixed: 2116267
Jeff Johnson 7 éve
szülő
commit
d8b6057125
2 módosított fájl, 21 hozzáadás és 30 törlés
  1. 18 2
      core/sap/inc/sap_api.h
  2. 3 28
      core/sap/src/sap_module.c

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

@@ -817,6 +817,24 @@ struct sap_context *wlansap_open(void);
  */
 QDF_STATUS wlansap_close(struct sap_context *pSapCtx);
 
+/**
+ * wlansap_start - start per-BSS SAP
+ * @pSapCtx: Pointer to the SAP context
+ * @mode: Device mode
+ * @addr: MAC address of the SAP
+ * @session_id: Pointer to the session id
+ *
+ * Called as part of the BSS start procedure. SAP will use this call
+ * to perform all activities needed to start the BSS.
+ *
+ * Return: The result code associated with performing the operation
+ *         QDF_STATUS_E_FAULT: BSS could not be started
+ *         QDF_STATUS_SUCCESS: Success
+ */
+QDF_STATUS wlansap_start(struct sap_context *pSapCtx,
+			 enum tQDF_ADAPTER_MODE mode,
+			 uint8_t *addr, uint32_t session_id);
+
 void sap_cleanup_channel_list(void *sapContext);
 
 /**
@@ -829,8 +847,6 @@ bool sap_is_auto_channel_select(void *pvos_gctx);
 
 QDF_STATUS wlansap_global_init(void);
 QDF_STATUS wlansap_global_deinit(void);
-QDF_STATUS wlansap_start(void *p_cds_gctx, enum tQDF_ADAPTER_MODE mode,
-			 uint8_t *addr, uint32_t session_id);
 QDF_STATUS wlansap_stop(void *p_cds_gctx);
 typedef QDF_STATUS (*tpWLAN_SAPEventCB)(tpSap_Event pSapEvent,
 					void *pUsrContext);

+ 3 - 28
core/sap/src/sap_module.c

@@ -281,45 +281,20 @@ struct sap_context *wlansap_open(void)
 	return pSapCtx;
 } /* wlansap_open */
 
-/**
- * wlansap_start() - wlan start SAP.
- * @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
- * @mode: Device mode
- * @addr: MAC address of the SAP
- * @session_id: Pointer to the session id
- *
- * Called as part of the overall start procedure (cds_enable). SAP will
- * use this call to register with TL as the SAP entity for SAP RSN frames.
- *
- * Return: The result code associated with performing the operation
- *         QDF_STATUS_E_FAULT: Pointer to SAP cb is NULL;
- *                             access would cause a page fault.
- *         QDF_STATUS_SUCCESS: Success
- */
-QDF_STATUS wlansap_start(void *pCtx, enum tQDF_ADAPTER_MODE mode,
+QDF_STATUS wlansap_start(struct sap_context *pSapCtx,
+			 enum tQDF_ADAPTER_MODE mode,
 			 uint8_t *addr, uint32_t session_id)
 {
-	struct sap_context *pSapCtx = NULL;
 	QDF_STATUS qdf_ret_status;
 	tHalHandle hal;
 	tpAniSirGlobal pmac;
 
-	/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
-
 	QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
 		  "wlansap_start invoked successfully");
-	/*------------------------------------------------------------------------
-	    Sanity check
-	    Extract SAP control block
-	   ------------------------------------------------------------------------*/
-	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", __func__);
+			  "%s: Invalid SAP pointer", __func__);
 		return QDF_STATUS_E_FAULT;
 	}