mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
qcacld-3.0: refine interface wlan_hdd_cfg80211_get_txpower
Currently wlan_hdd_cfg80211_get_txpower is limited for STA device. This causes issue when SAP device wants to get the tx power. Change-Id: Iadf34e6c74ba013247d925bcd4f05e1aa1a971c9 CRs-Fixed: 2481680
This commit is contained in:
parent
b1443aa86a
commit
3d7c0e6d33
1 changed files with 15 additions and 9 deletions
|
|
@ -2147,7 +2147,6 @@ static int __wlan_hdd_cfg80211_get_txpower(struct wiphy *wiphy,
|
|||
struct net_device *ndev = wdev->netdev;
|
||||
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(ndev);
|
||||
int status;
|
||||
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
|
||||
|
||||
hdd_enter_dev(ndev);
|
||||
|
||||
|
|
@ -2167,9 +2166,21 @@ static int __wlan_hdd_cfg80211_get_txpower(struct wiphy *wiphy,
|
|||
if (status)
|
||||
return status;
|
||||
|
||||
if (sta_ctx->hdd_reassoc_scenario) {
|
||||
hdd_debug("Roaming is in progress, rej this req");
|
||||
return -EINVAL;
|
||||
if (adapter->device_mode == QDF_STA_MODE ||
|
||||
adapter->device_mode == QDF_P2P_CLIENT_MODE) {
|
||||
struct hdd_station_ctx *sta_ctx;
|
||||
|
||||
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
|
||||
if (sta_ctx->hdd_reassoc_scenario) {
|
||||
hdd_debug("Roaming is in progress, rej this req");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (sta_ctx->conn_info.conn_state !=
|
||||
eConnectionState_Associated) {
|
||||
hdd_debug("Not associated");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (hdd_ctx->driver_status != DRIVER_MODULES_ENABLED) {
|
||||
|
|
@ -2179,11 +2190,6 @@ static int __wlan_hdd_cfg80211_get_txpower(struct wiphy *wiphy,
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (sta_ctx->conn_info.conn_state != eConnectionState_Associated) {
|
||||
hdd_debug("Not associated");
|
||||
return 0;
|
||||
}
|
||||
|
||||
qdf_mtrace(QDF_MODULE_ID_HDD, QDF_MODULE_ID_HDD,
|
||||
TRACE_CODE_HDD_CFG80211_GET_TXPOWER,
|
||||
adapter->vdev_id, adapter->device_mode);
|
||||
|
|
|
|||
Loading…
Reference in a new issue