Skip to contentSkip to conversation

b43: Fix a typo in the sync_stx routine

PATCH In review Gábor Stefanik 2 participants 2 messages Aug 10, 2009 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 b43: Fix a typo in the sync_stx routine

I completely missed the "one's complement" instruction from the specs.

---
drivers/net/wireless/b43/phy_lp.c | 2 +-

1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/wireless/b43/phy_lp.c +0 -0
index 46fe476..34ad738 100644
@@ -578,7 +578,7 @@ static void lpphy_sync_stx(struct b43_wldev *dev)
		tmp >>= e->rf_shift;
		tmp <<= e->phy_shift;
		b43_phy_maskset(dev, B43_PHY_OFDM(0xF2 + e->phy_offset),
-				e->mask << e->phy_shift, tmp);
+				~(e->mask << e->phy_shift), tmp);
	}
}
Signature · 1 line
1.6.2.4
#1 lore raw
Quoted 13 lines · Gábor Stefanik

I completely missed the "one's complement" instruction from the specs.

---
drivers/net/wireless/b43/phy_lp.c | 2 +-

1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/wireless/b43/phy_lp.c +0 -0
index 46fe476..34ad738 100644

drivers/net/wireless/b43/phy_lp.c static void lpphy_sync_stx(struct b43_wldev *dev) · line 584

Quoted 8 lines
drivers/net/wireless/b43/phy_lp.c +1 -1
@@ -578,7 +578,7 @@ static void lpphy_sync_stx(struct b43_wldev *dev)
        tmp >>= e->rf_shift;
        tmp <<= e->phy_shift;
        b43_phy_maskset(dev, B43_PHY_OFDM(0xF2 + e->phy_offset),
-                e->mask << e->phy_shift, tmp);
+                ~(e->mask << e->phy_shift), tmp);
    }
 }
 

I should have caught that one.

When debugging gets started, it might be useful to add a statement

      WARN_ON(mask & set);

at the start of b43_radio_maskset() and b43_phy_maskset(). That way these kind of mistakes will be caught early.

Larry