diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-10-26 00:32:53 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-11-04 10:15:09 +0100 |
commit | 5b3dc42b1b0db0264bbbe4ae44c15ab97bfd1e93 (patch) | |
tree | 3a53814de5743eb3fdf491609a050a417632c9f4 /net/mac80211/driver-ops.h | |
parent | 0563921abf01a7a38b5f670c3de05dc0b0b8617d (diff) | |
download | talos-obmc-linux-5b3dc42b1b0db0264bbbe4ae44c15ab97bfd1e93.tar.gz talos-obmc-linux-5b3dc42b1b0db0264bbbe4ae44c15ab97bfd1e93.zip |
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/driver-ops.h')
-rw-r--r-- | net/mac80211/driver-ops.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index 3df28e0fa045..d1e128e5db41 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h @@ -1279,4 +1279,18 @@ static inline u32 drv_get_expected_throughput(struct ieee80211_local *local, return ret; } +static inline int drv_get_txpower(struct ieee80211_local *local, + struct ieee80211_sub_if_data *sdata, int *dbm) +{ + int ret; + + if (!local->ops->get_txpower) + return -EOPNOTSUPP; + + ret = local->ops->get_txpower(&local->hw, &sdata->vif, dbm); + trace_drv_get_txpower(local, sdata, *dbm, ret); + + return ret; +} + #endif /* __MAC80211_DRIVER_OPS */ |