Search Linux Wireless

Re: [PATCH 1/3] mac80211: add IEEE802.11e/WMM structures

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

 



On Fri, Jun 08, 2007 at 12:16:28PM +0200, Jiri Benc wrote:
> No. Michael is right and I'm really blind I haven't seen that myself.
> That's totally broken. You cannot do _any_ bit operation on __le16.
> 
> Let's assume that a value of short1 is 0x34 0x12 (two bytes as stored
> in a memory). Now let's look at the result of (short1 & 0xff).
> 
> On a LE platform that's (0x1234 & 0xff), i.e. 0x34.
> 
> On a BE platform that's (0x3412 & 0xff), i.e. 0x12.
> 
> How that could be correct?

You and Michael are right. The mask (i.e 0x00ff) need a cpu_to_le16()
in this case. I will replace the short with 2 bytes to fix this issue.

Thanks,
-yi
-
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