Search Linux Wireless

Re: [PATCH] mac80211: Add SIOCGIWTXPOWER routine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/7/07, Larry Finger <Larry.Finger@xxxxxxxxxxxx> wrote:
> The wireless extensions ioctl's implemented in mac80211 do not include
> SIOCGIWTXPOWER. This patch adds the necessary code.
>
> Signed-off-by: Larry Finger <Larry.Finger@xxxxxxxxxxxx>
> ---
>
> Index: wireless-dev/net/mac80211/ieee80211_ioctl.c
> ===================================================================
> --- wireless-dev.orig/net/mac80211/ieee80211_ioctl.c
> +++ wireless-dev/net/mac80211/ieee80211_ioctl.c
> @@ -1925,6 +1925,20 @@ static int ieee80211_ioctl_giwrate(struc
>         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 = 0;

 data->txpower.disabled = !(local->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)
> @@ -2881,7 +2895,7 @@ static const iw_handler ieee80211_handle
>         (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 linux-wireless" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux