Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fe6aa301c747e0eca140428426e065657b6ab412
Commit:     fe6aa301c747e0eca140428426e065657b6ab412
Parent:     744b096e2b0976a10ae9a66aa6a3ae7fa4fce9f1
Author:     Larry Finger <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 10 11:23:20 2007 -0500
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Oct 10 16:47:42 2007 -0700

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Larry Finger <[EMAIL PROTECTED]>
    Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
---
 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 1fde214..0e88564 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,
        return 0;
 }
 
+static int ieee80211_ioctl_giwtxpower(struct net_device *dev,
+                                  struct iw_request_info *info,
+                                  union iwreq_data *data, char *extra)
+{
+       struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
+
+       data->txpower.fixed = 1;
+       data->txpower.disabled = !(local->hw.conf.radio_enabled);
+       data->txpower.value = local->hw.conf.power_level;
+       data->txpower.flags = IW_TXPOW_DBM;
+
+       return 0;
+}
+
 static int ieee80211_ioctl_siwrts(struct net_device *dev,
                                  struct iw_request_info *info,
                                  struct iw_param *rts, char *extra)
@@ -1587,7 +1601,7 @@ static const iw_handler ieee80211_handler[] =
        (iw_handler) ieee80211_ioctl_siwfrag,           /* SIOCSIWFRAG */
        (iw_handler) ieee80211_ioctl_giwfrag,           /* SIOCGIWFRAG */
        (iw_handler) NULL,                              /* SIOCSIWTXPOW */
-       (iw_handler) NULL,                              /* SIOCGIWTXPOW */
+       (iw_handler) ieee80211_ioctl_giwtxpower,        /* SIOCGIWTXPOW */
        (iw_handler) ieee80211_ioctl_siwretry,          /* SIOCSIWRETRY */
        (iw_handler) ieee80211_ioctl_giwretry,          /* SIOCGIWRETRY */
        (iw_handler) ieee80211_ioctl_siwencode,         /* SIOCSIWENCODE */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to