From: Andrew Lunn <andrew@lunn.ch>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Andrew Lunn <andrew@lunn.ch>,
flamingice@sourmilk.net, linux-wireless@vger.kernel.org,
linville@tuxdriver.com
Subject: Re: [PATCH] try 2: mac80211: Fix swapped parameters to ieee80211_set_channel()
Date: Thu, 13 Dec 2007 13:50:47 +0100 [thread overview]
Message-ID: <20071213125047.GD501@lunn.ch> (raw)
In-Reply-To: <1197549025.6558.253.camel@johannes.berg>
On Thu, Dec 13, 2007 at 01:30:25PM +0100, Johannes Berg wrote:
>
> > iwconfig wlan0 freq 5240
>
> man iwconfig(8)
>
> freq/channel
> Set the operating frequency or channel in the device. A value
> below 1000 indicates a channel number, a value greater than 1000
> is a frequency in Hz. You may append the suffix k, M or G to the
> value (for example, "2.46G" for 2.46 GHz frequency), or add
> enough ???0???.
Yup, see my last email.
However this description does not match the implementation. The
implementation is that its a channel if e = 0. My "frequency" is > 1000,
but it was still interpreted as a channel. Looking at the
implementation of iw_float2freq(), the description should be that a
value less than 1e9 is a channel.
So there should really be a check in the user space tools which says
that values between 1000 and 1e9 are invalid. This would catch errors
like the one i made for both 2.4GHz and 5GHz.
Andrew
next prev parent reply other threads:[~2007-12-13 12:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-12 15:31 [PATCH] mac80211: Fix swapped parameters to ieee80211_set_channel() Andrew Lunn
2007-12-12 17:43 ` Johannes Berg
2007-12-12 18:02 ` [PATCH] try 2: " Andrew Lunn
2007-12-12 18:09 ` Johannes Berg
2007-12-13 0:16 ` Johannes Berg
2007-12-13 12:09 ` Andrew Lunn
2007-12-13 12:30 ` Johannes Berg
2007-12-13 12:50 ` Andrew Lunn [this message]
2007-12-13 12:53 ` Johannes Berg
2007-12-13 13:07 ` [PATCH] wirelesstools: More user space validation of channel/frequency Andrew Lunn
2007-12-13 12:37 ` [PATCH] try 2: mac80211: Fix swapped parameters to ieee80211_set_channel() Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071213125047.GD501@lunn.ch \
--to=andrew@lunn.ch \
--cc=flamingice@sourmilk.net \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).