653-0039-rtl8xxxu-Implement-8188eu-specific-8051-reset-functi.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From 660a287a0a32ce9f8be9b3ad625c597ad1ed38a2 Mon Sep 17 00:00:00 2001
  2. From: Jes Sorensen <Jes.Sorensen@redhat.com>
  3. Date: Wed, 10 Aug 2016 15:40:30 -0400
  4. Subject: [PATCH] rtl8xxxu: Implement 8188eu specific 8051 reset function
  5. The 8188eu doesn't seem to require the additional hacks used on some
  6. other chips.
  7. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
  8. ---
  9. drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c | 14 +++++++++++++-
  10. 1 file changed, 13 insertions(+), 1 deletion(-)
  11. --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c
  12. +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c
  13. @@ -505,6 +505,18 @@ static int rtl8188eu_parse_efuse(struct
  14. return 0;
  15. }
  16. +void rtl8188eu_reset_8051(struct rtl8xxxu_priv *priv)
  17. +{
  18. + u16 sys_func;
  19. +
  20. + sys_func = rtl8xxxu_read16(priv, REG_SYS_FUNC);
  21. + sys_func &= ~SYS_FUNC_CPU_ENABLE;
  22. + rtl8xxxu_write16(priv, REG_SYS_FUNC, sys_func);
  23. +
  24. + sys_func |= SYS_FUNC_CPU_ENABLE;
  25. + rtl8xxxu_write16(priv, REG_SYS_FUNC, sys_func);
  26. +}
  27. +
  28. static int rtl8188eu_load_firmware(struct rtl8xxxu_priv *priv)
  29. {
  30. char *fw_name;
  31. @@ -1204,7 +1216,7 @@ struct rtl8xxxu_fileops rtl8188eu_fops =
  32. .load_firmware = rtl8188eu_load_firmware,
  33. .power_on = rtl8188eu_power_on,
  34. .power_off = rtl8xxxu_power_off,
  35. - .reset_8051 = rtl8xxxu_reset_8051,
  36. + .reset_8051 = rtl8188eu_reset_8051,
  37. .llt_init = rtl8xxxu_auto_llt_table,
  38. .init_phy_bb = rtl8188eu_init_phy_bb,
  39. .init_phy_rf = rtl8188eu_init_phy_rf,