summaryrefslogtreecommitdiff
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-10-26 00:32:53 +0200
committerJohannes Berg <johannes.berg@intel.com>2014-11-04 10:15:09 +0100
commit5b3dc42b1b0db0264bbbe4ae44c15ab97bfd1e93 (patch)
tree3a53814de5743eb3fdf491609a050a417632c9f4 /net/mac80211/cfg.c
parent0563921abf01a7a38b5f670c3de05dc0b0b8617d (diff)
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>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index fbcc209687c8..b9659b8b70f8 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -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