653-0040-rtl8xxxu-Disable-packet-DMA-aggregation-on-8188eu.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From f435337a2fc97c97476d833700e4a8fd17d99007 Mon Sep 17 00:00:00 2001
  2. From: Jes Sorensen <Jes.Sorensen@redhat.com>
  3. Date: Wed, 10 Aug 2016 15:41:13 -0400
  4. Subject: [PATCH] rtl8xxxu: Disable packet DMA aggregation on 8188eu
  5. For now disable packet DMA aggregation on the 8188eu, rather then
  6. risking the feature being left on by the init tables.
  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, 14 insertions(+)
  11. --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c
  12. +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c
  13. @@ -461,6 +461,19 @@ void rtl8188eu_config_channel(struct iee
  14. }
  15. }
  16. +void rtl8188eu_init_aggregation(struct rtl8xxxu_priv *priv)
  17. +{
  18. + u8 agg_ctrl, usb_spec;
  19. +
  20. + usb_spec = rtl8xxxu_read8(priv, REG_USB_SPECIAL_OPTION);
  21. + usb_spec &= ~USB_SPEC_USB_AGG_ENABLE;
  22. + rtl8xxxu_write8(priv, REG_USB_SPECIAL_OPTION, usb_spec);
  23. +
  24. + agg_ctrl = rtl8xxxu_read8(priv, REG_TRXDMA_CTRL);
  25. + agg_ctrl &= ~TRXDMA_CTRL_RXDMA_AGG_EN;
  26. + rtl8xxxu_write8(priv, REG_TRXDMA_CTRL, agg_ctrl);
  27. +}
  28. +
  29. static int rtl8188eu_parse_efuse(struct rtl8xxxu_priv *priv)
  30. {
  31. struct rtl8188eu_efuse *efuse = &priv->efuse_wifi.efuse8188eu;
  32. @@ -1223,6 +1236,7 @@ struct rtl8xxxu_fileops rtl8188eu_fops =
  33. .phy_iq_calibrate = rtl8188eu_phy_iq_calibrate,
  34. .config_channel = rtl8188eu_config_channel,
  35. .parse_rx_desc = rtl8xxxu_parse_rxdesc16,
  36. + .init_aggregation = rtl8188eu_init_aggregation,
  37. .enable_rf = rtl8188e_enable_rf,
  38. .disable_rf = rtl8188e_disable_rf,
  39. .usb_quirks = rtl8188e_usb_quirks,