Search Linux Wireless

Re: [PATCH] try 2: mac80211: Fix swapped parameters to ieee80211_set_channel()

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

 



On Thu, Dec 13, 2007 at 01:09:04PM +0100, Andrew Lunn wrote:
> On Thu, Dec 13, 2007 at 01:16:14AM +0100, Johannes Berg wrote:
> > > Acked-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>
> > 
> > Actually, I take that back.
> > 
> > The code is correct, as per the comment above it. Stupid wext :/
> > 
> >         /* freq->e == 0: freq->m = channel; otherwise freq = m * 10^e */
> >         if (freq->e == 0) {
> >                 if (freq->m < 0) {
> >                         if (sdata->type == IEEE80211_IF_TYPE_STA)
> >                                 sdata->u.sta.flags |=
> >                                         IEEE80211_STA_AUTO_CHANNEL_SEL;
> >                         return 0;
> >                 } else  
> >                         return ieee80211_set_channel(local, freq->m, -1);
> > 
> 
> Probably a stupid question, but are you sure the comment is correct?
> 
> I added a printk for freq->e and freq->m. When i do
> 
> iwconfig wlan0 freq 5240

O.K. I'm stupid!

That command line should be 
iwconfig wlan0 freq 5240M

Otherwise it tries to use 5240 HZ, which results in e == 0!

Maybe i should add a helpful hint to iwconfig. if setting the frequency
fails, and the frequency is < 2GHz, give the user a hit that maybe
they are missing postfix?

Patch withdraw, brain upgrade requested instead.

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