diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-10-24 04:17:18 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-10-30 04:11:34 -0400 |
commit | c8442118ad9cd05cfe3b993f058e70ab25b1009a (patch) | |
tree | e9d454ef6461e70cf99de76f9dda52952b665e44 /drivers/net/wireless/rndis_wlan.c | |
parent | 71fe96bf9db8b117d28de6f9ced606cae2ad9661 (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 'drivers/net/wireless/rndis_wlan.c')
-rw-r--r-- | drivers/net/wireless/rndis_wlan.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index bd1f0cb56085..5390af36c064 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c | |||
@@ -490,9 +490,12 @@ static int rndis_scan(struct wiphy *wiphy, | |||
490 | static int rndis_set_wiphy_params(struct wiphy *wiphy, u32 changed); | 490 | static int rndis_set_wiphy_params(struct wiphy *wiphy, u32 changed); |
491 | 491 | ||
492 | static int rndis_set_tx_power(struct wiphy *wiphy, | 492 | static int rndis_set_tx_power(struct wiphy *wiphy, |
493 | struct wireless_dev *wdev, | ||
493 | enum nl80211_tx_power_setting type, | 494 | enum nl80211_tx_power_setting type, |
494 | int mbm); | 495 | int mbm); |
495 | static int rndis_get_tx_power(struct wiphy *wiphy, int *dbm); | 496 | static int rndis_get_tx_power(struct wiphy *wiphy, |
497 | struct wireless_dev *wdev, | ||
498 | int *dbm); | ||
496 | 499 | ||
497 | static int rndis_connect(struct wiphy *wiphy, struct net_device *dev, | 500 | static int rndis_connect(struct wiphy *wiphy, struct net_device *dev, |
498 | struct cfg80211_connect_params *sme); | 501 | struct cfg80211_connect_params *sme); |
@@ -1903,6 +1906,7 @@ static int rndis_set_wiphy_params(struct wiphy *wiphy, u32 changed) | |||
1903 | } | 1906 | } |
1904 | 1907 | ||
1905 | static int rndis_set_tx_power(struct wiphy *wiphy, | 1908 | static int rndis_set_tx_power(struct wiphy *wiphy, |
1909 | struct wireless_dev *wdev, | ||
1906 | enum nl80211_tx_power_setting type, | 1910 | enum nl80211_tx_power_setting type, |
1907 | int mbm) | 1911 | int mbm) |
1908 | { | 1912 | { |
@@ -1930,7 +1934,9 @@ static int rndis_set_tx_power(struct wiphy *wiphy, | |||
1930 | return -ENOTSUPP; | 1934 | return -ENOTSUPP; |
1931 | } | 1935 | } |
1932 | 1936 | ||
1933 | static int rndis_get_tx_power(struct wiphy *wiphy, int *dbm) | 1937 | static int rndis_get_tx_power(struct wiphy *wiphy, |
1938 | struct wireless_dev *wdev, | ||
1939 | int *dbm) | ||
1934 | { | 1940 | { |
1935 | struct rndis_wlan_private *priv = wiphy_priv(wiphy); | 1941 | struct rndis_wlan_private *priv = wiphy_priv(wiphy); |
1936 | struct usbnet *usbdev = priv->usbdev; | 1942 | struct usbnet *usbdev = priv->usbdev; |