Commit 6431ea00 authored by Jes Sorensen's avatar Jes Sorensen Committed by Kalle Valo

rtl8xxxu: Group USB fixups together for all chips

In addition do not apply fixups for 8188/8191/8192 A-cut UMC parts.
Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 14d88560
......@@ -4757,11 +4757,42 @@ static int rtl8xxxu_init_device(struct ieee80211_hw *hw)
}
}
if (priv->rtlchip == 0x8192e) {
/* Fix USB interface interference issue */
if (priv->rtlchip == 0x8723a) {
rtl8xxxu_write8(priv, 0xfe40, 0xe0);
rtl8xxxu_write8(priv, 0xfe41, 0x8d);
rtl8xxxu_write8(priv, 0xfe42, 0x80);
rtl8xxxu_write32(priv, REG_TXDMA_OFFSET_CHK, 0xfd0320);
} else {
val32 = rtl8xxxu_read32(priv, REG_TXDMA_OFFSET_CHK);
val32 |= TXDMA_OFFSET_DROP_DATA_EN;
rtl8xxxu_write32(priv, REG_TXDMA_OFFSET_CHK, val32);
}
/* Solve too many protocol error on USB bus */
/* Can't do this for 8188/8192 UMC A cut parts */
if (priv->rtlchip == 0x8723a ||
((priv->rtlchip == 0x8192c || priv->rtlchip == 0x8191c ||
priv->rtlchip == 0x8188c) &&
(priv->chip_cut || !priv->vendor_umc))) {
rtl8xxxu_write8(priv, 0xfe40, 0xe6);
rtl8xxxu_write8(priv, 0xfe41, 0x94);
rtl8xxxu_write8(priv, 0xfe42, 0x80);
rtl8xxxu_write8(priv, 0xfe40, 0xe0);
rtl8xxxu_write8(priv, 0xfe41, 0x19);
rtl8xxxu_write8(priv, 0xfe42, 0x80);
rtl8xxxu_write8(priv, 0xfe40, 0xe5);
rtl8xxxu_write8(priv, 0xfe41, 0x91);
rtl8xxxu_write8(priv, 0xfe42, 0x80);
rtl8xxxu_write8(priv, 0xfe40, 0xe2);
rtl8xxxu_write8(priv, 0xfe41, 0x81);
rtl8xxxu_write8(priv, 0xfe42, 0x80);
}
if (priv->rtlchip == 0x8192e || priv->rtlchip == 0x8723b) {
rtl8xxxu_write32(priv, REG_HIMR0, 0x00);
rtl8xxxu_write32(priv, REG_HIMR1, 0x00);
}
......@@ -4968,30 +4999,6 @@ static int rtl8xxxu_init_device(struct ieee80211_hw *hw)
rtl8723a_phy_lc_calibrate(priv);
/* fix USB interface interference issue */
rtl8xxxu_write8(priv, 0xfe40, 0xe0);
rtl8xxxu_write8(priv, 0xfe41, 0x8d);
rtl8xxxu_write8(priv, 0xfe42, 0x80);
rtl8xxxu_write32(priv, REG_TXDMA_OFFSET_CHK, 0xfd0320);
/* Solve too many protocol error on USB bus */
/* Can't do this for 8188/8192 UMC A cut parts */
rtl8xxxu_write8(priv, 0xfe40, 0xe6);
rtl8xxxu_write8(priv, 0xfe41, 0x94);
rtl8xxxu_write8(priv, 0xfe42, 0x80);
rtl8xxxu_write8(priv, 0xfe40, 0xe0);
rtl8xxxu_write8(priv, 0xfe41, 0x19);
rtl8xxxu_write8(priv, 0xfe42, 0x80);
rtl8xxxu_write8(priv, 0xfe40, 0xe5);
rtl8xxxu_write8(priv, 0xfe41, 0x91);
rtl8xxxu_write8(priv, 0xfe42, 0x80);
rtl8xxxu_write8(priv, 0xfe40, 0xe2);
rtl8xxxu_write8(priv, 0xfe41, 0x81);
rtl8xxxu_write8(priv, 0xfe42, 0x80);
/* Init BT hw config. */
rtl8xxxu_init_bt(priv);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment