653-0006-rtl8xxxu-Add-rtl8188e_disabled_to_emu.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. From b7335df2dc1b4c6c69ac6b95910d09a7dd5295a7 Mon Sep 17 00:00:00 2001
  2. From: Jes Sorensen <Jes.Sorensen@redhat.com>
  3. Date: Wed, 29 Jun 2016 10:38:52 -0400
  4. Subject: [PATCH] rtl8xxxu: Add rtl8188e_disabled_to_emu()
  5. This sequence is found in the vendor driver, but never actually
  6. called. It's unclear if we need it.
  7. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
  8. ---
  9. drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c | 11 +++++++++++
  10. 1 file changed, 11 insertions(+)
  11. --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c
  12. +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c
  13. @@ -92,6 +92,15 @@ static int rtl8188eu_load_firmware(struc
  14. return ret;
  15. }
  16. +static void rtl8188e_disabled_to_emu(struct rtl8xxxu_priv *priv)
  17. +{
  18. + u16 val16;
  19. +
  20. + val16 = rtl8xxxu_read16(priv, REG_APS_FSMCO);
  21. + val16 &= ~(APS_FSMCO_PFM_WOWL | APS_FSMCO_ENABLE_POWERDOWN);
  22. + rtl8xxxu_write16(priv, REG_APS_FSMCO, val16);
  23. +}
  24. +
  25. static int rtl8188e_emu_to_active(struct rtl8xxxu_priv *priv)
  26. {
  27. u8 val8;
  28. @@ -165,6 +174,8 @@ static int rtl8188eu_power_on(struct rtl
  29. {
  30. int ret;
  31. + rtl8188e_disabled_to_emu(priv);
  32. +
  33. ret = rtl8188e_emu_to_active(priv);
  34. if (ret)
  35. goto exit;