airo: fix writerids() endianness
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 21 Dec 2007 04:04:35 +0000 (23:04 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:08:52 +0000 (15:08 -0800)
in writerids() we do _not_ byteswap, so we want to access
->opmode as little-endian.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/airo.c

index 68c5e54..87b6adb 100644 (file)
@@ -7865,9 +7865,9 @@ static int writerids(struct net_device *dev, aironet_ioctl *comp) {
                ConfigRid *cfg = (ConfigRid *)iobuf;
 
                if (test_bit(FLAG_MIC_CAPABLE, &ai->flags))
-                       cfg->opmode |= MODE_MIC;
+                       cfg->opmode |= cpu_to_le16(MODE_MIC);
 
-               if ((cfg->opmode & 0xFF) == MODE_STA_IBSS)
+               if ((le16_to_cpu(cfg->opmode) & 0xFF) == MODE_STA_IBSS)
                        set_bit (FLAG_ADHOC, &ai->flags);
                else
                        clear_bit (FLAG_ADHOC, &ai->flags);