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:

committed by
Johannes Berg

parent
0563921abf
commit
5b3dc42b1b
@@ -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
|
||||
|
Reference in New Issue
Block a user