Browse Source

qcacld-3.0: Remove unused CDS context from RSSI APIs

Currently HDD passes the CDS context to sme_get_rssi(), which in turn
passes it to csr_get_rssi(), which in turn uses it to populate the
p_cds_context field in the tAniGetRssiReq message. Upon processing of
this message by csr_update_rssi() the p_cds_context is checked for
NULL but is otherwise unused. Since the CDS context is not needed,
remove it from all of the RSSI APIs.

Change-Id: I5836e3192205576f6ff4614a29356e73fe674848
CRs-Fixed: 2116954
Jeff Johnson 7 years ago
parent
commit
8bd23354cf

+ 1 - 1
core/hdd/src/wlan_hdd_wext.c

@@ -3604,7 +3604,7 @@ QDF_STATUS wlan_hdd_get_rssi(struct hdd_adapter *pAdapter, int8_t *rssi_value)
 	hstatus = sme_get_rssi(hdd_ctx->hHal, hdd_get_rssi_cb,
 			       pHddStaCtx->conn_info.staId[0],
 			       pHddStaCtx->conn_info.bssId, pAdapter->rssi,
-			       cookie, hdd_ctx->pcds_context);
+			       cookie);
 	if (QDF_STATUS_SUCCESS != hstatus) {
 		hdd_err("Unable to retrieve RSSI");
 		/* we'll returned a cached value below */

+ 0 - 2
core/mac/inc/sir_api.h

@@ -1952,8 +1952,6 @@ typedef struct sAniGetRssiReq {
 	int8_t lastRSSI;        /* in case of error, return last RSSI */
 	void *rssiCallback;
 	void *pDevContext;      /* device context */
-	void *p_cds_context;    /* cds context */
-
 } tAniGetRssiReq, *tpAniGetRssiReq;
 
 typedef struct sAniGetSnrReq {

+ 1 - 1
core/sme/inc/csr_internal.h

@@ -1245,7 +1245,7 @@ QDF_STATUS csr_get_statistics(tpAniSirGlobal pMac,
 		uint8_t staId, void *pContext, uint8_t sessionId);
 QDF_STATUS csr_get_rssi(tpAniSirGlobal pMac, tCsrRssiCallback callback,
 		uint8_t staId, struct qdf_mac_addr bssId, int8_t lastRSSI,
-		void *pContext, void *p_cds_context);
+		void *pContext);
 QDF_STATUS csr_get_snr(tpAniSirGlobal pMac, tCsrSnrCallback callback,
 		uint8_t staId, struct qdf_mac_addr bssId, void *pContext);
 QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac,

+ 1 - 1
core/sme/inc/sme_api.h

@@ -369,7 +369,7 @@ QDF_STATUS sme_get_statistics(tHalHandle hHal,
 QDF_STATUS sme_get_rssi(tHalHandle hHal,
 		tCsrRssiCallback callback,
 		uint8_t staId, struct qdf_mac_addr bssId, int8_t lastRSSI,
-		void *pContext, void *p_cds_context);
+		void *pContext);
 QDF_STATUS sme_get_snr(tHalHandle hHal,
 		tCsrSnrCallback callback,
 		uint8_t staId, struct qdf_mac_addr bssId, void *pContext);

+ 13 - 13
core/sme/src/common/sme_api.c

@@ -4718,24 +4718,24 @@ QDF_STATUS sme_roam_set_default_key_index(tHalHandle hal, uint8_t session_id,
 }
 
 
-/*
- * sme_get_rssi() -
+/**
+ * sme_get_rssi() - API to retrieve current RSSI
+ * @hHal: HAL handle for device
+ * @callback: SME sends back the requested stats using the callback
+ * @staId: The station ID for which the RSSI is requested for
+ * @bssid: The bssid of the connected session
+ * @lastRSSI: RSSI value at time of request. In case fw cannot provide
+ *		      RSSI, do not hold up but return this value.
+ * @pContext: user context to be passed back along with the callback
+ *
  * A wrapper function that client calls to register a callback to get RSSI
  *
- * hHal - HAL handle for device
- * callback - SME sends back the requested stats using the callback
- * staId -    The station ID for which the stats is requested for
- * bssid - The bssid of the connected session
- * lastRSSI - RSSI value at time of request. In case fw cannot provide
- *		      RSSI, do not hold up but return this value.
- * pContext - user context to be passed back along with the callback
- * p_cds_context - cds context
- * Return QDF_STATUS
+ * Return: QDF_STATUS
  */
 QDF_STATUS sme_get_rssi(tHalHandle hHal,
 			tCsrRssiCallback callback, uint8_t staId,
 			struct qdf_mac_addr bssId, int8_t lastRSSI,
-			void *pContext, void *p_cds_context)
+			void *pContext)
 {
 	QDF_STATUS status = QDF_STATUS_E_FAILURE;
 	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
@@ -4746,7 +4746,7 @@ QDF_STATUS sme_get_rssi(tHalHandle hHal,
 	if (QDF_IS_STATUS_SUCCESS(status)) {
 		status = csr_get_rssi(pMac, callback,
 				      staId, bssId, lastRSSI,
-				      pContext, p_cds_context);
+				      pContext);
 		sme_release_global_lock(&pMac->sme);
 	}
 	return status;

+ 2 - 8
core/sme/src/csr/csr_api_roam.c

@@ -10954,12 +10954,7 @@ static void csr_update_rssi(tpAniSirGlobal pMac, void *pMsg)
 	QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
 
 	if (pGetRssiReq) {
-		if (NULL != pGetRssiReq->p_cds_context)
-			qdf_status = csr_send_snr_request(pGetRssiReq);
-		else {
-			sme_err("GetRssiReq->p_cds_context is NULL");
-			return;
-		}
+		qdf_status = csr_send_snr_request(pGetRssiReq);
 
 		if (NULL != pGetRssiReq->rssiCallback) {
 			if (qdf_status != QDF_STATUS_E_BUSY)
@@ -17033,7 +17028,7 @@ QDF_STATUS csr_get_rssi(tpAniSirGlobal pMac,
 			tCsrRssiCallback callback,
 			uint8_t staId,
 			struct qdf_mac_addr bssId,
-			int8_t lastRSSI, void *pContext, void *p_cds_context)
+			int8_t lastRSSI, void *pContext)
 {
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	struct scheduler_msg msg = {0};
@@ -17059,7 +17054,6 @@ QDF_STATUS csr_get_rssi(tpAniSirGlobal pMac,
 	pMsg->staId = staId;
 	pMsg->rssiCallback = callback;
 	pMsg->pDevContext = pContext;
-	pMsg->p_cds_context = p_cds_context;
 	/*
 	 * store RSSI at time of calling, so that if RSSI request cannot
 	 * be sent to firmware, this value can be used to return immediately