|
@@ -784,7 +784,7 @@ typedef struct {
|
|
|
* struct sap_context - per-BSS Context for SAP
|
|
|
*
|
|
|
* struct sap_context is used to share per-BSS context between SAP and
|
|
|
- * its clients. A context is generated by wlansap_open() and is
|
|
|
+ * its clients. A context is generated by sap_create_ctx() and is
|
|
|
* destroyed by wlansap_close(). During the lifetime of the BSS the
|
|
|
* SAP context is passed as the primary parameter to SAP APIs. Note
|
|
|
* that by design the contents of the structure are opaque to the
|
|
@@ -793,61 +793,62 @@ typedef struct {
|
|
|
struct sap_context;
|
|
|
|
|
|
/**
|
|
|
- * wlansap_open() - WLAN SAP open function call
|
|
|
+ * sap_create_ctx() - API to create the sap context
|
|
|
*
|
|
|
- * Called at BSS initialization to generate a context for the BSS. SAP
|
|
|
- * will initialize all its internal resources and will wait for the
|
|
|
- * call to wlan_start() to register with the other modules.
|
|
|
+ * This API assigns the sap context from global sap context pool
|
|
|
+ * stored in gp_sap_ctx[i] array.
|
|
|
*
|
|
|
* Return: Pointer to the SAP context, or NULL if a context could not
|
|
|
* be allocated
|
|
|
*/
|
|
|
-struct sap_context *wlansap_open(void);
|
|
|
+struct sap_context *sap_create_ctx(void);
|
|
|
|
|
|
/**
|
|
|
- * wlansap_close - close per-BSS SAP
|
|
|
+ * sap_destroy_ctx - API to destroy the sap context
|
|
|
* @sap_ctx: Pointer to the SAP context
|
|
|
*
|
|
|
- * Called during BSS close procedure. SAP will clean up all the
|
|
|
- * internal resources.
|
|
|
+ * This API puts back the given sap context to global sap context pool which
|
|
|
+ * makes current sap session's sap context invalid.
|
|
|
*
|
|
|
* 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_close(struct sap_context *sap_ctx);
|
|
|
+QDF_STATUS sap_destroy_ctx(struct sap_context *sap_ctx);
|
|
|
|
|
|
/**
|
|
|
- * wlansap_start - start per-BSS SAP
|
|
|
+ * sap_init_ctx - Initialize the sap context
|
|
|
* @sap_ctx: 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.
|
|
|
+ * sap_create_ctx() allocates the sap context which is uninitialized.
|
|
|
+ * This API needs to be called to properly initialize the sap context
|
|
|
+ * which is just created.
|
|
|
*
|
|
|
* 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 *sap_ctx,
|
|
|
+QDF_STATUS sap_init_ctx(struct sap_context *sap_ctx,
|
|
|
enum QDF_OPMODE mode,
|
|
|
uint8_t *addr, uint32_t session_id);
|
|
|
|
|
|
/**
|
|
|
- * wlansap_stop() - stop per-BSS SAP
|
|
|
+ * sap_deinit_ctx() - De-initialize the sap context
|
|
|
* @sap_ctx: Pointer to the SAP context
|
|
|
*
|
|
|
- * Called as part of the BSS stop procedure. SAP will use this call
|
|
|
- * to perform all activities needed to stop the BSS.
|
|
|
+ * When SAP session is about to close, this API needs to be called
|
|
|
+ * to de-initialize all the members of sap context structure, so that
|
|
|
+ * nobody can accidently start using the sap context.
|
|
|
*
|
|
|
* Return: The result code associated with performing the operation
|
|
|
* QDF_STATUS_E_FAULT: BSS could not be stopped
|
|
|
* QDF_STATUS_SUCCESS: Success
|
|
|
*/
|
|
|
-QDF_STATUS wlansap_stop(struct sap_context *sap_ctx);
|
|
|
+QDF_STATUS sap_deinit_ctx(struct sap_context *sap_ctx);
|
|
|
|
|
|
/**
|
|
|
* sap_is_auto_channel_select() - is channel AUTO_CHANNEL_SELECT
|