7478d9be8f3afa6d9477f20664a9f750e76a5d04
[openwrt/openwrt.git] / target / linux / brcm2708 / patches-3.14 / 0021-wifi-add-patches-from-3.6.y-tree-to-make-rtl8192cu-w.patch
1 From eaaa194153e61ed6f9fec8dda18f3e462187d327 Mon Sep 17 00:00:00 2001
2 From: popcornmix <popcornmix@gmail.com>
3 Date: Sat, 9 Nov 2013 13:32:03 +0000
4 Subject: [PATCH 21/54] wifi: add patches from 3.6.y tree to make rtl8192cu
5 work
6
7 wifi: add missing patch from 3.6.y tree to disable debug
8 ---
9 drivers/net/wireless/rtl8192cu/Kconfig | 4 +++-
10 drivers/net/wireless/rtl8192cu/Makefile | 6 +++++-
11 drivers/net/wireless/rtl8192cu/include/autoconf.h | 2 +-
12 drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.c | 13 +++++++++++++
13 drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c | 1 +
14 5 files changed, 23 insertions(+), 3 deletions(-)
15
16 diff --git a/drivers/net/wireless/rtl8192cu/Kconfig b/drivers/net/wireless/rtl8192cu/Kconfig
17 index bee5ed6..ef46361 100644
18 --- a/drivers/net/wireless/rtl8192cu/Kconfig
19 +++ b/drivers/net/wireless/rtl8192cu/Kconfig
20 @@ -1,6 +1,8 @@
21 config RTL8192CU
22 tristate "Realtek 8192C USB WiFi"
23 depends on USB
24 + select WIRELESS_EXT
25 + select WEXT_PRIV
26 ---help---
27 - Help message of RTL8192CU
28 + Enable wireless network adapters based on Realtek RTL8192C chipset family, such as EDUP nano series
29
30 diff --git a/drivers/net/wireless/rtl8192cu/Makefile b/drivers/net/wireless/rtl8192cu/Makefile
31 index c399011..f85c59f 100644
32 --- a/drivers/net/wireless/rtl8192cu/Makefile
33 +++ b/drivers/net/wireless/rtl8192cu/Makefile
34 @@ -38,7 +38,7 @@ CONFIG_RTL8192CU_REDEFINE_1X1 = n
35 CONFIG_INTEL_WIDI = n
36 CONFIG_WAKE_ON_WLAN = n
37
38 -CONFIG_PLATFORM_I386_PC = y
39 +CONFIG_PLATFORM_I386_PC = n
40 CONFIG_PLATFORM_TI_AM3517 = n
41 CONFIG_PLATFORM_ANDROID_X86 = n
42 CONFIG_PLATFORM_JB_X86 = n
43 @@ -524,6 +524,10 @@ KVER := 3.3.0
44 #KSRC:= ../lichee/linux-3.3/
45 endif
46
47 +ifeq ($(CONFIG_ARCH_BCM2708), y)
48 +EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
49 +endif
50 +
51 ifneq ($(USER_MODULE_NAME),)
52 MODULE_NAME := $(USER_MODULE_NAME)
53 endif
54 diff --git a/drivers/net/wireless/rtl8192cu/include/autoconf.h b/drivers/net/wireless/rtl8192cu/include/autoconf.h
55 index 12294df..1341ff0 100644
56 --- a/drivers/net/wireless/rtl8192cu/include/autoconf.h
57 +++ b/drivers/net/wireless/rtl8192cu/include/autoconf.h
58 @@ -296,7 +296,7 @@
59 //#define CONFIG_DEBUG_RTL871X
60
61 #define DBG 0
62 -#define CONFIG_DEBUG_RTL819X
63 +//#define CONFIG_DEBUG_RTL819X
64
65 #define CONFIG_PROC_DEBUG 1
66
67 diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.c
68 index 82dee6d..b0bf0e9 100644
69 --- a/drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.c
70 +++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.c
71 @@ -277,6 +277,18 @@ static int rtw_proc_cnt = 0;
72
73 #define RTW_PROC_NAME DRV_NAME
74
75 +#ifndef create_proc_entry
76 +/* dummy routines */
77 +void rtw_proc_remove_one(struct net_device *dev)
78 +{
79 +}
80 +
81 +void rtw_proc_init_one(struct net_device *dev)
82 +{
83 +}
84 +
85 +#else /* create_proc_entry not defined */
86 +
87 void rtw_proc_init_one(struct net_device *dev)
88 {
89 struct proc_dir_entry *dir_dev = NULL;
90 @@ -751,6 +763,7 @@ void rtw_proc_remove_one(struct net_device *dev)
91 }
92 }
93 }
94 +#endif /* create_proc_entry not defined */
95 #endif
96
97 uint loadparam( _adapter *padapter, _nic_hdl pnetdev);
98 diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c
99 index 4c1089a..baccb59 100644
100 --- a/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c
101 +++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c
102 @@ -138,6 +138,7 @@ static void rtw_dev_remove(struct usb_interface *pusb_intf);
103 {USB_DEVICE(0x2001, 0x3307)},/* D-Link - Cameo */ \
104 {USB_DEVICE(0x2001, 0x330A)},/* D-Link - Alpha */ \
105 {USB_DEVICE(0x2001, 0x3309)},/* D-Link - Alpha */ \
106 + {USB_DEVICE(0x2001, 0x330D)},/* D-Link - Alpha(?) */ \
107 {USB_DEVICE(0x0586, 0x341F)},/* Zyxel - Abocom */ \
108 {USB_DEVICE(0x7392, 0x7822)},/* Edimax - Edimax */ \
109 {USB_DEVICE(0x2019, 0xAB2B)},/* Planex - Abocom */ \
110 --
111 1.9.1
112