Browse Source

qcacld-3.0: set fixed txpower using nl80211 interface

This change is to set txpower to specific interface
from iw.

Ex:
"iw dev <interface name> set txpower fixed <value>"

Change-Id: I5a3195a36cd2d7252eb3ef0312545d338b4000ec
CRs-Fixed: 2677223
Balaji Pothunoori 5 years ago
parent
commit
42326695a7
1 changed files with 7 additions and 3 deletions
  1. 7 3
      core/hdd/src/wlan_hdd_power.c

+ 7 - 3
core/hdd/src/wlan_hdd_power.c

@@ -2268,9 +2268,13 @@ static int __wlan_hdd_cfg80211_set_txpower(struct wiphy *wiphy,
 		break;
 
 	case NL80211_TX_POWER_FIXED:    /* Fix TX power to the mBm parameter */
-		hdd_err("NL80211_TX_POWER_FIXED not supported");
-		return -EOPNOTSUPP;
-
+		status = sme_set_tx_power(mac_handle, adapter->vdev_id,
+					  bssid, adapter->device_mode, dbm);
+		if (QDF_IS_STATUS_ERROR(status)) {
+			hdd_err("Setting tx power failed, %d", status);
+			return -EIO;
+		}
+		break;
 	default:
 		hdd_err("Invalid power setting type %d", type);
 		return -EIO;