653-0008-rtl8xxxu-Add-rtl8188e_usb_quirk-for-enabling-MAC-TX-.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. From 58edb5e9811879e0a8e87f90057f12f615eab2d1 Mon Sep 17 00:00:00 2001
  2. From: Jes Sorensen <Jes.Sorensen@redhat.com>
  3. Date: Wed, 29 Jun 2016 11:47:10 -0400
  4. Subject: [PATCH] rtl8xxxu: Add rtl8188e_usb_quirk() for enabling MAC TX/RX
  5. Due to a bug in the 8188e chips, this has to be done after setting
  6. REG_TRXFF_BNDY.
  7. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
  8. ---
  9. drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c | 15 +++++++++++++++
  10. 1 file changed, 15 insertions(+)
  11. --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c
  12. +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c
  13. @@ -200,9 +200,24 @@ exit:
  14. return ret;
  15. }
  16. +static void rtl8188e_usb_quirks(struct rtl8xxxu_priv *priv)
  17. +{
  18. + u16 val16;
  19. +
  20. + /*
  21. + * Technically this is not a USB quirk, but a chip quirk.
  22. + * This has to be done after REG_TRXFF_BNDY is set, see
  23. + * rtl8188eu_power_on() for details.
  24. + */
  25. + val16 = rtl8xxxu_read16(priv, REG_CR);
  26. + val16 |= (CR_MAC_TX_ENABLE | CR_MAC_RX_ENABLE);
  27. + rtl8xxxu_write16(priv, REG_CR, val16);
  28. +}
  29. +
  30. struct rtl8xxxu_fileops rtl8188eu_fops = {
  31. .parse_efuse = rtl8188eu_parse_efuse,
  32. .load_firmware = rtl8188eu_load_firmware,
  33. .power_on = rtl8188eu_power_on,
  34. .reset_8051 = rtl8xxxu_reset_8051,
  35. + .usb_quirks = rtl8188e_usb_quirks,
  36. };