b43: N-PHY: fix one bit off in parsing RF Ctrl Override arguments
authorRafał Miłecki <zajec5@gmail.com>
Mon, 25 Jan 2010 17:59:58 +0000 (18:59 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 25 Jan 2010 21:36:29 +0000 (16:36 -0500)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/b43/phy_n.c

index a45a1f3ced424b94e8dbce0f8aaa43786d3688cb..061b01b814d1efc676b0556f5fc31e98c342b968 100644 (file)
@@ -1031,7 +1031,7 @@ static void b43_nphy_rf_control_override(struct b43_wldev *dev, u16 field,
        u8 index = fls(field);
        u8 addr, en_addr, val_addr;
        /* we expect only one bit set */
-       B43_WARN_ON(field & (~(1 << index)));
+       B43_WARN_ON(field & (~(1 << (index - 1))));
 
        if (dev->phy.rev >= 3) {
                const struct nphy_rf_control_override_rev3 *rf_ctrl;