Skip to content

Commit

Permalink
b43: LCN-PHY: minor clean ups
Browse files Browse the repository at this point in the history
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Rafał Miłecki authored and John W. Linville committed Sep 27, 2011
1 parent 93dbd82 commit 177c373
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
2 changes: 1 addition & 1 deletion drivers/net/wireless/b43/phy_lcn.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ static void b43_phy_lcn_sense_setup(struct b43_wldev *dev,
b43_phy_set(dev, 0x4d0, 0x20);
b43_radio_write(dev, 0x112, 0x6);

/* TODO: dummy transmission? */
b43_dummy_transmission(dev, true, false);
/* Wait if not done */
if (!(b43_phy_read(dev, 0x476) & 0x8000))
udelay(10);
Expand Down
25 changes: 21 additions & 4 deletions drivers/net/wireless/b43/tables_phy_lcn.c
Original file line number Diff line number Diff line change
Expand Up @@ -657,8 +657,25 @@ void b43_phy_lcn_load_tx_gain_tab(struct b43_wldev *dev,
}
}

/* wlc_lcnphy_load_rfpower */
static void b43_phy_lcn_load_rfpower(struct b43_wldev *dev)
{
u32 bbmult, rfgain;
u8 i;

for (i = 0; i < 128; i++) {
bbmult = b43_lcntab_read(dev, B43_LCNTAB32(0x7, 0x140 + i));
bbmult >>= 20;
rfgain = b43_lcntab_read(dev, B43_LCNTAB32(0x7, 0xc0 + i));

/* TODO: calculate value for 0x240 + i table offset
* b43_lcntab_write(dev, B43_LCNTAB32(0x7, 0x240 + i), val);
*/
}
}

/* Not implemented in brcmsmac, noticed in wl in MMIO dump */
static void b43_phy_lcn_rewrite_tables(struct b43_wldev *dev)
static void b43_phy_lcn_rewrite_rfpower_table(struct b43_wldev *dev)
{
int i;
u32 tmp;
Expand All @@ -685,7 +702,7 @@ void b43_phy_lcn_tables_init(struct b43_wldev *dev)
b43_phy_lcn_upload_static_tables(dev);

if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
if (sprom->boardflags_lo & B43_BFL_EXTLNA)
if (sprom->boardflags_lo & B43_BFL_FEM)
b43_phy_lcn_load_tx_gain_tab(dev,
b43_lcntab_tx_gain_tbl_2ghz_ext_pa_rev0);
else
Expand All @@ -701,7 +718,7 @@ void b43_phy_lcn_tables_init(struct b43_wldev *dev)
else
b43err(dev->wl, "SW ctl table is unknown for this card\n");

/* TODO: various tables ops here */
b43_phy_lcn_rewrite_tables(dev);
b43_phy_lcn_load_rfpower(dev);
b43_phy_lcn_rewrite_rfpower_table(dev);
b43_phy_lcn_clean_papd_comp_table(dev);
}

0 comments on commit 177c373

Please sign in to comment.