On Monday 09 April 2007 04:07, Stefano Brivio wrote:
> I'm going to move all v4 workarounds needed for the A and G PHY setup into a
> separate file (draft inlined here), as it'll easily get to ~1000 lines, and
> I wouldn't really want to make a mess out of _phy.c. These workarounds
> are strictly needed for A PHY support (which I'm currently working on)
> and could yield as well better performances for G PHY. I'm developing
> this just for mac80211, and when I'm done with this patchset I'll drop
> my bcm43xx-softmac MAINTAINERS line. Please comment on that before I do. ;)
> 

Next time please insert the patch before the --  signature marker, as
some mailclients auto-strip that on reply ;)


+static void bcm43xx_wa_initgains(struct bcm43xx_wldev *dev)
+{
+       bcm43xx_phy_write(dev, 0x001C | BCM43xx_PHYROUTE_OFDM_GPHY, 0xFFFF);
+       bcm43xx_phy_write(dev, 0x0020 | BCM43xx_PHYROUTE_OFDM_GPHY,
+               bcm43xx_phy_read(dev, 0x0020 | BCM43xx_PHYROUTE_OFDM_GPHY) & 
0xFF0F);
+       if (dev->phy->rev <= 2)

Did you actually compile this? phy is not a pointer.

+static void bcm43xx_wa_tr_ltov(struct bcm43xx_wldev *dev)
+{ // TR Lookup Table Original Values
+       bcm43xx_gtab_write(dev, 0x002E, 0x0298, 0xC480);
+}

Put that comment in front of the function and use /* */ style.

+static void bcm43xx_wa_boards_g(struct bcm43xx_wldev *dev)
+{
+       struct ssb_bus *bus = dev->dev->bus;
+       struct bcm43xx_phy *phy = &dev->phy;
+
+       if (bus->board_vendor != SSB_BOARDVENDOR_BCM ||
+           bus->board_type != SSB_BOARD_BU4306 ||
+           bus->board_rev != 0x17) {
+               if (phy->rev < 2) {
+                       bcm43xx_ofdmtab_write16(dev, 0x0014, 1, 0x0002);
+                       bcm43xx_ofdmtab_write16(dev, 0x0014, 2, 0x0001);
+               } else {
+                       bcm43xx_ofdmtab_write16(dev, 0x0001, 1, 0x0002);
+                       bcm43xx_ofdmtab_write16(dev, 0x0001, 2, 0x0001);
+                       if (bus->sprom.r1.boardflags_lo & BCM43xx_BFL_EXTLNA &&
+                           phy->rev >= 7) {

Put () around the bitwise &. (I think the compiler even complains about this).

-- 
Greetings Michael.
_______________________________________________
Bcm43xx-dev mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev

Reply via email to