From 6683c45f40fe25fa814b355ab4036ea865d2e695 Mon Sep 17 00:00:00 2001 From: kimocoder Date: Sun, 5 Aug 2018 20:26:38 +0200 Subject: [PATCH 1/5] Updated DKMS.conf + Makefile cleanup --- Kconfig | 3 +-- Makefile | 12 ------------ dkms.conf | 11 +++++------ 3 files changed, 6 insertions(+), 20 deletions(-) diff --git a/Kconfig b/Kconfig index f87653d..bf7d0dc 100644 --- a/Kconfig +++ b/Kconfig @@ -2,5 +2,4 @@ config RTL8812AU tristate "Realtek 8812A USB WiFi" depends on USB ---help--- - Help message of RTL8812AU - + Help message of RTL8812AU diff --git a/Makefile b/Makefile index f83c30c..3b74c34 100755 --- a/Makefile +++ b/Makefile @@ -214,18 +214,6 @@ EXTRA_CFLAGS += -DDRV_NAME=\"rtl8812au\" endif -#ifeq ($(RTL8814), 1) -#CONFIG_RTL8812A = n -#CONFIG_RTL8821A = n -#CONFIG_RTL8814A = y -#endif - -#ifeq ($(RTL8821), 1) -#CONFIG_RTL8812A = y -#CONFIG_RTL8821A = y -#CONFIG_RTL8814A = n -#endif - ifeq ($(CONFIG_USB2_EXTERNAL_POWER), y) EXTRA_CFLAGS += -DCONFIG_USE_EXTERNAL_POWER endif diff --git a/dkms.conf b/dkms.conf index a8c9005..df9bc7e 100644 --- a/dkms.conf +++ b/dkms.conf @@ -1,11 +1,10 @@ PACKAGE_NAME="realtek-rtl88xxau" -PACKAGE_VERSION="5.2.20.2~20180804" -CLEAN="make clean" -BUILT_MODULE_NAME[0]=8812au +PACKAGE_VERSION="5.2.20.2~20180805" +CLEAN="'make' clean" +BUILT_MODULE_NAME[0]=88XXau PROCS_NUM=`nproc` [ $PROCS_NUM -gt 16 ] && PROCS_NUM=16 DEST_MODULE_LOCATION[0]="/updates" -MAKE[0]="'make' -j$PROCS_NUM KVER=${kernelver} && 'make' -j$PROCS_NUM RTL8814=1 KVER=${kernelver}" -BUILT_MODULE_NAME[1]=8814au -DEST_MODULE_LOCATION[1]="/updates" +MAKE="'make' -j$PROCS_NUM KVER=${kernelver} KSRC=/lib/modules/${kernelver}/build" AUTOINSTALL="yes" +REMAKE_INITRD=no From b39cd0827cd20bad2b17636ae181fd0289a750c5 Mon Sep 17 00:00:00 2001 From: kimocoder Date: Sun, 5 Aug 2018 20:31:51 +0200 Subject: [PATCH 2/5] Initialize some variables --- os_dep/linux/ioctl_cfg80211.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index 156aa2c..461f7b9 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -4816,8 +4816,8 @@ static int cfg80211_rtw_get_channel(struct wiphy *wiphy, struct wireless_dev *wd int channel; int control_freq; int center_freq; - int center_freq2=0; - int width; + int center_freq2 = 0; + int width = NL80211_CHAN_WIDTH_20; int band; int bandWidth; int offset; @@ -4829,7 +4829,7 @@ static int cfg80211_rtw_get_channel(struct wiphy *wiphy, struct wireless_dev *wd return -ENODEV; offset = rtw_get_oper_choffset(padapter); - channel = adapter_to_dvobj(padapter)->oper_channel; + center_freq = channel = adapter_to_dvobj(padapter)->oper_channel; if (channel >= 1) { switch (pHalData->current_band_type) { case 0: From a1f72c744de12b47446bcc1afade1264e94a9187 Mon Sep 17 00:00:00 2001 From: kimocoder Date: Sun, 5 Aug 2018 20:40:03 +0200 Subject: [PATCH 3/5] Use DEBUG=1 to enable debug messages, DEBUG=2 to enable trace messages --- Makefile | 11 +++++++++++ include/autoconf.h | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3b74c34..fc167d8 100755 --- a/Makefile +++ b/Makefile @@ -196,6 +196,17 @@ ifeq ($(CONFIG_PCI_HCI), y) HCI_NAME = pci endif +ifeq ($(DEBUG), 1) +EXTRA_CFLAGS += -DDBG=1 -DCONFIG_RTW_DEBUG -DCONFIG_DBG_COUNTER -DRTW_LOG_LEVEL=5 +EXTRA_CFLAGS += -DCONFIG_RADIOTAP_WITH_RXDESC +else ifeq ($(DEBUG), 2) +EXTRA_CFLAGS += -DDBG=1 -DCONFIG_RTW_DEBUG -DCONFIG_DBG_COUNTER -DRTW_LOG_LEVEL=5 +EXTRA_CFLAGS += -DCONFIG_DEBUG_RTL871X +EXTRA_CFLAGS += -DCONFIG_RADIOTAP_WITH_RXDESC +else +EXTRA_CFLAGS += -DDBG=0 +endif + ifeq ($(CONFIG_RTL8812A)_$(CONFIG_RTL8821A)_$(CONFIG_RTL8814A), y_y_y) EXTRA_CFLAGS += -DDRV_NAME=\"rtl88xxau\" diff --git a/include/autoconf.h b/include/autoconf.h index bc57c41..927b0be 100644 --- a/include/autoconf.h +++ b/include/autoconf.h @@ -323,7 +323,7 @@ /* * Debug Related Config */ -#define DBG 1 +// #define DBG 1 #define CONFIG_PROC_DEBUG From ade874e2ea3f032daa951fc291e60f2dd7a581a7 Mon Sep 17 00:00:00 2001 From: kimocoder Date: Sun, 5 Aug 2018 20:49:12 +0200 Subject: [PATCH 4/5] Update README.md --- README.md | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 7839c69..2582974 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ### DKMS This driver can be installed using [DKMS]. This is a system which will automatically recompile and install a kernel module when a new kernel gets installed or updated. To make use of DKMS, install the `dkms` package, which on Debian (based) systems is done like this: ``` -sudo apt install dkms +sudo apt-get install dkms ``` ### Installation of Driver @@ -20,16 +20,11 @@ sudo ./dkms-remove.sh ``` ### Make -For building & installing the rtl8812au/rtl8821au driver with 'make' use +For building & installing the driver with 'make' use ``` make make install ``` -and for building & installing the rtl8814au driver with 'make' use -``` -make RTL8814=1 -make install RTL8814=1 -``` ### Notes Download @@ -46,7 +41,7 @@ sudo apt-get install linux-headers-`uname -r` ``` For Raspberry (RPI) ``` -sudo apt install raspberrypi-kernel-headers +sudo apt-get install raspberrypi-kernel-headers ``` For setting monitor mode 1. Fix problematic interference in monitor mode. @@ -84,7 +79,7 @@ value can be y or n #### statically by module parameter in /etc/modprobe.d/8812au.conf or wherever, for example: ```sh -options 8812au rtw_led_enable=0 +options 88XXau rtw_led_enable=0 ``` value can be 0 or 1 From ab417f17b27c11b2ff8cf2b56967362dfd21338a Mon Sep 17 00:00:00 2001 From: kimocoder Date: Sun, 5 Aug 2018 20:52:37 +0200 Subject: [PATCH 5/5] Kconfig alignement --- Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kconfig b/Kconfig index bf7d0dc..e73fc15 100644 --- a/Kconfig +++ b/Kconfig @@ -2,4 +2,4 @@ config RTL8812AU tristate "Realtek 8812A USB WiFi" depends on USB ---help--- - Help message of RTL8812AU + Help message of RTL8812AU