Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183679
b: refs/heads/master
c: e50cbcf
h: refs/heads/master
i:
  183677: f7d089c
  183675: 64d75d3
  183671: 1b8c484
  183663: 0b4b6b0
  183647: 35b7023
  183615: a445755
  183551: 6ab0706
v: v3
  • Loading branch information
Rafał Miłecki authored and John W. Linville committed Jan 15, 2010
1 parent eaeba58 commit 1670cc7
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 90b9738d85395d46ffdc961e1a0c80a17e8f4d32
refs/heads/master: e50cbcf6741684753da401722f337efacfa4a98f
38 changes: 36 additions & 2 deletions trunk/drivers/net/wireless/b43/phy_n.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,40 @@ static void b43_nphy_workarounds(struct b43_wldev *dev)
b43_phy_write(dev, B43_NPHY_PHASETR_B2, 0x20);
}

/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/PA%20override */
static void b43_nphy_pa_override(struct b43_wldev *dev, bool enable)
{
struct b43_phy_n *nphy = dev->phy.n;
enum ieee80211_band band;
u16 tmp;

if (!enable) {
nphy->rfctrl_intc1_save = b43_phy_read(dev,
B43_NPHY_RFCTL_INTC1);
nphy->rfctrl_intc2_save = b43_phy_read(dev,
B43_NPHY_RFCTL_INTC2);
band = b43_current_band(dev->wl);
if (dev->phy.rev >= 3) {
if (band == IEEE80211_BAND_5GHZ)
tmp = 0x600;
else
tmp = 0x480;
} else {
if (band == IEEE80211_BAND_5GHZ)
tmp = 0x180;
else
tmp = 0x120;
}
b43_phy_write(dev, B43_NPHY_RFCTL_INTC1, tmp);
b43_phy_write(dev, B43_NPHY_RFCTL_INTC2, tmp);
} else {
b43_phy_write(dev, B43_NPHY_RFCTL_INTC1,
nphy->rfctrl_intc1_save);
b43_phy_write(dev, B43_NPHY_RFCTL_INTC2,
nphy->rfctrl_intc2_save);
}
}

/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/BmacPhyClkFgc */
static void b43_nphy_bmac_clock_fgc(struct b43_wldev *dev, bool force)
{
Expand Down Expand Up @@ -964,10 +998,10 @@ int b43_phy_initn(struct b43_wldev *dev)

/* TODO N PHY MAC PHY Clock Set with argument 1 */

/* b43_nphy_pa_override(dev, false); */
b43_nphy_pa_override(dev, false);
b43_nphy_force_rf_sequence(dev, B43_RFSEQ_RX2TX);
b43_nphy_force_rf_sequence(dev, B43_RFSEQ_RESET2RX);
/* b43_nphy_pa_override(dev, true); */
b43_nphy_pa_override(dev, true);

b43_nphy_classifier(dev, 0, 0);
b43_nphy_read_clip_detection(dev, clip);
Expand Down

0 comments on commit 1670cc7

Please sign in to comment.