diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6d12d2e --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ + +*.o +*.o.cmd +*.ko +*.ko.cmd +Module.symvers +modules.order +*.mod +8812au.mod.c diff --git a/Makefile b/Makefile index 870ae2e..e5980bb 100644 --- a/Makefile +++ b/Makefile @@ -14,8 +14,12 @@ EXTRA_CFLAGS += -Wno-unused-parameter EXTRA_CFLAGS += -Wno-unused-function EXTRA_CFLAGS += -Wno-unused +EXTRA_CFLAGS += -Wno-incompatible-pointer-types +EXTRA_CFLAGS += -Wno-implicit-function-declaration + EXTRA_CFLAGS += -Wno-uninitialized EXTRA_CFLAGS += -Wno-int-to-pointer-cast +EXTRA_CFLAGS += -Wno-vla EXTRA_CFLAGS += -I$(src)/include diff --git a/README.md b/README.md index 2bde357..094d8a4 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +## Changes +2019-07-11: Updated to compile against kernel 5.2 + ## Realtek 802.11ac (rtl8812au) This is a fork of the Realtek 802.11ac (rtl8812au) v4.2.2 (7502.20130507) diff --git a/core/rtw_ap.c b/core/rtw_ap.c index 2ea3466..6ae613a 100644 --- a/core/rtw_ap.c +++ b/core/rtw_ap.c @@ -2069,6 +2069,7 @@ static int rtw_ap_set_key(_adapter *padapter, u8 *key, u8 alg, int keyid, u8 set case _TKIP_WTMIC_: case _AES_: keylen = 16; + break; default: keylen = 16; } diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index 464fa11..25651da 100644 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -709,7 +709,7 @@ void mgt_dispatcher(_adapter *padapter, union recv_frame *precv_frame) ptable->func = &OnAuth; else ptable->func = &OnAuthClient; - //pass through + __attribute__ ((fallthrough)); case WIFI_ASSOCREQ: case WIFI_REASSOCREQ: _mgt_dispatcher(padapter, ptable, precv_frame); diff --git a/dkms.conf b/dkms.conf index 3cff3fa..a9a062e 100644 --- a/dkms.conf +++ b/dkms.conf @@ -1,5 +1,5 @@ PACKAGE_NAME=8812au -PACKAGE_VERSION=4.2.2 +PACKAGE_VERSION=4.2.3 DEST_MODULE_LOCATION=/kernel/drivers/net/wireless BUILT_MODULE_NAME=8812au diff --git a/hal/rtl8812a/rtl8812a_mp.c b/hal/rtl8812a/rtl8812a_mp.c index 6cb0bfa..75217fe 100644 --- a/hal/rtl8812a/rtl8812a_mp.c +++ b/hal/rtl8812a/rtl8812a_mp.c @@ -600,6 +600,7 @@ void Hal_SetAntenna(PADAPTER pAdapter) u8 r_rx_antenna_ofdm = 0, r_ant_select_cck_val = 0; u8 chgTx = 0, chgRx = 0; u32 r_ant_sel_cck_val = 0, r_ant_select_ofdm_val = 0, r_ofdm_tx_en_val = 0; + u32 reg0xC50 = 0; p_ofdm_tx = (R_ANTENNA_SELECT_OFDM *)&r_ant_select_ofdm_val; @@ -637,7 +638,6 @@ void Hal_SetAntenna(PADAPTER pAdapter) switch (pAdapter->mppriv.antenna_rx) { - u32 reg0xC50 = 0; case ANTENNA_A: PHY_SetBBReg(pAdapter, rRxPath_Jaguar, bMaskByte0, 0x11); PHY_SetRFReg(pAdapter, ODM_RF_PATH_B, RF_AC_Jaguar, 0xF0000, 0x1); // RF_B_0x0[19:16] = 1, Standby mode diff --git a/include/rtw_version.h b/include/rtw_version.h index 3c2314b..a9262d5 100644 --- a/include/rtw_version.h +++ b/include/rtw_version.h @@ -1 +1 @@ -#define DRIVERVERSION "v4.2.2_7502.20130517" +#define DRIVERVERSION "v4.2.3" diff --git a/install.sh b/install.sh old mode 100644 new mode 100755 diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index e9871b7..d799038 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -1017,11 +1017,15 @@ static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb, #else static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)) - , void *unused -#endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)) - , select_queue_fallback_t fallback +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0) + #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0) + , void *accel_priv + #else + , struct net_device *sb_dev + #endif + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0)) + , select_queue_fallback_t fallback + #endif #endif #endif diff --git a/os_dep/linux/rtw_android.c b/os_dep/linux/rtw_android.c index 2086a8f..71090dc 100644 --- a/os_dep/linux/rtw_android.c +++ b/os_dep/linux/rtw_android.c @@ -352,15 +352,15 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd) goto exit; } -#if(LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0)) - if (!access_ok(priv_cmd.buf, priv_cmd.total_len)){ +#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,0,0)) + if (!access_ok(VERIFY_READ, priv_cmd.buf, priv_cmd.total_len)) { #else - if (!access_ok(VERIFY_READ, priv_cmd.buf, priv_cmd.total_len)){ + if (!access_ok(priv_cmd.buf, priv_cmd.total_len)) { #endif DBG_871X("%s: failed to access memory\n", __FUNCTION__); ret = -EFAULT; goto exit; - } + } if (copy_from_user(command, (void *)priv_cmd.buf, priv_cmd.total_len)) { ret = -EFAULT; goto exit; diff --git a/os_dep/linux/usb_intf.c b/os_dep/linux/usb_intf.c index 80989b7..40d1af7 100644 --- a/os_dep/linux/usb_intf.c +++ b/os_dep/linux/usb_intf.c @@ -257,6 +257,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(0x2604, 0x0012),.driver_info = RTL8812}, /* Tenda - U12 */ {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 */ @@ -280,6 +281,7 @@ static struct usb_device_id rtw_usb_id_tbl[] ={ {USB_DEVICE(0x2357, 0x0103),.driver_info = RTL8812}, /* TP-Link - Archer T4UH(US), AC1200 */ {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, 0x0122),.driver_info = RTL8812}, /* TP-Link - Archer T4UHP, AC1300 */ {USB_DEVICE(0x0411, 0x025d),.driver_info = RTL8812}, /* Buffalo - WI-U3-866D */ {USB_DEVICE(0x0bda, 0x8812),.driver_info = RTL8812}, /* Netis WF2190 */ {USB_DEVICE(0x2604, 0x0012),.driver_info = RTL8812}, /* Tenda U12 */ @@ -303,6 +305,7 @@ static struct usb_device_id rtw_usb_id_tbl[] ={ {USB_DEVICE(0x0BDA, 0xA811),.driver_info = RTL8821}, /* GMYLE - AC450 */ {USB_DEVICE(0x2001, 0x3318),.driver_info = RTL8821}, /* D-Link - DWA-172 */ {USB_DEVICE(0x3823, 0x6249),.driver_info = RTL8821}, /* Obihai - OBiWiFi */ + {USB_DEVICE(0x0bda, 0x0823),.driver_info = RTL8821}, /* I-O DATA - WNPU583B */ #endif #ifdef CONFIG_RTL8192E diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index 7afaf73..7af3324 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -1556,7 +1556,7 @@ static int isFileReadable(char *path) ret = PTR_ERR(fp); } else { - oldfs = get_fs(); set_fs(get_ds()); + oldfs = get_fs(); set_fs(KERNEL_DS); if(1!=readFile(fp, &buf, 1)) ret = PTR_ERR(fp); @@ -1584,7 +1584,7 @@ static int retriveFromFile(char *path, u8* buf, u32 sz) if( 0 == (ret=openFile(&fp,path, O_RDONLY, 0)) ){ DBG_871X("%s openFile path:%s fp=%p\n",__FUNCTION__, path ,fp); - oldfs = get_fs(); set_fs(get_ds()); + oldfs = get_fs(); set_fs(KERNEL_DS); ret=readFile(fp, buf, sz); set_fs(oldfs); closeFile(fp); @@ -1618,7 +1618,7 @@ static int storeToFile(char *path, u8* buf, u32 sz) if( 0 == (ret=openFile(&fp, path, O_CREAT|O_WRONLY, 0666)) ) { DBG_871X("%s openFile path:%s fp=%p\n",__FUNCTION__, path ,fp); - oldfs = get_fs(); set_fs(get_ds()); + oldfs = get_fs(); set_fs(KERNEL_DS); ret=writeFile(fp, buf, sz); set_fs(oldfs); closeFile(fp); diff --git a/project/prjtTest1.htm b/project/prjtTest1.htm new file mode 100644 index 0000000..e69de29 diff --git a/project/prjtTest1.js b/project/prjtTest1.js new file mode 100644 index 0000000..e69de29 diff --git a/repoTest1.js b/repoTest1.js new file mode 100644 index 0000000..e69de29 diff --git a/repoTest2.htm b/repoTest2.htm new file mode 100644 index 0000000..e69de29 diff --git a/runwpa b/runwpa index f825e8b..ebb21d4 100644 --- a/runwpa +++ b/runwpa @@ -1,7 +1,7 @@ #!/bin/bash if [ "`which iwconfig`" = "" ] ; then - echo "WARNING:Wireless tool not exist!" + echo "WARNING:Wireless tool (iwconfig) not exist!" echo " Please install it!" exit else @@ -16,5 +16,3 @@ else fi fi - -