mac80211: add support for driver tx power reporting

The configured tx power is often limited by hardware capabilities,
channel settings, antenna configuration, etc.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
[fix tracing compilation]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Felix Fietkau
2014-10-26 00:32:53 +02:00
committed by Johannes Berg
parent 0563921abf
commit 5b3dc42b1b
4 changed files with 49 additions and 0 deletions

View File

@@ -2133,6 +2133,9 @@ static int ieee80211_get_tx_power(struct wiphy *wiphy,
struct ieee80211_local *local = wiphy_priv(wiphy);
struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
if (local->ops->get_txpower)
return drv_get_txpower(local, sdata, dbm);
if (!local->use_chanctx)
*dbm = local->hw.conf.power_level;
else