Эх сурвалжийг харах

qcacld-3.0: Donot process get tx power command in disconnected state

Driver is accepting get tx power request from the application in
disconnected state and requesting FW for class A stats.
Since it is in disconnected state driver fails to parse the peer
stats.

CRs-Fixed: 2052864
Change-Id: Ie49528f0822b45bb103bc578f35b992797ebb1c5
Ganesh Kondabattini 8 жил өмнө
parent
commit
f847f06b60

+ 8 - 0
core/hdd/src/wlan_hdd_power.c

@@ -2199,6 +2199,7 @@ static int __wlan_hdd_cfg80211_get_txpower(struct wiphy *wiphy,
 	struct net_device *ndev = wdev->netdev;
 	hdd_adapter_t *adapter = WLAN_HDD_GET_PRIV_PTR(ndev);
 	int status;
+	hdd_station_ctx_t *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
 
 	ENTER();
 
@@ -2229,6 +2230,13 @@ static int __wlan_hdd_cfg80211_get_txpower(struct wiphy *wiphy,
 	}
 	mutex_unlock(&pHddCtx->iface_change_lock);
 
+	if (sta_ctx->conn_info.connState != eConnectionState_Associated) {
+		hdd_debug("Not associated");
+		/*To keep GUI happy */
+		*dbm = 0;
+		return 0;
+	}
+
 	MTRACE(qdf_trace(QDF_MODULE_ID_HDD,
 			 TRACE_CODE_HDD_CFG80211_GET_TXPOWER,
 			 adapter->sessionId, adapter->device_mode));