Add rtl8192eu rtl8812au rtl8814au Wifi drivers.
authorhschang <chang@dev3>
Tue, 1 Oct 2019 10:22:56 +0000 (19:22 +0900)
committerhschang <chang@dev3>
Tue, 1 Oct 2019 10:59:50 +0000 (19:59 +0900)
25 files changed:
meta-openvuplus/conf/distro/reporefs.conf [new file with mode: 0644]
meta-openvuplus/conf/distro/vuplus.conf
meta-openvuplus/recipes-connectivity/packagegroups/packagegroup-vuplus-wlan.bb
meta-openvuplus/recipes-connectivity/realtek/rtl8192eu.bb [new file with mode: 0644]
meta-openvuplus/recipes-connectivity/realtek/rtl8192eu/CHECKSM_IPV6_H.patch [new file with mode: 0644]
meta-openvuplus/recipes-connectivity/realtek/rtl8192eu/rtl8192eu-gcc5.patch [new file with mode: 0644]
meta-openvuplus/recipes-connectivity/realtek/rtl8192eu/rtl8192eu-makefile.patch [new file with mode: 0644]
meta-openvuplus/recipes-connectivity/realtek/rtl8812au/0001-Add-support-for-kernels-4.8.patch [new file with mode: 0644]
meta-openvuplus/recipes-connectivity/realtek/rtl8812au/0001-add-linux-kernel-4.11-support.patch [new file with mode: 0644]
meta-openvuplus/recipes-connectivity/realtek/rtl8812au/0001-add-linux-kernel-4.15-support.patch [new file with mode: 0644]
meta-openvuplus/recipes-connectivity/realtek/rtl8812au/0001-add-linux-kernel-4.19-support.patch [new file with mode: 0644]
meta-openvuplus/recipes-connectivity/realtek/rtl8812au/0001-add-linux-kernel-4.20-support.patch [new file with mode: 0644]
meta-openvuplus/recipes-connectivity/realtek/rtl8812au/0001-add-linux-kernel-5.0-support.patch [new file with mode: 0644]
meta-openvuplus/recipes-connectivity/realtek/rtl8812au/0001-add-support-for-more-vendor-id.patch [new file with mode: 0644]
meta-openvuplus/recipes-connectivity/realtek/rtl8812au/fix_sh4_build.patch [new file with mode: 0644]
meta-openvuplus/recipes-connectivity/realtek/rtl8812au/rt8812au-gcc5.patch [new file with mode: 0644]
meta-openvuplus/recipes-connectivity/realtek/rtl8812au/rtl8812AU-driver-5.1.5-20170914.zip [new file with mode: 0644]
meta-openvuplus/recipes-connectivity/realtek/rtl8812au_5.1.5.bb [new file with mode: 0644]
meta-openvuplus/recipes-connectivity/realtek/rtl8814au/0001-add-support-kernel-4.15.patch [new file with mode: 0644]
meta-openvuplus/recipes-connectivity/realtek/rtl8814au/0002-add-linux-4.19-support.patch [new file with mode: 0644]
meta-openvuplus/recipes-connectivity/realtek/rtl8814au/add-linux-4.20-support.patch [new file with mode: 0644]
meta-openvuplus/recipes-connectivity/realtek/rtl8814au/add-linux-5.0-support.patch [new file with mode: 0644]
meta-openvuplus/recipes-connectivity/realtek/rtl8814au/rtl8814AU-driver-4.3.21-20170707.zip [new file with mode: 0644]
meta-openvuplus/recipes-connectivity/realtek/rtl8814au_4.3.21.bb [new file with mode: 0644]
meta-openvuplus/recipes-vuplus/firmwares/firmware-rtl8192eu.bb [new file with mode: 0644]

diff --git a/meta-openvuplus/conf/distro/reporefs.conf b/meta-openvuplus/conf/distro/reporefs.conf
new file mode 100644 (file)
index 0000000..04bd5ee
--- /dev/null
@@ -0,0 +1,4 @@
+# wlan
+SRCREV_pn-firmware-rtl8192eu ??= "4b2b151e1842d172e76c2e0a6bfa1f4284a5e344"
+SRCREV_pn-rtl8192eu ??= "0af336b999ff9b29477a205117410f9947a58fdd"
+
index 72b8e83..77c45b0 100644 (file)
@@ -2,6 +2,8 @@
 #@NAME: OpenVuplus
 #@DESCRIPTION: Distribution configuration for OpenVuplus
 
+require reporefs.conf
+
 QA_LOGFILE = "${TMPDIR}/qa.log"
 #USER_CLASSES += "image-prelink"
 SANITY_REQUIRED_UTILITIES = "patch diffstat texi2html makeinfo svn bzip2 tar gzip gawk chrpath wget cpio sshpass glib-mkenums"
index f79f89c..a599538 100644 (file)
@@ -2,7 +2,7 @@ DESCRIPTION = "Vuplus: W-LAN package group for the Vuplus Distribution"
 SECTION = "vuplus/base"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-PR = "r22"
+PR = "r23"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
@@ -22,6 +22,7 @@ WIFI_FIRMWARES = "\
        firmware-rt2561 \
        firmware-rtl8721u \
        firmware-rt3070 \
+       firmware-rtl8192eu \
 "
 
 KERNEL_WIFI_MODULES = " \
@@ -46,6 +47,9 @@ KERNEL_WIFI_MODULES += "${@base_version_less_or_equal('VUPLUS_KERNEL_VERSION', '
 LEGACY_MODULES = " \
        r8192cu \
        rt3070 \
+       rtl8192eu \
+       rtl8812au \
+       rtl8814au \
 "
 
 RDEPENDS_${PN}_append = "\
diff --git a/meta-openvuplus/recipes-connectivity/realtek/rtl8192eu.bb b/meta-openvuplus/recipes-connectivity/realtek/rtl8192eu.bb
new file mode 100644 (file)
index 0000000..d2a32ed
--- /dev/null
@@ -0,0 +1,33 @@
+SUMMARY = "Driver for Realtek USB wireless device 8192eu"
+HOMEPAGE = "http://www.realtek.com/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://README.md;md5=59ef6f2246904f7919c0b0d0a81156b1"
+
+inherit module siteinfo
+
+SRC_URI = " \
+          git://github.com/Mange/rtl8192eu-linux-driver.git \
+          file://rtl8192eu-makefile.patch \
+          file://rtl8192eu-gcc5.patch \
+          file://CHECKSM_IPV6_H.patch \
+          "
+
+SRCREV = "088a8bdafe31198f50e45a7f7e1a7e8e7993fb5d"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OEMAKE = "CONFIG_RTL8192EU=m"
+
+do_configure() {
+        sed -e "s/^CONFIG_PLATFORM_I386_PC.*=.*y/EXTRA_CFLAGS += -Wno-date-time -DCONFIG_${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'LITTLE', 'BIG', d)}_ENDIAN/" -i Makefile
+}
+
+do_compile() {
+        unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+        oe_runmake -C "${STAGING_KERNEL_DIR}" M="${S}" modules 
+}
+
+do_install() {
+        install -d ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net/wireless
+        install -m 0644 ${S}/8192eu.ko ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net/wireless
+}
diff --git a/meta-openvuplus/recipes-connectivity/realtek/rtl8192eu/CHECKSM_IPV6_H.patch b/meta-openvuplus/recipes-connectivity/realtek/rtl8192eu/CHECKSM_IPV6_H.patch
new file mode 100644 (file)
index 0000000..dc6f611
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/core/rtw_br_ext.c        2018-05-27 23:41:30.000000000 +0200
++++ b/core/rtw_br_ext.c        2018-05-27 23:42:14.000000000 +0200
+@@ -23,6 +23,9 @@
+ #include <linux/if_arp.h>
+ #include <net/ip.h>
+ #include <net/ipx.h>
++#ifndef _CHECKSM_IPV6_H
++#include <net/ip6_checksum.h>
++#endif
+ #include <linux/atalk.h>
+ #include <linux/udp.h>
+ #include <linux/if_pppox.h>
diff --git a/meta-openvuplus/recipes-connectivity/realtek/rtl8192eu/rtl8192eu-gcc5.patch b/meta-openvuplus/recipes-connectivity/realtek/rtl8192eu/rtl8192eu-gcc5.patch
new file mode 100644 (file)
index 0000000..498bbec
--- /dev/null
@@ -0,0 +1,26 @@
+diff --git a/include/ieee80211.h b/include/ieee80211.h
+index fc293c4..d2e2bec 100644
+--- a/include/ieee80211.h
++++ b/include/ieee80211.h
+@@ -1314,18 +1314,18 @@ enum ieee80211_state {
+ (((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));
diff --git a/meta-openvuplus/recipes-connectivity/realtek/rtl8192eu/rtl8192eu-makefile.patch b/meta-openvuplus/recipes-connectivity/realtek/rtl8192eu/rtl8192eu-makefile.patch
new file mode 100644 (file)
index 0000000..85d41b6
--- /dev/null
@@ -0,0 +1,34 @@
+From 0aceb7e46c2e50ecfaa26c6cbf00ace9cb914a55 Mon Sep 17 00:00:00 2001
+From: arn354 <arn354@email.de>
+Date: Fri, 11 Dec 2015 20:35:17 +0100
+Subject: [PATCH] Patch makefile * add EXTRA_CFLAGS * disable
+
+---
+ Makefile | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 0c800f8..2a6588f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -7,6 +7,8 @@ EXTRA_CFLAGS += -O1
+ #EXTRA_CFLAGS += -pedantic
+ #EXTRA_CFLAGS += -Wshadow -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wno-implicit
++EXTRA_CFLAGS += -Wframe-larger-than=1536 -Wno-implicit -Wno-ignored-qualifiers
++
+ EXTRA_CFLAGS += -Wno-unused-variable
+ EXTRA_CFLAGS += -Wno-unused-value
+ EXTRA_CFLAGS += -Wno-unused-label
+@@ -39,7 +41,7 @@ CONFIG_SDIO_HCI = n
+ CONFIG_GSPI_HCI = n
+ ########################## Features ###########################
+ CONFIG_MP_INCLUDED = y
+-CONFIG_POWER_SAVING = y
++CONFIG_POWER_SAVING = n
+ CONFIG_USB_AUTOSUSPEND = n
+ CONFIG_HW_PWRP_DETECTION = n
+ CONFIG_WIFI_TEST = n
+-- 
+2.6.1.windows.1
+
diff --git a/meta-openvuplus/recipes-connectivity/realtek/rtl8812au/0001-Add-support-for-kernels-4.8.patch b/meta-openvuplus/recipes-connectivity/realtek/rtl8812au/0001-Add-support-for-kernels-4.8.patch
new file mode 100644 (file)
index 0000000..f626290
--- /dev/null
@@ -0,0 +1,44 @@
+From 9dcc95a6fc5e41fe941152036fa39a409ba68068 Mon Sep 17 00:00:00 2001
+From: Masashi Honma <masashi.honma@gmail.com>
+Date: Sun, 25 Sep 2016 18:56:40 +0900
+Subject: [PATCH 1/2] Add support for kernels >= 4.8
+
+This patch fix compilation failure caused by modification of
+cfg80211_scan_done() prototype.
+
+Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
+---
+ os_dep/linux/ioctl_cfg80211.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
+index e9f74df..b693a57 100644
+--- a/os_dep/linux/ioctl_cfg80211.c
++++ b/os_dep/linux/ioctl_cfg80211.c
+@@ -1978,6 +1978,9 @@ void rtw_cfg80211_indicate_scan_done(_adapter *adapter, bool aborted)
+ {
+       struct rtw_wdev_priv *pwdev_priv = adapter_wdev_data(adapter);
+       _irqL   irqL;
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0))
++      struct cfg80211_scan_info info;
++#endif // (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0))
+       _enter_critical_bh(&pwdev_priv->scan_req_lock, &irqL);
+       if (pwdev_priv->scan_request != NULL) {
+@@ -1992,7 +1995,13 @@ void rtw_cfg80211_indicate_scan_done(_adapter *adapter, bool aborted)
+               }
+               else
+               {
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0))
++                      memset(&info, 0, sizeof(info));
++                      info.aborted = aborted;
++                      cfg80211_scan_done(pwdev_priv->scan_request, &info);
++#else // (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0))
+                       cfg80211_scan_done(pwdev_priv->scan_request, aborted);
++#endif // (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0))
+               }
+               pwdev_priv->scan_request = NULL;
+-- 
+2.10.0.windows.1
+
diff --git a/meta-openvuplus/recipes-connectivity/realtek/rtl8812au/0001-add-linux-kernel-4.11-support.patch b/meta-openvuplus/recipes-connectivity/realtek/rtl8812au/0001-add-linux-kernel-4.11-support.patch
new file mode 100644 (file)
index 0000000..ee2c445
--- /dev/null
@@ -0,0 +1,14 @@
+diff --git a/include/osdep_service_linux.h b/include/osdep_service_linux.h
+index 060dbe6..cf2d2a9 100644
+--- a/include/osdep_service_linux.h
++++ b/include/osdep_service_linux.h
+@@ -46,6 +46,9 @@
+ #endif
+ #include <linux/sem.h>
+ #include <linux/sched.h>
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0))
++      #include <linux/sched/signal.h>
++#endif
+ #include <linux/etherdevice.h>
+ #include <linux/wireless.h>
+ #include <net/iw_handler.h>
diff --git a/meta-openvuplus/recipes-connectivity/realtek/rtl8812au/0001-add-linux-kernel-4.15-support.patch b/meta-openvuplus/recipes-connectivity/realtek/rtl8812au/0001-add-linux-kernel-4.15-support.patch
new file mode 100644 (file)
index 0000000..2aade3f
--- /dev/null
@@ -0,0 +1,15 @@
+--- a/include/osdep_service_linux.h    2018-09-05 09:10:22.425499934 +0200
++++ b/include/osdep_service_linux.h    2018-09-05 09:12:02.094044218 +0200
+@@ -273,8 +273,12 @@
+ {\r
+       /* setup_timer(ptimer, pfunc,(u32)cntx);         */\r
+       ptimer->function = pfunc;\r
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0))\r
+       ptimer->data = (unsigned long)cntx;\r
+       init_timer(ptimer);\r
++#else\r
++      timer_setup(ptimer, pfunc, 0);\r
++#endif\r
+ }\r
\r
+ __inline static void _set_timer(_timer *ptimer, u32 delay_time)\r
diff --git a/meta-openvuplus/recipes-connectivity/realtek/rtl8812au/0001-add-linux-kernel-4.19-support.patch b/meta-openvuplus/recipes-connectivity/realtek/rtl8812au/0001-add-linux-kernel-4.19-support.patch
new file mode 100644 (file)
index 0000000..3c1a4e9
--- /dev/null
@@ -0,0 +1,23 @@
+--- a/os_dep/linux/os_intfs.c  2018-10-23 20:58:43.820534368 +0200
++++ b/os_dep/linux/os_intfs.c  2018-10-23 21:00:46.337305126 +0200
+@@ -1052,7 +1052,11 @@
+       return dscp >> 5;\r
+ }\r
\r
+-\r
++#if (LINUX_VERSION_CODE>=KERNEL_VERSION(4,19,0))\r
++static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb,\r
++                              struct net_device *sb_dev,\r
++                              select_queue_fallback_t fallback\r
++#else\r
+ static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb\r
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)\r
+       , void *accel_priv\r
+@@ -1060,6 +1064,7 @@
+       , select_queue_fallback_t fallback\r
+       #endif\r
+ #endif\r
++#endif\r
+ )\r
+ {\r
+       _adapter        *padapter = rtw_netdev_priv(dev);\r
diff --git a/meta-openvuplus/recipes-connectivity/realtek/rtl8812au/0001-add-linux-kernel-4.20-support.patch b/meta-openvuplus/recipes-connectivity/realtek/rtl8812au/0001-add-linux-kernel-4.20-support.patch
new file mode 100644 (file)
index 0000000..7f45d21
--- /dev/null
@@ -0,0 +1,34 @@
+diff --git a/include/wifi.h b/include/wifi.h
+index 6e33326532a3..6dacb2c13cdc 100644
+--- a/include/wifi.h
++++ b/include/wifi.h
+@@ -1038,7 +1038,11 @@ typedef enum _HT_CAP_AMPDU_DENSITY {
+  * According to IEEE802.11n spec size varies from 8K to 64K (in powers of 2)\r
+  */\r
+ #define IEEE80211_MIN_AMPDU_BUF 0x8\r
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0))\r
++#define IEEE80211_MAX_AMPDU_BUF 0x100\r
++#else\r
+ #define IEEE80211_MAX_AMPDU_BUF 0x40\r
++#endif\r
\r
\r
+ /* Spatial Multiplexing Power Save Modes */\r
+diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
+index 1ce8c500d68a..be274b61971e 100644
+--- a/os_dep/linux/ioctl_cfg80211.c
++++ b/os_dep/linux/ioctl_cfg80211.c
+@@ -326,6 +326,13 @@ static const struct ieee80211_txrx_stypes
+ };\r
+ #endif\r
\r
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0))\r
++static inline void get_monotonic_boottime(struct timespec *ts)\r
++{\r
++       *ts = ktime_to_timespec(ktime_get_boottime());\r
++}\r
++#endif\r
++\r
+ static u64 rtw_get_systime_us(void)\r
+ {\r
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))\r
diff --git a/meta-openvuplus/recipes-connectivity/realtek/rtl8812au/0001-add-linux-kernel-5.0-support.patch b/meta-openvuplus/recipes-connectivity/realtek/rtl8812au/0001-add-linux-kernel-5.0-support.patch
new file mode 100644 (file)
index 0000000..d99adf2
--- /dev/null
@@ -0,0 +1,16 @@
+diff --git a/os_dep/linux/rtw_android.c b/os_dep/linux/rtw_android.c
+index 4f3a29ebec01..3be71db3e072 100644
+--- a/os_dep/linux/rtw_android.c
++++ b/os_dep/linux/rtw_android.c
+@@ -626,7 +626,11 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
+               goto exit;\r
+       }\r
\r
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0))\r
++      if (!access_ok(priv_cmd.buf, priv_cmd.total_len)) {\r
++#else\r
+       if (!access_ok(VERIFY_READ, priv_cmd.buf, priv_cmd.total_len)) {\r
++#endif\r
+               RTW_INFO("%s: failed to access memory\n", __FUNCTION__);\r
+               ret = -EFAULT;\r
+               goto exit;\r
diff --git a/meta-openvuplus/recipes-connectivity/realtek/rtl8812au/0001-add-support-for-more-vendor-id.patch b/meta-openvuplus/recipes-connectivity/realtek/rtl8812au/0001-add-support-for-more-vendor-id.patch
new file mode 100644 (file)
index 0000000..d7cdacf
--- /dev/null
@@ -0,0 +1,33 @@
+diff --git a/os_dep/linux/usb_intf.c b/os_dep/linux/usb_intf.c
+index a4e3f83..a32216b 100644
+--- a/os_dep/linux/usb_intf.c
++++ b/os_dep/linux/usb_intf.c
+@@ -148,6 +148,7 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
+       {USB_DEVICE(USB_VENDER_ID_REALTEK, 0x881C), .driver_info = RTL8812}, /* Default ID */
+       /*=== Customer ID ===*/
+       {USB_DEVICE(0x050D, 0x1106), .driver_info = RTL8812}, /* Belkin - sercomm */
++      {USB_DEVICE(0x050D, 0x1109), .driver_info = RTL8812}, /* Belkin F9L1109 - SerComm */
+       {USB_DEVICE(0x2001, 0x330E), .driver_info = RTL8812}, /* D-Link - ALPHA */
+       {USB_DEVICE(0x7392, 0xA822), .driver_info = RTL8812}, /* Edimax - Edimax */
+       {USB_DEVICE(0x0DF6, 0x0074), .driver_info = RTL8812}, /* Sitecom - Edimax */
+@@ -159,11 +160,20 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
+       {USB_DEVICE(0x0586, 0x3426), .driver_info = RTL8812}, /* ZyXEL - */
+       {USB_DEVICE(0x2001, 0x3313), .driver_info = RTL8812}, /* D-Link - ALPHA */
+       {USB_DEVICE(0x1058, 0x0632), .driver_info = RTL8812}, /* WD - Cybertan*/
++      {USB_DEVICE(0x13B1, 0x003F), .driver_info = RTL8812}, /* Linksys WUSB6300 */
+       {USB_DEVICE(0x1740, 0x0100), .driver_info = RTL8812}, /* EnGenius - EnGenius */
+       {USB_DEVICE(0x2019, 0xAB30), .driver_info = RTL8812}, /* Planex - Abocom */
+       {USB_DEVICE(0x07B8, 0x8812), .driver_info = RTL8812}, /* Abocom - Abocom */
+       {USB_DEVICE(0x2001, 0x3315), .driver_info = RTL8812}, /* D-Link - Cameo */
+       {USB_DEVICE(0x2001, 0x3316), .driver_info = RTL8812}, /* D-Link - Cameo */
++      {USB_DEVICE(0x20F4, 0x805B), .driver_info = RTL8812}, /* TRENDnet - Cameo */
++      {USB_DEVICE(0x2357, 0x0101), .driver_info = RTL8812}, /* TP-Link - Archer T4U */
++      {USB_DEVICE(0x2357, 0x010D), .driver_info = RTL8812}, /* TP-Link - Archer T4U AC1300 */
++      {USB_DEVICE(0x2357, 0x010E), .driver_info = RTL8812}, /* TP-Link - Archer T4UH AC1300 */
++      {USB_DEVICE(0x2357, 0x0103), .driver_info = RTL8812}, /* TP-Link - T4UH */
++      {USB_DEVICE(0x2357, 0x010F), .driver_info = RTL8812}, /* TP-Link - T4UHP */
++      {USB_DEVICE(0x2357, 0x0122), .driver_info = RTL8812}, /* TP-Link - T4UHP (other) */
++      {USB_DEVICE(0x148F, 0x9097), .driver_info = RTL8812}, /* Amped Wireless ACA1 */
+ #endif
+ #ifdef CONFIG_RTL8821A
diff --git a/meta-openvuplus/recipes-connectivity/realtek/rtl8812au/fix_sh4_build.patch b/meta-openvuplus/recipes-connectivity/realtek/rtl8812au/fix_sh4_build.patch
new file mode 100644 (file)
index 0000000..edaea7c
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/Makefile 2016-09-21 21:01:51.459069016 +0200
++++ b/Makefile 2016-09-21 21:02:38.283303180 +0200
+@@ -877,7 +877,7 @@
+ ifeq ($(CONFIG_PLATFORM_I386_PC), y)
+ EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
+-EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
++EXTRA_CFLAGS += -DRTW_USE_CFG80211_STA_EVENT
+ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/)
+ ARCH ?= $(SUBARCH)
+ CROSS_COMPILE ?=
diff --git a/meta-openvuplus/recipes-connectivity/realtek/rtl8812au/rt8812au-gcc5.patch b/meta-openvuplus/recipes-connectivity/realtek/rtl8812au/rt8812au-gcc5.patch
new file mode 100644 (file)
index 0000000..8598e94
--- /dev/null
@@ -0,0 +1,24 @@
+--- a/include/ieee80211.h
++++ b/include/ieee80211.h
+@@ -1314,18 +1314,18 @@ enum ieee80211_state {
+ (((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));
diff --git a/meta-openvuplus/recipes-connectivity/realtek/rtl8812au/rtl8812AU-driver-5.1.5-20170914.zip b/meta-openvuplus/recipes-connectivity/realtek/rtl8812au/rtl8812AU-driver-5.1.5-20170914.zip
new file mode 100644 (file)
index 0000000..3dd6b73
Binary files /dev/null and b/meta-openvuplus/recipes-connectivity/realtek/rtl8812au/rtl8812AU-driver-5.1.5-20170914.zip differ
diff --git a/meta-openvuplus/recipes-connectivity/realtek/rtl8812au_5.1.5.bb b/meta-openvuplus/recipes-connectivity/realtek/rtl8812au_5.1.5.bb
new file mode 100644 (file)
index 0000000..dc0a6ce
--- /dev/null
@@ -0,0 +1,46 @@
+SUMMARY = "Driver for Realtek USB wireless device 8812AU/8821AU v5.1.5"
+HOMEPAGE = "http://www.realtek.com.tw"
+SECTION = "kernel/modules"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://ifcfg-wlan0;md5=a84acae65af4b2d44d5035aa9f63cd85"
+
+inherit module
+
+SRC_URI = " \
+          file://rtl8812AU-driver-5.1.5-20170914.zip \
+          file://0001-add-linux-kernel-4.15-support.patch \
+          file://0001-add-linux-kernel-4.19-support.patch \
+          file://0001-add-linux-kernel-4.20-support.patch \
+          file://0001-add-linux-kernel-5.0-support.patch \
+          "
+
+SRC_URI[md5sum] = "5bb6be1683428b09bd3e4deb1e2c7622"
+SRC_URI[sha256sum] = "f3ac257ea4cdadfc9da8e275bfc19b3bd720f17d72cf5d23231ba7fb73bc28b3"
+
+S = "${WORKDIR}/rtl8812AU"
+
+EXTRA_OEMAKE = "LINUX_SRC=${STAGING_KERNEL_DIR} KDIR=${STAGING_KERNEL_DIR}"
+
+do_compile () {
+    unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS CC LD CPP
+    oe_runmake 'M={D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net/wireless' \
+        'KERNEL_SOURCE=${STAGING_KERNEL_DIR}' \
+        'LINUX_SRC=${STAGING_KERNEL_DIR}' \
+        'KDIR=${STAGING_KERNEL_DIR}' \
+        'KERNDIR=${STAGING_KERNEL_DIR}' \
+        'KSRC=${STAGING_KERNEL_DIR}' \
+        'KERNEL_VERSION=${KERNEL_VERSION}' \
+        'KVER=${KERNEL_VERSION}' \
+        'CC=${KERNEL_CC}' \
+        'AR=${KERNEL_AR}' \
+        'LD=${KERNEL_LD}'
+}
+
+do_install() {
+    install -d ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net/wireless
+    install -m 0644 ${S}/8812au.ko ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net/wireless
+
+}
+
+do_package_qa() {
+}
diff --git a/meta-openvuplus/recipes-connectivity/realtek/rtl8814au/0001-add-support-kernel-4.15.patch b/meta-openvuplus/recipes-connectivity/realtek/rtl8814au/0001-add-support-kernel-4.15.patch
new file mode 100644 (file)
index 0000000..bbab9e2
--- /dev/null
@@ -0,0 +1,15 @@
+--- a/include/osdep_service_linux.h    2018-09-05 09:10:22.425499934 +0200
++++ b/include/osdep_service_linux.h    2018-09-05 09:12:02.094044218 +0200
+@@ -274,8 +274,12 @@
+ {\r
+       //setup_timer(ptimer, pfunc,(u32)cntx); \r
+       ptimer->function = pfunc;\r
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0))\r
+       ptimer->data = (unsigned long)cntx;\r
+       init_timer(ptimer);\r
++#else\r
++      timer_setup(ptimer, pfunc, 0);\r
++#endif\r
+ }\r
\r
+ __inline static void _set_timer(_timer *ptimer,u32 delay_time)\r
diff --git a/meta-openvuplus/recipes-connectivity/realtek/rtl8814au/0002-add-linux-4.19-support.patch b/meta-openvuplus/recipes-connectivity/realtek/rtl8814au/0002-add-linux-4.19-support.patch
new file mode 100644 (file)
index 0000000..83ee1e2
--- /dev/null
@@ -0,0 +1,27 @@
+--- a/os_dep/linux/os_intfs.c  2018-10-23 20:30:24.385451383 +0200
++++ b/os_dep/linux/os_intfs.c  2018-10-23 20:35:14.283225781 +0200
+@@ -786,16 +786,20 @@
\r
+       return dscp >> 5;\r
+ }\r
+-\r
+- \r
++#if (LINUX_VERSION_CODE>=KERNEL_VERSION(4,19,0))\r
++static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb,\r
++                              struct net_device *sb_dev,\r
++                              select_queue_fallback_t fallback\r
++#else\r
+ static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb\r
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)    \r
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)\r
+                               , void *accel_priv\r
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) \r
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)\r
+                               , select_queue_fallback_t fallback\r
+ #endif\r
\r
+ #endif\r
++#endif\r
+ )\r
+ {\r
+       _adapter        *padapter = rtw_netdev_priv(dev);\r
diff --git a/meta-openvuplus/recipes-connectivity/realtek/rtl8814au/add-linux-4.20-support.patch b/meta-openvuplus/recipes-connectivity/realtek/rtl8814au/add-linux-4.20-support.patch
new file mode 100644 (file)
index 0000000..ecb0127
--- /dev/null
@@ -0,0 +1,34 @@
+diff --git a/include/wifi.h b/include/wifi.h
+index f7693c6056c1..ce67e53f3eb7 100644
+--- a/include/wifi.h
++++ b/include/wifi.h
+@@ -1016,7 +1016,11 @@ typedef enum _HT_CAP_AMPDU_DENSITY {
+  * According to IEEE802.11n spec size varies from 8K to 64K (in powers of 2)\r
+  */\r
+ #define IEEE80211_MIN_AMPDU_BUF 0x8\r
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0))\r
++#define IEEE80211_MAX_AMPDU_BUF 0x100\r
++#else\r
+ #define IEEE80211_MAX_AMPDU_BUF 0x40\r
++#endif\r
\r
\r
+ /* Spatial Multiplexing Power Save Modes */\r
+diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
+index 6e9cd618c126..63b2983091e2 100644
+--- a/os_dep/linux/ioctl_cfg80211.c
++++ b/os_dep/linux/ioctl_cfg80211.c
+@@ -345,6 +345,13 @@ rtw_cfg80211_default_mgmt_stypes[NUM_NL80211_IFTYPES] = {
+ };\r
+ #endif\r
\r
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0))\r
++static inline void get_monotonic_boottime(struct timespec *ts)\r
++{\r
++      *ts = ktime_to_timespec(ktime_get_boottime());\r
++}\r
++#endif\r
++\r
+ static u64 rtw_get_systime_us(void)\r
+ {\r
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))\r
diff --git a/meta-openvuplus/recipes-connectivity/realtek/rtl8814au/add-linux-5.0-support.patch b/meta-openvuplus/recipes-connectivity/realtek/rtl8814au/add-linux-5.0-support.patch
new file mode 100644 (file)
index 0000000..51f7f66
--- /dev/null
@@ -0,0 +1,16 @@
+diff --git a/os_dep/linux/rtw_android.c b/os_dep/linux/rtw_android.c
+index dec82d978244..b42e11a4e0cd 100644
+--- a/os_dep/linux/rtw_android.c
++++ b/os_dep/linux/rtw_android.c
+@@ -612,7 +612,11 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
+               goto exit;\r
+       }\r
\r
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0))\r
++      if (!access_ok(priv_cmd.buf, priv_cmd.total_len)){\r
++#else\r
+       if (!access_ok(VERIFY_READ, priv_cmd.buf, priv_cmd.total_len)){\r
++#endif\r
+               DBG_871X("%s: failed to access memory\n", __FUNCTION__);\r
+               ret = -EFAULT;\r
+               goto exit;\r
diff --git a/meta-openvuplus/recipes-connectivity/realtek/rtl8814au/rtl8814AU-driver-4.3.21-20170707.zip b/meta-openvuplus/recipes-connectivity/realtek/rtl8814au/rtl8814AU-driver-4.3.21-20170707.zip
new file mode 100644 (file)
index 0000000..aa3a7d1
Binary files /dev/null and b/meta-openvuplus/recipes-connectivity/realtek/rtl8814au/rtl8814AU-driver-4.3.21-20170707.zip differ
diff --git a/meta-openvuplus/recipes-connectivity/realtek/rtl8814au_4.3.21.bb b/meta-openvuplus/recipes-connectivity/realtek/rtl8814au_4.3.21.bb
new file mode 100644 (file)
index 0000000..b3f1188
--- /dev/null
@@ -0,0 +1,46 @@
+SUMMARY = "Driver for Realtek USB wireless device 8814AU v4.3.21"
+HOMEPAGE = "http://www.realtek.com.tw"
+SECTION = "kernel/modules"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://ifcfg-wlan0;md5=a84acae65af4b2d44d5035aa9f63cd85"
+
+inherit module
+
+SRC_URI = " \
+          file://rtl8814AU-driver-4.3.21-20170707.zip \
+          file://0001-add-support-kernel-4.15.patch \
+          file://0002-add-linux-4.19-support.patch \
+          file://add-linux-4.20-support.patch \
+          file://add-linux-5.0-support.patch \
+          "
+
+SRC_URI[md5sum] = "538691f32b98a62c99c32ad80d2d8430"
+SRC_URI[sha256sum] = "e7414ed9495f72ece75435f23f79468a00a8e2697c95916a09a140c5148027c2"
+
+S = "${WORKDIR}/rtl8814AU"
+
+EXTRA_OEMAKE = "LINUX_SRC=${STAGING_KERNEL_DIR} KDIR=${STAGING_KERNEL_DIR}"
+
+do_compile () {
+    unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS CC LD CPP
+    oe_runmake 'M={D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net/wireless' \
+        'KERNEL_SOURCE=${STAGING_KERNEL_DIR}' \
+        'LINUX_SRC=${STAGING_KERNEL_DIR}' \
+        'KDIR=${STAGING_KERNEL_DIR}' \
+        'KERNDIR=${STAGING_KERNEL_DIR}' \
+        'KSRC=${STAGING_KERNEL_DIR}' \
+        'KERNEL_VERSION=${KERNEL_VERSION}' \
+        'KVER=${KERNEL_VERSION}' \
+        'CC=${KERNEL_CC}' \
+        'AR=${KERNEL_AR}' \
+        'LD=${KERNEL_LD}'
+}
+
+do_install() {
+    install -d ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net/wireless
+    install -m 0644 ${S}/8814au.ko ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net/wireless
+
+}
+
+do_package_qa() {
+}
diff --git a/meta-openvuplus/recipes-vuplus/firmwares/firmware-rtl8192eu.bb b/meta-openvuplus/recipes-vuplus/firmwares/firmware-rtl8192eu.bb
new file mode 100644 (file)
index 0000000..41183dc
--- /dev/null
@@ -0,0 +1,8 @@
+require linux-firmware.inc
+
+DESCRIPTION = "Firmware for RTL8192EU"
+
+do_install() {
+       install -d ${D}${base_libdir}/firmware/rtlwifi
+       install -m 0644 rtlwifi/rtl8192eu_nic.bin ${D}/${base_libdir}/firmware/rtlwifi/
+}