Search Linux Wireless

Re: [PATCH] iw: Add support for NL80211_ATTR_WIPHY_COVERAGE_CLASS

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

 



On Sun, Dec 6, 2009 at 9:29 AM, Lukáš Turek <8an@xxxxxxxxxxx> wrote:
> New nl80211 attribute NL80211_ATTR_WIPHY_COVERAGE_CLASS allows setting
> IEEE 802.11 coverage class, which is then used by drivers to calculate
> slot time and ACK timeout for long distance links.
>
> Two iw parameters are added: 'coverage' sets the coverage class
> directly, while 'distance' is more user-friendly, as it allows to set
> just the link distance and let iw do the necessary calculation itself.
>
> Signed-off-by: Lukas Turek <8an@xxxxxxxxxxx>
> ---
>  info.c    |    7 +++++++
>  nl80211.h |   15 +++++++++++++++
>  phy.c     |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 80 insertions(+), 0 deletions(-)
>
> diff --git a/info.c b/info.c
> index ddff78b..3c69afc 100644
> --- a/info.c
> +++ b/info.c
> @@ -264,6 +264,13 @@ static int print_phy_handler(struct nl_msg *msg, void *arg)
>                        printf("\tRTS threshold: %d\n", rts);
>        }
>
> +       if (tb_msg[NL80211_ATTR_WIPHY_COVERAGE_CLASS]) {
> +               unsigned int coverage;

Just some quick comments.

u8 seems more appropriate, given that you define this a u8 anyway.

> +
> +               coverage = nla_get_u8(tb_msg[NL80211_ATTR_WIPHY_COVERAGE_CLASS]);
> +               printf("\tCoverage class: %d (up to %dm)\n", coverage, 900 * coverage);

printf ?

  Luis
--
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