Skip to content

Commit

Permalink
airo: fix writerids() endianness
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Al Viro authored and David S. Miller committed Jan 28, 2008
1 parent 1561785 commit 2ab1f51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/airo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2ab1f51

Please sign in to comment.