提交 fe6aa301 编写于 作者: L Larry Finger 提交者: David S. Miller

[MAC80211]: Add SIOCGIWTXPOWER routine

The wireless extensions ioctl's implemented in mac80211 do not include
SIOCGIWTXPOWER. This patch adds the necessary code.
Acked-by: NMichael Buesch <mb@bu3sch.de>
Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 744b096e
...@@ -798,6 +798,20 @@ static int ieee80211_ioctl_giwrate(struct net_device *dev, ...@@ -798,6 +798,20 @@ static int ieee80211_ioctl_giwrate(struct net_device *dev,
return 0; 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, static int ieee80211_ioctl_siwrts(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_param *rts, char *extra) struct iw_param *rts, char *extra)
...@@ -1587,7 +1601,7 @@ static const iw_handler ieee80211_handler[] = ...@@ -1587,7 +1601,7 @@ static const iw_handler ieee80211_handler[] =
(iw_handler) ieee80211_ioctl_siwfrag, /* SIOCSIWFRAG */ (iw_handler) ieee80211_ioctl_siwfrag, /* SIOCSIWFRAG */
(iw_handler) ieee80211_ioctl_giwfrag, /* SIOCGIWFRAG */ (iw_handler) ieee80211_ioctl_giwfrag, /* SIOCGIWFRAG */
(iw_handler) NULL, /* SIOCSIWTXPOW */ (iw_handler) NULL, /* SIOCSIWTXPOW */
(iw_handler) NULL, /* SIOCGIWTXPOW */ (iw_handler) ieee80211_ioctl_giwtxpower, /* SIOCGIWTXPOW */
(iw_handler) ieee80211_ioctl_siwretry, /* SIOCSIWRETRY */ (iw_handler) ieee80211_ioctl_siwretry, /* SIOCSIWRETRY */
(iw_handler) ieee80211_ioctl_giwretry, /* SIOCGIWRETRY */ (iw_handler) ieee80211_ioctl_giwretry, /* SIOCGIWRETRY */
(iw_handler) ieee80211_ioctl_siwencode, /* SIOCSIWENCODE */ (iw_handler) ieee80211_ioctl_siwencode, /* SIOCSIWENCODE */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册