diff options
author | Arend van Spriel <arend@broadcom.com> | 2013-08-20 10:00:41 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-08-22 14:30:33 -0400 |
commit | d50ec00160b1842d492c8b871bcd16301454cdcf (patch) | |
tree | 3c4d585ce9d252ace85af930b80a7a77f20dd836 /drivers/net/wireless/brcm80211/brcmsmac | |
parent | 7de646854bb1405ccafaa5e3545df6657141f510 (diff) |
brcmsmac: fix TSSI idle estimation
The baseband multiplier must be zero during TSSI idle estimation
and restored afterwards.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Tested-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmsmac')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c index 236e8d90a5bc..e08b73a9b417 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c | |||
@@ -2836,6 +2836,8 @@ static void wlc_lcnphy_idle_tssi_est(struct brcms_phy_pub *ppi) | |||
2836 | read_radio_reg(pi, RADIO_2064_REG007) & 1; | 2836 | read_radio_reg(pi, RADIO_2064_REG007) & 1; |
2837 | u16 SAVE_jtag_auxpga = read_radio_reg(pi, RADIO_2064_REG0FF) & 0x10; | 2837 | u16 SAVE_jtag_auxpga = read_radio_reg(pi, RADIO_2064_REG0FF) & 0x10; |
2838 | u16 SAVE_iqadc_aux_en = read_radio_reg(pi, RADIO_2064_REG11F) & 4; | 2838 | u16 SAVE_iqadc_aux_en = read_radio_reg(pi, RADIO_2064_REG11F) & 4; |
2839 | u8 SAVE_bbmult = wlc_lcnphy_get_bbmult(pi); | ||
2840 | |||
2839 | idleTssi = read_phy_reg(pi, 0x4ab); | 2841 | idleTssi = read_phy_reg(pi, 0x4ab); |
2840 | suspend = (0 == (bcma_read32(pi->d11core, D11REGOFFS(maccontrol)) & | 2842 | suspend = (0 == (bcma_read32(pi->d11core, D11REGOFFS(maccontrol)) & |
2841 | MCTL_EN_MAC)); | 2843 | MCTL_EN_MAC)); |
@@ -2853,6 +2855,12 @@ static void wlc_lcnphy_idle_tssi_est(struct brcms_phy_pub *ppi) | |||
2853 | mod_radio_reg(pi, RADIO_2064_REG0FF, 0x10, 1 << 4); | 2855 | mod_radio_reg(pi, RADIO_2064_REG0FF, 0x10, 1 << 4); |
2854 | mod_radio_reg(pi, RADIO_2064_REG11F, 0x4, 1 << 2); | 2856 | mod_radio_reg(pi, RADIO_2064_REG11F, 0x4, 1 << 2); |
2855 | wlc_lcnphy_tssi_setup(pi); | 2857 | wlc_lcnphy_tssi_setup(pi); |
2858 | |||
2859 | mod_phy_reg(pi, 0x4d7, (0x1 << 0), (1 << 0)); | ||
2860 | mod_phy_reg(pi, 0x4d7, (0x1 << 6), (1 << 6)); | ||
2861 | |||
2862 | wlc_lcnphy_set_bbmult(pi, 0x0); | ||
2863 | |||
2856 | wlc_phy_do_dummy_tx(pi, true, OFF); | 2864 | wlc_phy_do_dummy_tx(pi, true, OFF); |
2857 | idleTssi = ((read_phy_reg(pi, 0x4ab) & (0x1ff << 0)) | 2865 | idleTssi = ((read_phy_reg(pi, 0x4ab) & (0x1ff << 0)) |
2858 | >> 0); | 2866 | >> 0); |
@@ -2874,6 +2882,7 @@ static void wlc_lcnphy_idle_tssi_est(struct brcms_phy_pub *ppi) | |||
2874 | 2882 | ||
2875 | mod_phy_reg(pi, 0x44c, (0x1 << 12), (0) << 12); | 2883 | mod_phy_reg(pi, 0x44c, (0x1 << 12), (0) << 12); |
2876 | 2884 | ||
2885 | wlc_lcnphy_set_bbmult(pi, SAVE_bbmult); | ||
2877 | wlc_lcnphy_set_tx_gain_override(pi, tx_gain_override_old); | 2886 | wlc_lcnphy_set_tx_gain_override(pi, tx_gain_override_old); |
2878 | wlc_lcnphy_set_tx_gain(pi, &old_gains); | 2887 | wlc_lcnphy_set_tx_gain(pi, &old_gains); |
2879 | wlc_lcnphy_set_tx_pwr_ctrl(pi, SAVE_txpwrctrl); | 2888 | wlc_lcnphy_set_tx_pwr_ctrl(pi, SAVE_txpwrctrl); |