summaryrefslogtreecommitdiffstats
path: root/include/net/cfg80211.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 /include/net/cfg80211.h
parent71fe96bf9db8b117d28de6f9ced606cae2ad9661 (diff)
downloadop-kernel-dev-c8442118ad9cd05cfe3b993f058e70ab25b1009a.zip
op-kernel-dev-c8442118ad9cd05cfe3b993f058e70ab25b1009a.tar.gz
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 'include/net/cfg80211.h')
-rw-r--r--include/net/cfg80211.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index c696457..8034a42 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1551,7 +1551,10 @@ struct cfg80211_gtk_rekey_data {
* struct wiphy. If returning an error, no value should be changed.
*
* @set_tx_power: set the transmit power according to the parameters,
- * the power passed is in mBm, to get dBm use MBM_TO_DBM().
+ * the power passed is in mBm, to get dBm use MBM_TO_DBM(). The
+ * wdev may be %NULL if power was set for the wiphy, and will
+ * always be %NULL unless the driver supports per-vif TX power
+ * (as advertised by the nl80211 feature flag.)
* @get_tx_power: store the current TX power into the dbm variable;
* return 0 if successful
*
@@ -1748,9 +1751,10 @@ struct cfg80211_ops {
int (*set_wiphy_params)(struct wiphy *wiphy, u32 changed);
- int (*set_tx_power)(struct wiphy *wiphy,
+ int (*set_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev,
enum nl80211_tx_power_setting type, int mbm);
- int (*get_tx_power)(struct wiphy *wiphy, int *dbm);
+ int (*get_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev,
+ int *dbm);
int (*set_wds_peer)(struct wiphy *wiphy, struct net_device *dev,
const u8 *addr);
OpenPOWER on IntegriCloud