summaryrefslogtreecommitdiff
path: root/net/wireless/rdev-ops.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-10-24 10:17:18 +0200
committerJohannes Berg <johannes.berg@intel.com>2012-10-30 09:11:34 +0100
commitc8442118ad9cd05cfe3b993f058e70ab25b1009a (patch)
treee9d454ef6461e70cf99de76f9dda52952b665e44 /net/wireless/rdev-ops.h
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/wireless/rdev-ops.h')
-rw-r--r--net/wireless/rdev-ops.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/net/wireless/rdev-ops.h b/net/wireless/rdev-ops.h
index eb5f8974e148..6e5fa659068d 100644
--- a/net/wireless/rdev-ops.h
+++ b/net/wireless/rdev-ops.h
@@ -476,21 +476,22 @@ rdev_set_wiphy_params(struct cfg80211_registered_device *rdev, u32 changed)
}
static inline int rdev_set_tx_power(struct cfg80211_registered_device *rdev,
+ struct wireless_dev *wdev,
enum nl80211_tx_power_setting type, int mbm)
{
int ret;
- trace_rdev_set_tx_power(&rdev->wiphy, type, mbm);
- ret = rdev->ops->set_tx_power(&rdev->wiphy, type, mbm);
+ trace_rdev_set_tx_power(&rdev->wiphy, wdev, type, mbm);
+ ret = rdev->ops->set_tx_power(&rdev->wiphy, wdev, type, mbm);
trace_rdev_return_int(&rdev->wiphy, ret);
return ret;
}
static inline int rdev_get_tx_power(struct cfg80211_registered_device *rdev,
- int *dbm)
+ struct wireless_dev *wdev, int *dbm)
{
int ret;
- trace_rdev_get_tx_power(&rdev->wiphy);
- ret = rdev->ops->get_tx_power(&rdev->wiphy, dbm);
+ trace_rdev_get_tx_power(&rdev->wiphy, wdev);
+ ret = rdev->ops->get_tx_power(&rdev->wiphy, wdev, dbm);
trace_rdev_return_int_int(&rdev->wiphy, ret, *dbm);
return ret;
}