aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-10-24 04:17:18 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-10-30 04:11:34 -0400
commitc8442118ad9cd05cfe3b993f058e70ab25b1009a (patch)
treee9d454ef6461e70cf99de76f9dda52952b665e44 /net/mac80211/cfg.c
parent71fe96bf9db8b117d28de6f9ced606cae2ad9661 (diff)
cfg80211: allow per interface TX power setting
The TX power setting is currently per wiphy (hardware device) but with multi-channel capabilities that doesn't make much sense any more. Allow drivers (and mac80211) to advertise support for per-interface TX power configuration. When the TX power is configured for the wiphy, the wdev will be NULL and the driver can still handle that, but when a wdev is given the TX power can be set only for that wdev now. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 34fd3eba3090..a352e4d22dd9 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1992,6 +1992,7 @@ static int ieee80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
1992} 1992}
1993 1993
1994static int ieee80211_set_tx_power(struct wiphy *wiphy, 1994static int ieee80211_set_tx_power(struct wiphy *wiphy,
1995 struct wireless_dev *wdev,
1995 enum nl80211_tx_power_setting type, int mbm) 1996 enum nl80211_tx_power_setting type, int mbm)
1996{ 1997{
1997 struct ieee80211_local *local = wiphy_priv(wiphy); 1998 struct ieee80211_local *local = wiphy_priv(wiphy);
@@ -2026,7 +2027,9 @@ static int ieee80211_set_tx_power(struct wiphy *wiphy,
2026 return 0; 2027 return 0;
2027} 2028}
2028 2029
2029static int ieee80211_get_tx_power(struct wiphy *wiphy, int *dbm) 2030static int ieee80211_get_tx_power(struct wiphy *wiphy,
2031 struct wireless_dev *wdev,
2032 int *dbm)
2030{ 2033{
2031 struct ieee80211_local *local = wiphy_priv(wiphy); 2034 struct ieee80211_local *local = wiphy_priv(wiphy);
2032 2035