Search Linux Wireless

[PATCH 4/5 V2] b43: HT-PHY: implement lacking 0x908 PHY reg op

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Rafał Miłecki <zajec5@xxxxxxxxx>
---
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(-)

diff --git a/drivers/net/wireless/b43/phy_ht.c b/drivers/net/wireless/b43/phy_ht.c
index 42bea30..f09bb6e 100644
--- a/drivers/net/wireless/b43/phy_ht.c
+++ b/drivers/net/wireless/b43/phy_ht.c
@@ -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)),
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux