diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2007-08-10 12:23:20 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:47:42 -0400 |
commit | fe6aa301c747e0eca140428426e065657b6ab412 (patch) | |
tree | e12ed28754cb3447820e072fbc01e19c37827fee | |
parent | 744b096e2b0976a10ae9a66aa6a3ae7fa4fce9f1 (diff) |
[MAC80211]: Add SIOCGIWTXPOWER routine
The wireless extensions ioctl's implemented in mac80211 do not include
SIOCGIWTXPOWER. This patch adds the necessary code.
Acked-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | net/mac80211/ieee80211_ioctl.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c index 1fde214faecb..0e88564e524a 100644 --- a/net/mac80211/ieee80211_ioctl.c +++ b/net/mac80211/ieee80211_ioctl.c | |||
@@ -798,6 +798,20 @@ static int ieee80211_ioctl_giwrate(struct net_device *dev, | |||
798 | return 0; | 798 | return 0; |
799 | } | 799 | } |
800 | 800 | ||
801 | static int ieee80211_ioctl_giwtxpower(struct net_device *dev, | ||
802 | struct iw_request_info *info, | ||
803 | union iwreq_data *data, char *extra) | ||
804 | { | ||
805 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | ||
806 | |||
807 | data->txpower.fixed = 1; | ||
808 | data->txpower.disabled = !(local->hw.conf.radio_enabled); | ||
809 | data->txpower.value = local->hw.conf.power_level; | ||
810 | data->txpower.flags = IW_TXPOW_DBM; | ||
811 | |||
812 | return 0; | ||
813 | } | ||
814 | |||
801 | static int ieee80211_ioctl_siwrts(struct net_device *dev, | 815 | static int ieee80211_ioctl_siwrts(struct net_device *dev, |
802 | struct iw_request_info *info, | 816 | struct iw_request_info *info, |
803 | struct iw_param *rts, char *extra) | 817 | struct iw_param *rts, char *extra) |
@@ -1587,7 +1601,7 @@ static const iw_handler ieee80211_handler[] = | |||
1587 | (iw_handler) ieee80211_ioctl_siwfrag, /* SIOCSIWFRAG */ | 1601 | (iw_handler) ieee80211_ioctl_siwfrag, /* SIOCSIWFRAG */ |
1588 | (iw_handler) ieee80211_ioctl_giwfrag, /* SIOCGIWFRAG */ | 1602 | (iw_handler) ieee80211_ioctl_giwfrag, /* SIOCGIWFRAG */ |
1589 | (iw_handler) NULL, /* SIOCSIWTXPOW */ | 1603 | (iw_handler) NULL, /* SIOCSIWTXPOW */ |
1590 | (iw_handler) NULL, /* SIOCGIWTXPOW */ | 1604 | (iw_handler) ieee80211_ioctl_giwtxpower, /* SIOCGIWTXPOW */ |
1591 | (iw_handler) ieee80211_ioctl_siwretry, /* SIOCSIWRETRY */ | 1605 | (iw_handler) ieee80211_ioctl_siwretry, /* SIOCSIWRETRY */ |
1592 | (iw_handler) ieee80211_ioctl_giwretry, /* SIOCGIWRETRY */ | 1606 | (iw_handler) ieee80211_ioctl_giwretry, /* SIOCGIWRETRY */ |
1593 | (iw_handler) ieee80211_ioctl_siwencode, /* SIOCSIWENCODE */ | 1607 | (iw_handler) ieee80211_ioctl_siwencode, /* SIOCSIWENCODE */ |