RTL8812AU: update package to the stable branch 4.3.20

- Rebase all required patches to this driver version;
- Drop uneeded patches for compilation issue with gcc5 or debugging;
- Disable debug.

Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
This commit is contained in:
Jérôme Benoit 2016-11-04 16:31:32 +01:00
parent 7c8944fa4c
commit 29cf662774
8 changed files with 101 additions and 159 deletions

View File

@ -17,14 +17,13 @@
################################################################################ ################################################################################
PKG_NAME="RTL8812AU" PKG_NAME="RTL8812AU"
# Branch: 4.3.22_beta PKG_VERSION="4.3.20"
PKG_VERSION="73b88d5"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="https://github.com/Grawp/rtl8812au_rtl8821au" PKG_SITE="https://github.com/Grawp/rtl8812au_rtl8821au"
PKG_URL="https://github.com/Grawp/rtl8812au_rtl8821au/archive/$PKG_VERSION.tar.gz" PKG_URL="https://github.com/Grawp/rtl8812au_rtl8821au/archive/$PKG_VERSION.tar.gz"
PKG_SOURCE_DIR="rtl8812au_rtl8821au-$PKG_VERSION*" PKG_SOURCE_DIR="rtl8812au_rtl8821au-$PKG_VERSION"
PKG_DEPENDS_TARGET="toolchain linux" PKG_DEPENDS_TARGET="toolchain linux"
PKG_NEED_UNPACK="$LINUX_DEPENDS" PKG_NEED_UNPACK="$LINUX_DEPENDS"
PKG_SECTION="driver" PKG_SECTION="driver"

View File

@ -1,30 +1,37 @@
diff -Naur RTL8812AU-928e27f/os_dep/linux/usb_intf.c RTL8812AU-928e27f.patch/os_dep/linux/usb_intf.c diff --git a/os_dep/linux/usb_intf.c b/os_dep/linux/usb_intf.c
--- RTL8812AU-928e27f/os_dep/linux/usb_intf.c 2016-02-07 14:05:49.000000000 +0100 index 85312bc..7318b1e 100644
+++ RTL8812AU-928e27f.patch/os_dep/linux/usb_intf.c 2016-03-16 11:34:32.884119151 +0100 --- a/os_dep/linux/usb_intf.c
@@ -167,6 +167,10 @@ +++ b/os_dep/linux/usb_intf.c
{USB_DEVICE(0x13b1, 0x003f),.driver_info = RTL8812}, /* Linksys - WUSB6300 */ @@ -167,6 +167,11 @@ static struct usb_device_id rtw_usb_id_tbl[] ={
{USB_DEVICE(0x2357, 0x0101),.driver_info = RTL8812}, /* TP-Link - T4U */ {USB_DEVICE(0x13b1, 0x003f),.driver_info = RTL8812}, /* Linksys - WUSB6300 */
{USB_DEVICE(0x2357, 0x0103),.driver_info = RTL8812}, /* TP-Link - T4UH */ {USB_DEVICE(0x2357, 0x0101),.driver_info = RTL8812}, /* TP-Link - T4U */
+ /*=== Patched ID ===*/ {USB_DEVICE(0x2357, 0x0103),.driver_info = RTL8812}, /* TP-Link - T4UH */
+ {USB_DEVICE(0x050D, 0x1109),.driver_info = RTL8812}, /* Belkin F9L1109 - SerComm */ + /*=== Patched ID ===*/
+ {USB_DEVICE(0x20F4, 0x805B),.driver_info = RTL8812}, /* TRENDnet - Cameo */ + {USB_DEVICE(0x050D, 0x1109),.driver_info = RTL8812}, /* Belkin F9L1109 - SerComm */
+ {USB_DEVICE(0x148F, 0x9097),.driver_info = RTL8812}, /* Amped Wireless ACA1 */ + {USB_DEVICE(0x20F4, 0x805B),.driver_info = RTL8812}, /* TRENDnet - Cameo */
+ {USB_DEVICE(0x148F, 0x9097),.driver_info = RTL8812}, /* Amped Wireless ACA1 */
+
#endif #endif
#ifdef CONFIG_RTL8821A #ifdef CONFIG_RTL8821A
@@ -186,6 +190,15 @@ @@ -184,9 +189,18 @@ static struct usb_device_id rtw_usb_id_tbl[] ={
{USB_DEVICE(0x056E, 0x400E) , .driver_info = RTL8821}, /* ELECOM - ELECOM */ {USB_DEVICE(0x2001, 0x3314),.driver_info = RTL8821}, /* D-Link - Cameo */
{USB_DEVICE(0x056E, 0x400F) , .driver_info = RTL8821}, /* ELECOM - ELECOM */ {USB_DEVICE(0x2001, 0x3318),.driver_info = RTL8821}, /* D-Link - Cameo */
{USB_DEVICE(0x0846, 0x9052),.driver_info = RTL8821}, /* Netgear - A6100 */ {USB_DEVICE(0x0E66, 0x0023),.driver_info = RTL8821}, /* HAWKING - Edimax */
+ /*=== Patched ID ===*/ - {USB_DEVICE(0x056E, 0x400E) , .driver_info = RTL8821}, /* ELECOM - ELECOM */
+ {USB_DEVICE(0x0BDA, 0xA811),.driver_info = RTL8821}, /* OUTLINK - Edimax */ - {USB_DEVICE(0x056E, 0x400F) , .driver_info = RTL8821}, /* ELECOM - ELECOM */
+ {USB_DEVICE(0x7392, 0xA812),.driver_info = RTL8821}, /* Edimax - Edimax */ + {USB_DEVICE(0x056E, 0x400E),.driver_info = RTL8821}, /* ELECOM - ELECOM */
+ {USB_DEVICE(0x0411, 0x0242),.driver_info = RTL8821}, /* BUFFALO - Edimax */ + {USB_DEVICE(0x056E, 0x400F),.driver_info = RTL8821}, /* ELECOM - ELECOM */
+ {USB_DEVICE(0x2001, 0x3318),.driver_info = RTL8821}, /* D-Link DWA-172 */ {USB_DEVICE(0x0846, 0x9052),.driver_info = RTL8821}, /* Netgear - A6100 */
+ {USB_DEVICE(0x056e, 0x4007),.driver_info = RTL8821}, /* Elecom - WDC-433DU2HBK */ + /*=== Patched ID ===*/
+ {USB_DEVICE(0x7392, 0xA813),.driver_info = RTL8821}, /* Edimax - EW-7811UAC */ + {USB_DEVICE(0x0BDA, 0xA811),.driver_info = RTL8821}, /* OUTLINK - Edimax */
+ {USB_DEVICE(0x2019, 0xAB32),.driver_info = RTL8821}, /* Planex - GW-450S */ + {USB_DEVICE(0x7392, 0xA812),.driver_info = RTL8821}, /* Edimax - Edimax */
+ {USB_DEVICE(0x0411, 0x025D),.driver_info = RTL8821}, /* BUFFALO WI-U3-866D */ + {USB_DEVICE(0x0411, 0x0242),.driver_info = RTL8821}, /* BUFFALO - Edimax */
+ {USB_DEVICE(0x2001, 0x3318),.driver_info = RTL8821}, /* D-Link DWA-172 */
+ {USB_DEVICE(0x056e, 0x4007),.driver_info = RTL8821}, /* Elecom - WDC-433DU2HBK */
+ {USB_DEVICE(0x7392, 0xA813),.driver_info = RTL8821}, /* Edimax - EW-7811UAC */
+ {USB_DEVICE(0x2019, 0xAB32),.driver_info = RTL8821}, /* Planex - GW-450S */
+ {USB_DEVICE(0x0411, 0x025D),.driver_info = RTL8821}, /* BUFFALO WI-U3-866D */
#endif #endif
#ifdef CONFIG_RTL8192E #ifdef CONFIG_RTL8192E

View File

@ -1,25 +0,0 @@
diff -Naur a/include/ieee80211.h b/include/ieee80211.h
--- a/include/ieee80211.h
+++ b/include/ieee80211.h
@@ -1388,18 +1388,18 @@
(((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \
(((Addr[5]) & 0xff) == 0xff))
#else
-extern __inline int is_multicast_mac_addr(const u8 *addr)
+static __inline int is_multicast_mac_addr(const u8 *addr)
{
return ((addr[0] != 0xff) && (0x01 & addr[0]));
}
-extern __inline int is_broadcast_mac_addr(const u8 *addr)
+static __inline int is_broadcast_mac_addr(const u8 *addr)
{
return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \
(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
}
-extern __inline int is_zero_mac_addr(const u8 *addr)
+static __inline int is_zero_mac_addr(const u8 *addr)
{
return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \
(addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00));

View File

@ -9,15 +9,15 @@ Signed-off-by: Sam Nazarko <email@samnazarko.co.uk>
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/rtw_mlme_ext.h b/include/rtw_mlme_ext.h diff --git a/include/rtw_mlme_ext.h b/include/rtw_mlme_ext.h
index d1d5894..7dd78ad 100644 index cd52a90..4908e59 100644
--- a/include/rtw_mlme_ext.h --- a/include/rtw_mlme_ext.h
+++ b/include/rtw_mlme_ext.h +++ b/include/rtw_mlme_ext.h
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
// So, this driver tried to extend the dwell time for each scanning channel. // So, this driver tried to extend the dwell time for each scanning channel.
// This will increase the chance to receive the probe response from SoftAP. // This will increase the chance to receive the probe response from SoftAP.
-#define SURVEY_TO (100) -#define SURVEY_TO (100)
+#define SURVEY_TO (150) +#define SURVEY_TO (150)
#define REAUTH_TO (300) //(50) #define REAUTH_TO (300) //(50)
#define REASSOC_TO (300) //(50) #define REASSOC_TO (300) //(50)
//#define DISCONNECT_TO (3000) //#define DISCONNECT_TO (3000)

View File

@ -0,0 +1,22 @@
diff --git a/include/autoconf.h b/include/autoconf.h
index 7cc4184..8135c1d 100755
--- a/include/autoconf.h
+++ b/include/autoconf.h
@@ -343,14 +343,14 @@
/*
* Debug Related Config
*/
-#define DBG 1
+#define DBG 0
//#define CONFIG_DEBUG /* DBG_871X, etc... */
//#define CONFIG_DEBUG_RTL871X /* RT_TRACE, RT_PRINT_DATA, _func_enter_, _func_exit_ */
-#define CONFIG_PROC_DEBUG
+//#define CONFIG_PROC_DEBUG
-#define DBG_CONFIG_ERROR_DETECT
+//#define DBG_CONFIG_ERROR_DETECT
//#define DBG_CONFIG_ERROR_DETECT_INT
//#define DBG_CONFIG_ERROR_RESET

View File

@ -1,45 +0,0 @@
From e8fa11ce31a64710421b67bb97d28455cdedc841 Mon Sep 17 00:00:00 2001
From: Peter Vicman <peter.vicman@gmail.com>
Date: Sun, 9 Oct 2016 14:03:21 +0200
Subject: [PATCH] remove debug ouput
disable dmesg flooding
[ 1351.747814] RTL871X: set group key camid:6, addr:fc:f5:13:a7:d5:a9, kid:1, type:AES
[ 1351.747814] RTL871X: send eapol packet
---
core/rtw_mlme_ext.c | 4 ++--
core/rtw_xmit.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c
index 9b7a7ef..1bb065a 100644
--- a/core/rtw_mlme_ext.c
+++ b/core/rtw_mlme_ext.c
@@ -14330,8 +14330,8 @@ u8 setkey_hdl(_adapter *padapter, u8 *pbuf)
#endif
ctrl = BIT(15) | BIT6 | ((pparm->algorithm) << 2) | pparm->keyid;
- DBG_871X_LEVEL(_drv_always_, "set group key camid:%d, addr:"MAC_FMT", kid:%d, type:%s\n"
- , cam_id, MAC_ARG(addr), pparm->keyid, security_type_str(pparm->algorithm));
+ //DBG_871X_LEVEL(_drv_always_, "set group key camid:%d, addr:"MAC_FMT", kid:%d, type:%s\n"
+ // , cam_id, MAC_ARG(addr), pparm->keyid, security_type_str(pparm->algorithm));
write_cam(padapter, cam_id, ctrl, addr, pparm->key);
#ifdef DYNAMIC_CAMID_ALLOC
diff --git a/core/rtw_xmit.c b/core/rtw_xmit.c
index 7b384e5..933d816 100644
--- a/core/rtw_xmit.c
+++ b/core/rtw_xmit.c
@@ -1104,7 +1104,7 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr
} else if (0x888e == pattrib->ether_type) {
- DBG_871X_LEVEL(_drv_always_, "send eapol packet\n");
+ // DBG_871X_LEVEL(_drv_always_, "send eapol packet\n");
}
if ( (pattrib->ether_type == 0x888e) || (pattrib->dhcp_pkt == 1) )
--
2.7.1

View File

@ -1,18 +0,0 @@
diff -Naur a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
--- a/os_dep/linux/ioctl_cfg80211.c 2016-09-11 01:57:03.868327247 +0100
+++ b/os_dep/linux/ioctl_cfg80211.c 2016-09-11 01:58:00.381610662 +0100
@@ -2019,7 +2019,14 @@
}
else
{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)
+ struct cfg80211_scan_info info = {
+ .aborted = aborted
+ };
+ cfg80211_scan_done(pwdev_priv->scan_request, &info);
+#else
cfg80211_scan_done(pwdev_priv->scan_request, aborted);
+#endif
}
pwdev_priv->scan_request = NULL;

View File

@ -1,36 +1,38 @@
--- a/os_dep/linux/ioctl_cfg80211.c 2016-10-04 15:18:32.405995229 +0200 diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
+++ b/os_dep/linux/ioctl_cfg80211.c 2016-10-04 15:18:37.653865585 +0200 index 492bb1a..e52134d 100644
@@ -649,20 +649,16 @@ void rtw_cfg80211_ibss_indicate_connect( --- a/os_dep/linux/ioctl_cfg80211.c
struct wlan_network *cur_network = &(pmlmepriv->cur_network); +++ b/os_dep/linux/ioctl_cfg80211.c
struct wireless_dev *pwdev = padapter->rtw_wdev; @@ -649,20 +649,16 @@ void rtw_cfg80211_ibss_indicate_connect(_adapter *padapter)
struct cfg80211_bss *bss = NULL; struct wlan_network *cur_network = &(pmlmepriv->cur_network);
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)) struct wireless_dev *pwdev = padapter->rtw_wdev;
struct wiphy *wiphy = pwdev->wiphy; struct cfg80211_bss *bss = NULL;
int freq = 2412; -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0))
struct ieee80211_channel *notify_channel; struct wiphy *wiphy = pwdev->wiphy;
-#endif int freq = 2412;
struct ieee80211_channel *notify_channel;
DBG_871X(FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter)); -#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)) DBG_871X(FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter));
freq = rtw_ch2freq(cur_network->network.Configuration.DSConfig);
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0))
if (0) freq = rtw_ch2freq(cur_network->network.Configuration.DSConfig);
DBG_871X("chan: %d, freq: %d\n", cur_network->network.Configuration.DSConfig, freq);
-#endif if (0)
DBG_871X("chan: %d, freq: %d\n", cur_network->network.Configuration.DSConfig, freq);
if (pwdev->iftype != NL80211_IFTYPE_ADHOC) -#endif
{
@@ -713,12 +709,8 @@ void rtw_cfg80211_ibss_indicate_connect( if (pwdev->iftype != NL80211_IFTYPE_ADHOC)
DBG_871X_LEVEL(_drv_always_, FUNC_ADPT_FMT" BSS not found !!\n", FUNC_ADPT_ARG(padapter)); {
} @@ -713,12 +709,8 @@ void rtw_cfg80211_ibss_indicate_connect(_adapter *padapter)
//notify cfg80211 that device joined an IBSS DBG_871X_LEVEL(_drv_always_, FUNC_ADPT_FMT" BSS not found !!\n", FUNC_ADPT_ARG(padapter));
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)) }
notify_channel = ieee80211_get_channel(wiphy, freq); //notify cfg80211 that device joined an IBSS
cfg80211_ibss_joined(padapter->pnetdev, cur_network->network.MacAddress, notify_channel, GFP_ATOMIC); -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0))
-#else notify_channel = ieee80211_get_channel(wiphy, freq);
- cfg80211_ibss_joined(padapter->pnetdev, cur_network->network.MacAddress, GFP_ATOMIC); cfg80211_ibss_joined(padapter->pnetdev, cur_network->network.MacAddress, notify_channel, GFP_ATOMIC);
-#endif -#else
} - cfg80211_ibss_joined(padapter->pnetdev, cur_network->network.MacAddress, GFP_ATOMIC);
-#endif
void rtw_cfg80211_indicate_connect(_adapter *padapter) }
void rtw_cfg80211_indicate_connect(_adapter *padapter)