Bläddra i källkod

qcacld-3.0: Refine API wlansap_set_invalid_session()

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

Change-Id: Ib7c56dd9b04ececdb7518648f6ba9cc3e3ed7428
CRs-Fixed: 2116267
Jeff Johnson 7 år sedan
förälder
incheckning
104433afa3
2 ändrade filer med 13 tillägg och 17 borttagningar
  1. 9 1
      core/sap/inc/sap_api.h
  2. 4 16
      core/sap/src/sap_module.c

+ 9 - 1
core/sap/inc/sap_api.h

@@ -1362,7 +1362,15 @@ uint32_t wlansap_get_chan_width(struct sap_context *sap_ctx);
 QDF_STATUS wlansap_set_tx_leakage_threshold(tHalHandle hal,
 			uint16_t tx_leakage_threshold);
 
-QDF_STATUS wlansap_set_invalid_session(void *cds_ctx);
+/*
+ * wlansap_set_invalid_session() - set session ID to invalid
+ * @sap_ctx: pointer to the SAP context
+ *
+ * This function sets session ID to invalid
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS wlansap_set_invalid_session(struct sap_context *sap_ctx);
 
 /**
  * sap_dfs_set_current_channel() - Set current channel params in dfs component

+ 4 - 16
core/sap/src/sap_module.c

@@ -2843,27 +2843,15 @@ QDF_STATUS wlansap_set_tx_leakage_threshold(tHalHandle hal,
 	return QDF_STATUS_SUCCESS;
 }
 
-/*
- * wlansap_set_invalid_session() - set session ID to invalid
- * @cds_ctx: pointer of global context
- *
- * This function sets session ID to invalid
- *
- * Return: QDF_STATUS
- */
-QDF_STATUS
-wlansap_set_invalid_session(void *cds_ctx)
+QDF_STATUS wlansap_set_invalid_session(struct sap_context *sap_ctx)
 {
-	struct sap_context *psapctx;
-
-	psapctx = CDS_GET_SAP_CB(cds_ctx);
-	if (NULL == psapctx) {
+	if (NULL == sap_ctx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
-			FL("Invalid SAP pointer from pctx"));
+			FL("Invalid SAP pointer"));
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	psapctx->sessionId = CSR_SESSION_ID_INVALID;
+	sap_ctx->sessionId = CSR_SESSION_ID_INVALID;
 
 	return QDF_STATUS_SUCCESS;
 }