提交 2ab1f519 编写于 作者: A Al Viro 提交者: David S. Miller

airo: fix writerids() endianness

in writerids() we do _not_ byteswap, so we want to access
->opmode as little-endian.
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 15617858
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册