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

i see that e = 0, m = 5240 and that with my patch in place everything
is happy. Without the patch, it passes 5240 as a channel, not a
frequency and i get an EINVAL. 

So either the comment is wrong, or the comment is correct but
something is filling in freq wrongly. 

Any ideas?

    Thanks
        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