From: Al Viro Date: Fri, 21 Dec 2007 04:04:35 +0000 (-0500) Subject: airo: fix writerids() endianness X-Git-Tag: v2.6.25-rc1~1162^2~210 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ab1f519cbec0902cb86f1e29b10f2f00dd020c0;p=linux-2.6 airo: fix writerids() endianness in writerids() we do _not_ byteswap, so we want to access ->opmode as little-endian. Signed-off-by: Al Viro Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 68c5e54230..87b6adbc34 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c @@ -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);