653-0007-rtl8xxxu-8188e-Enable-scheduler.patch 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. From 682ffd261c494581b8fdbc81f42035a53c67f5c4 Mon Sep 17 00:00:00 2001
  2. From: Jes Sorensen <Jes.Sorensen@redhat.com>
  3. Date: Wed, 29 Jun 2016 11:07:13 -0400
  4. Subject: [PATCH] rtl8xxxu: 8188e: Enable scheduler
  5. This enables the schduler, DMA, etc, except for MAC RX/TX which has to
  6. be set after REG_TRXFF_BNDY due to a hardware bug in the 8188e
  7. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
  8. ---
  9. drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c | 16 ++++++++++++++++
  10. 1 file changed, 16 insertions(+)
  11. --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c
  12. +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c
  13. @@ -172,6 +172,7 @@ exit:
  14. static int rtl8188eu_power_on(struct rtl8xxxu_priv *priv)
  15. {
  16. + u16 val16;
  17. int ret;
  18. rtl8188e_disabled_to_emu(priv);
  19. @@ -180,6 +181,21 @@ static int rtl8188eu_power_on(struct rtl
  20. if (ret)
  21. goto exit;
  22. + /*
  23. + * Enable MAC DMA/WMAC/SCHEDULE/SEC block
  24. + * Set CR bit10 to enable 32k calibration.
  25. + * We do not set CR_MAC_TX_ENABLE | CR_MAC_RX_ENABLE here
  26. + * due to a hardware bug in the 88E, requiring those to be
  27. + * set after REG_TRXFF_BNDY is set. If not the RXFF bundary
  28. + * will get set to a larger buffer size than the real buffer
  29. + * size.
  30. + */
  31. + val16 = (CR_HCI_TXDMA_ENABLE | CR_HCI_RXDMA_ENABLE |
  32. + CR_TXDMA_ENABLE | CR_RXDMA_ENABLE |
  33. + CR_PROTOCOL_ENABLE | CR_SCHEDULE_ENABLE |
  34. + CR_SECURITY_ENABLE | CR_CALTIMER_ENABLE);
  35. + rtl8xxxu_write16(priv, REG_CR, val16);
  36. +
  37. exit:
  38. return ret;
  39. }