653-0004-rtl8xxxu-Detect-8188eu-parts-correctly.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From ac5a363d61caee80e7b4464e55ab012a4450ef5d Mon Sep 17 00:00:00 2001
  2. From: Jes Sorensen <Jes.Sorensen@redhat.com>
  3. Date: Mon, 27 Jun 2016 15:34:00 -0400
  4. Subject: [PATCH] rtl8xxxu: Detect 8188eu parts correctly
  5. 8188 parts with chip_cut >= 2 are assumed to be 8188eu.
  6. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
  7. ---
  8. .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 22 +++++++++++++++-------
  9. 1 file changed, 15 insertions(+), 7 deletions(-)
  10. --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
  11. +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
  12. @@ -1683,13 +1683,21 @@ static int rtl8xxxu_identify_chip(struct
  13. }
  14. priv->has_wifi = 1;
  15. } else {
  16. - sprintf(priv->chip_name, "8188CU");
  17. - priv->rf_paths = 1;
  18. - priv->rx_paths = 1;
  19. - priv->tx_paths = 1;
  20. - priv->rtl_chip = RTL8188C;
  21. - priv->usb_interrupts = 1;
  22. - priv->has_wifi = 1;
  23. + if (priv->chip_cut >= 2) {
  24. + sprintf(priv->chip_name, "8188EU");
  25. + priv->rf_paths = 1;
  26. + priv->rx_paths = 1;
  27. + priv->tx_paths = 1;
  28. + priv->rtl_chip = RTL8188E;
  29. + } else {
  30. + sprintf(priv->chip_name, "8188CU");
  31. + priv->rf_paths = 1;
  32. + priv->rx_paths = 1;
  33. + priv->tx_paths = 1;
  34. + priv->rtl_chip = RTL8188C;
  35. + priv->usb_interrupts = 1;
  36. + priv->has_wifi = 1;
  37. + }
  38. }
  39. switch (priv->rtl_chip) {