mac80211: add RedPine RS9113 module support
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / 653-0004-rtl8xxxu-Detect-8188eu-parts-correctly.patch
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
6 8188 parts with chip_cut >= 2 are assumed to be 8188eu.
7
8 Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
9 ---
10 .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 22 +++++++++++++++-------
11 1 file changed, 15 insertions(+), 7 deletions(-)
12
13 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
14 +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
15 @@ -1683,13 +1683,21 @@ static int rtl8xxxu_identify_chip(struct
16 }
17 priv->has_wifi = 1;
18 } else {
19 - sprintf(priv->chip_name, "8188CU");
20 - priv->rf_paths = 1;
21 - priv->rx_paths = 1;
22 - priv->tx_paths = 1;
23 - priv->rtl_chip = RTL8188C;
24 - priv->usb_interrupts = 1;
25 - priv->has_wifi = 1;
26 + if (priv->chip_cut >= 2) {
27 + sprintf(priv->chip_name, "8188EU");
28 + priv->rf_paths = 1;
29 + priv->rx_paths = 1;
30 + priv->tx_paths = 1;
31 + priv->rtl_chip = RTL8188E;
32 + } else {
33 + sprintf(priv->chip_name, "8188CU");
34 + priv->rf_paths = 1;
35 + priv->rx_paths = 1;
36 + priv->tx_paths = 1;
37 + priv->rtl_chip = RTL8188C;
38 + priv->usb_interrupts = 1;
39 + priv->has_wifi = 1;
40 + }
41 }
42
43 switch (priv->rtl_chip) {