Skip to contentSkip to conversation

b43: HT-PHY: implement lacking 0x908 PHY reg op

PATCH New Rafał Miłecki 1 participant 1 message Jun 27, 2011 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH v2 4/5 b43: HT-PHY: implement lacking 0x908 PHY reg op

---
V2: do not negate masks

As always, I've hacked MMIO ops to return 0xFFFF for 0x908 PHY reg. This allowed finding masks used by closed source driver.

At the beginning 0x908 PHY reg ops are following:
phy_read(0x0908) -> 0xffff
phy_write(0x0908) <- 0x0002
(...)
phy_read(0x0908) -> 0xffff
phy_write(0x0908) <- 0x0020
(...)
phy_read(0x0908) -> 0xffff
phy_write(0x0908) <- 0x0200

Later this is always like this:
phy_read(0x0908) -> 0xffff
phy_write(0x0908) <- 0x0000

We do not know the proper condition yet, let's use FIXME for it.

---
 drivers/net/wireless/b43/phy_ht.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
drivers/net/wireless/b43/phy_ht.c +6 -1
index 42bea30..f09bb6e 100644
@@ -104,9 +104,14 @@ static void b43_phy_ht_channel_setup(struct b43_wldev *dev,
 
 	/* TODO: separated function? */
 	for (i = 0; i < 3; i++) {
+		u16 mask;
 		u32 tmp = b43_httab_read(dev, B43_HTTAB32(26, 0xE8));
 
-		/* TODO: some op on PHY reg 0x908 */
+		if (0) /* FIXME */
+			mask = 0x2 << (i * 4);
+		else
+			mask = 0;
+		b43_phy_mask(dev, B43_PHY_EXTG(0x108), mask);
 
 		b43_httab_write(dev, B43_HTTAB16(7, 0x110 + i), tmp >> 16);
 		b43_httab_write(dev, B43_HTTAB8(13, 0x63 + (i * 4)),
Signature · 1 line
1.7.1