Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183852
b: refs/heads/master
c: 4f4ab6c
h: refs/heads/master
v: v3
  • Loading branch information
Rafał Miłecki authored and John W. Linville committed Jan 19, 2010
1 parent 206c981 commit 2cad3eb
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 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: 53ae8e8c92b2715f27c95e8e7169bca9a8909856
refs/heads/master: 4f4ab6cd1486fcb0ab8d689d625ac7691198f36b
30 changes: 29 additions & 1 deletion trunk/drivers/net/wireless/b43/phy_n.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,34 @@ static void b43_nphy_update_mimo_config(struct b43_wldev *dev, s32 preamble)
b43_phy_write(dev, B43_NPHY_MIMOCFG, mimocfg);
}

/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/Chains */
static void b43_nphy_update_txrx_chain(struct b43_wldev *dev)
{
struct b43_phy_n *nphy = dev->phy.n;

bool override = false;
u16 chain = 0x33;

if (nphy->txrx_chain == 0) {
chain = 0x11;
override = true;
} else if (nphy->txrx_chain == 1) {
chain = 0x22;
override = true;
}

b43_phy_maskset(dev, B43_NPHY_RFSEQCA,
~(B43_NPHY_RFSEQCA_TXEN | B43_NPHY_RFSEQCA_RXEN),
chain);

if (override)
b43_phy_set(dev, B43_NPHY_RFSEQMODE,
B43_NPHY_RFSEQMODE_CAOVER);
else
b43_phy_mask(dev, B43_NPHY_RFSEQMODE,
~B43_NPHY_RFSEQMODE_CAOVER);
}

/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RxIqEst */
static void b43_nphy_rx_iq_est(struct b43_wldev *dev, struct nphy_iq_est *est,
u16 samps, u8 time, bool wait)
Expand Down Expand Up @@ -2223,7 +2251,7 @@ int b43_phy_initn(struct b43_wldev *dev)
b43_phy_write(dev, B43_NPHY_TXRIFS_FRDEL, 0x30);

b43_nphy_update_mimo_config(dev, nphy->preamble_override);
/* TODO Update TX/RX chain */
b43_nphy_update_txrx_chain(dev);

if (phy->rev < 2) {
b43_phy_write(dev, B43_NPHY_DUP40_GFBL, 0xAA8);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/b43/phy_n.h
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,7 @@ struct b43_phy_n {
bool txiqlocal_coeffsvalid;
struct b43_phy_n_txpwrindex txpwrindex[2];

u8 txrx_chain;
u16 tx_rx_cal_phy_saveregs[11];
u16 tx_rx_cal_radio_saveregs[22];

Expand Down

0 comments on commit 2cad3eb

Please sign in to comment.