openwrtv4/target/linux/brcm2708/patches-3.14/0021-wifi-add-patches-from-3.6.y-tree-to-make-rtl8192cu-w.patch

113 lines
3.8 KiB
Diff
Raw Normal View History

From eaaa194153e61ed6f9fec8dda18f3e462187d327 Mon Sep 17 00:00:00 2001
From: popcornmix <popcornmix@gmail.com>
Date: Sat, 9 Nov 2013 13:32:03 +0000
Subject: [PATCH 21/54] wifi: add patches from 3.6.y tree to make rtl8192cu
work
wifi: add missing patch from 3.6.y tree to disable debug
---
drivers/net/wireless/rtl8192cu/Kconfig | 4 +++-
drivers/net/wireless/rtl8192cu/Makefile | 6 +++++-
drivers/net/wireless/rtl8192cu/include/autoconf.h | 2 +-
drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.c | 13 +++++++++++++
drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c | 1 +
5 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/rtl8192cu/Kconfig b/drivers/net/wireless/rtl8192cu/Kconfig
index bee5ed6..ef46361 100644
--- a/drivers/net/wireless/rtl8192cu/Kconfig
+++ b/drivers/net/wireless/rtl8192cu/Kconfig
@@ -1,6 +1,8 @@
config RTL8192CU
tristate "Realtek 8192C USB WiFi"
depends on USB
+ select WIRELESS_EXT
+ select WEXT_PRIV
---help---
- Help message of RTL8192CU
+ Enable wireless network adapters based on Realtek RTL8192C chipset family, such as EDUP nano series
diff --git a/drivers/net/wireless/rtl8192cu/Makefile b/drivers/net/wireless/rtl8192cu/Makefile
index c399011..f85c59f 100644
--- a/drivers/net/wireless/rtl8192cu/Makefile
+++ b/drivers/net/wireless/rtl8192cu/Makefile
@@ -38,7 +38,7 @@ CONFIG_RTL8192CU_REDEFINE_1X1 = n
CONFIG_INTEL_WIDI = n
CONFIG_WAKE_ON_WLAN = n
-CONFIG_PLATFORM_I386_PC = y
+CONFIG_PLATFORM_I386_PC = n
CONFIG_PLATFORM_TI_AM3517 = n
CONFIG_PLATFORM_ANDROID_X86 = n
CONFIG_PLATFORM_JB_X86 = n
@@ -524,6 +524,10 @@ KVER := 3.3.0
#KSRC:= ../lichee/linux-3.3/
endif
+ifeq ($(CONFIG_ARCH_BCM2708), y)
+EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
+endif
+
ifneq ($(USER_MODULE_NAME),)
MODULE_NAME := $(USER_MODULE_NAME)
endif
diff --git a/drivers/net/wireless/rtl8192cu/include/autoconf.h b/drivers/net/wireless/rtl8192cu/include/autoconf.h
index 12294df..1341ff0 100644
--- a/drivers/net/wireless/rtl8192cu/include/autoconf.h
+++ b/drivers/net/wireless/rtl8192cu/include/autoconf.h
@@ -296,7 +296,7 @@
//#define CONFIG_DEBUG_RTL871X
#define DBG 0
-#define CONFIG_DEBUG_RTL819X
+//#define CONFIG_DEBUG_RTL819X
#define CONFIG_PROC_DEBUG 1
diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.c
index 82dee6d..b0bf0e9 100644
--- a/drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.c
+++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.c
@@ -277,6 +277,18 @@ static int rtw_proc_cnt = 0;
#define RTW_PROC_NAME DRV_NAME
+#ifndef create_proc_entry
+/* dummy routines */
+void rtw_proc_remove_one(struct net_device *dev)
+{
+}
+
+void rtw_proc_init_one(struct net_device *dev)
+{
+}
+
+#else /* create_proc_entry not defined */
+
void rtw_proc_init_one(struct net_device *dev)
{
struct proc_dir_entry *dir_dev = NULL;
@@ -751,6 +763,7 @@ void rtw_proc_remove_one(struct net_device *dev)
}
}
}
+#endif /* create_proc_entry not defined */
#endif
uint loadparam( _adapter *padapter, _nic_hdl pnetdev);
diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c
index 4c1089a..baccb59 100644
--- a/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c
+++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c
@@ -138,6 +138,7 @@ static void rtw_dev_remove(struct usb_interface *pusb_intf);
{USB_DEVICE(0x2001, 0x3307)},/* D-Link - Cameo */ \
{USB_DEVICE(0x2001, 0x330A)},/* D-Link - Alpha */ \
{USB_DEVICE(0x2001, 0x3309)},/* D-Link - Alpha */ \
+ {USB_DEVICE(0x2001, 0x330D)},/* D-Link - Alpha(?) */ \
{USB_DEVICE(0x0586, 0x341F)},/* Zyxel - Abocom */ \
{USB_DEVICE(0x7392, 0x7822)},/* Edimax - Edimax */ \
{USB_DEVICE(0x2019, 0xAB2B)},/* Planex - Abocom */ \
--
1.9.1