4b162cbf8e
Interface renaming crashes because rtw_ndev_notifier_call() tries to get the adapter from ndev before ndev itself is assigned: [29504.542194] rtl88xxau 3-5:1.0 wlp0s20u5: renamed from wlan0 [29504.561961] BUG: kernel NULL pointer dereference, address: 00000000000008c0 [29504.561966] #PF: supervisor read access in kernel mode [29504.561968] #PF: error_code(0x0000) - not-present page [29504.561970] PGD 0 P4D 0 [29504.561974] Oops: 0000 [#1] PREEMPT SMP NOPTI [29504.561978] CPU: 5 PID: 27127 Comm: systemd-udevd Tainted: G OE 5.3.1-arch1-1-ARCH #1 [29504.561979] Hardware name: /DH87RL, BIOS RLH8710H.86A.0331.2018.0327.1547 03/27/2018 [29504.562035] RIP: 0010:rtw_ndev_notifier_call+0x31/0x55 [88XXau] [29504.562038] Code: d2 74 45 55 53 48 89 f3 48 8b 2a 48 85 ed 74 12 48 89 ef e8 99 fe ff ff 48 83 fb 0b 75 04 84 c0 75 08 b8 00 00 00 00 5b 5d c3 <48> 8b 04 25 c0 08 00 00 48 8d b8 48 45 00 00 ba 10 00 00 00 48 89 [29504.562041] RSP: 0018:ffffb6e28252f7b0 EFLAGS: 00010202 [29504.562043] RAX: 0000000000000001 RBX: 000000000000000b RCX: 0000000000000001 [29504.562045] RDX: ffffffffc149ce80 RSI: 000000000000000b RDI: ffffa35bb1fad000 [29504.562046] RBP: ffffa35bb1fad000 R08: 0000000000800000 R09: ffffffffa489c660 [29504.562047] R10: ffffb6e28252f7c8 R11: ffffb6e38252f6b6 R12: 000000000000000b [29504.562048] R13: ffffb6e28252f818 R14: ffffffffa4907d20 R15: 0000000000000000 [29504.562050] FS: 00007f638323f840(0000) GS:ffffa35c8eb40000(0000) knlGS:0000000000000000 [29504.562051] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [29504.562053] CR2: 00000000000008c0 CR3: 000000040bcb6006 CR4: 00000000001606e0 [29504.562054] Call Trace: [29504.562062] notifier_call_chain+0x4c/0x70 [29504.562067] dev_change_name+0x219/0x320 [29504.562071] do_setlink+0xd45/0xf10 [29504.562077] ? preempt_count_add+0x68/0xa0 [29504.562081] ? _raw_spin_lock+0x13/0x30 [29504.562083] ? _raw_spin_unlock+0x16/0x30 [29504.562087] ? get_partial_node.isra.0.part.0+0xc2/0x210 [29504.562090] ? __alloc_pages_nodemask+0x1c4/0x10b0 [29504.562093] rtnl_setlink+0x105/0x170 [29504.562099] rtnetlink_rcv_msg+0x137/0x3c0 [29504.562101] ? rtnl_calcit.isra.0+0x120/0x120 [29504.562105] netlink_rcv_skb+0x75/0x140 [29504.562108] netlink_unicast+0x177/0x1f0 [29504.562111] netlink_sendmsg+0x204/0x3d0 [29504.562116] sock_sendmsg+0x5e/0x60 [29504.562118] __sys_sendto+0x120/0x190 [29504.562122] __x64_sys_sendto+0x25/0x30 [29504.562125] do_syscall_64+0x5f/0x1c0 [29504.562128] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Move the assignment further down after ndev is known. Signed-off-by: Jurica Vukadin <jura@vukad.in> |
||
---|---|---|
core | ||
docs | ||
hal | ||
include | ||
os_dep | ||
platform | ||
tools | ||
.gitignore | ||
.travis.yml | ||
dkms-install.sh | ||
dkms-remove.sh | ||
dkms.conf | ||
Kconfig | ||
LICENSE | ||
Makefile | ||
README.md | ||
ReleaseNotes.pdf |
RTL8812AU/21AU and RTL8814AU drivers
Only for use with Linux & Android
Supports
* Monitor mode
* Frame injection
* WPA3 SAE
* Wi-Fi Direct
* Hostapd
* USB 3.0 (currently forced down to 2.0)
* Kernel up to v5.3+
* RTKMPtool for low level debug
Known Issues
* VMware Workstation has issues, giving kernel oops on module load.
* Ubuntu has enabled module signing (kernel) by default, workaround: turn off "secure boot"
TODO
* Test & fix the 8821au support (@fariouche has been working on it)
* Clean out Windows & FreeBSD code (partially. some NDIS code and switches around)
* Clean out unsupported chipsets (partially. some switches left all around
* Throw/rip Intel WIDI support out, it's left behind anyway.
* Consider adding rtl8188eus HAL/phydm support into the driver for simplicity.
IPERF3 benchmark
[Device] Alfa Networks AWUS036ACH
[Chipset] 88XXau (rtl8812au)
[Branch] v5.6.4.1
[Distance] 10m free sight
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 11.6 MBytes 97.4 Mbits/sec 0 96.2 KBytes
[ 5] 1.00-2.00 sec 11.2 MBytes 93.8 Mbits/sec 0 100 KBytes
[ 5] 2.00-3.00 sec 11.2 MBytes 93.8 Mbits/sec 0 100 KBytes
[ 5] 3.00-4.00 sec 11.2 MBytes 93.8 Mbits/sec 0 100 KBytes
[ 5] 4.00-5.00 sec 11.2 MBytes 93.8 Mbits/sec 0 100 KBytes
[ 5] 5.00-6.00 sec 11.4 MBytes 95.9 Mbits/sec 0 105 KBytes
[ 5] 6.00-7.00 sec 11.2 MBytes 93.8 Mbits/sec 0 105 KBytes
[ 5] 7.00-8.00 sec 11.3 MBytes 94.9 Mbits/sec 0 157 KBytes
[ 5] 8.00-9.00 sec 11.2 MBytes 93.8 Mbits/sec 0 157 KBytes
[ 5] 9.00-10.00 sec 11.2 MBytes 94.3 Mbits/sec 0 157 KBytes
[ 5] 10.00-11.00 sec 11.2 MBytes 93.8 Mbits/sec 0 157 KBytes
[ 5] 11.00-12.00 sec 11.2 MBytes 93.8 Mbits/sec 0 157 KBytes
[ 5] 12.00-13.00 sec 11.2 MBytes 94.4 Mbits/sec 0 157 KBytes
[ 5] 13.00-14.00 sec 11.2 MBytes 93.8 Mbits/sec 0 157 KBytes
[ 5] 14.00-15.00 sec 11.2 MBytes 94.4 Mbits/sec 0 157 KBytes
[ 5] 15.00-16.00 sec 10.9 MBytes 91.7 Mbits/sec 0 157 KBytes
[ 5] 16.00-17.00 sec 11.2 MBytes 94.4 Mbits/sec 0 157 KBytes
[ 5] 17.00-18.00 sec 11.2 MBytes 94.4 Mbits/sec 0 157 KBytes
[ 5] 18.00-19.00 sec 11.2 MBytes 94.4 Mbits/sec 0 157 KBytes
[ 5] 19.00-20.00 sec 11.2 MBytes 93.8 Mbits/sec 0 157 KBytes
[ 5] 20.00-21.00 sec 11.2 MBytes 93.8 Mbits/sec 0 157 KBytes
[ 5] 21.00-22.00 sec 11.2 MBytes 93.8 Mbits/sec 0 157 KBytes
[ 5] 22.00-23.00 sec 11.2 MBytes 93.8 Mbits/sec 0 157 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-23.15 sec 260 MBytes 94.2 Mbits/sec 0 sender
[ 5] 0.00-23.15 sec 0.00 Bytes 0.00 bits/sec receiver
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-get install dkms
Installation of Driver
In order to install the driver open a terminal in the directory with the source code and execute the following command:
sudo ./dkms-install.sh
Removal of Driver
In order to remove the driver from your system open a terminal in the directory with the source code and execute the following command:
sudo ./dkms-remove.sh
Make
For building & installing the driver with 'make' use
make
make install
Notes
Download
git clone -b v5.6.4.1 https://github.com/aircrack-ng/rtl8812au.git
cd rtl*
Package / Build dependencies (Kali)
sudo apt-get install build-essential
sudo apt-get install bc
sudo apt-get install libelf-dev
sudo apt-get install linux-headers-`uname -r`
For Raspberry (RPI)
sudo apt-get install bc raspberrypi-kernel-headers
Then run this step to change platform in Makefile, For RPI 1/2/3/ & 0/Zero:
$ sed -i 's/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g' Makefile
$ sed -i 's/CONFIG_PLATFORM_ARM_RPI = n/CONFIG_PLATFORM_ARM_RPI = y/g' Makefile
But for RPI 3B+ & 4B you will need to run those below which builds the ARM64 arch driver:
$ sed -i 's/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g' Makefile
$ sed -i 's/CONFIG_PLATFORM_ARM64_RPI = n/CONFIG_PLATFORM_ARM64_RPI = y/g' Makefile
For setting monitor mode
- Fix problematic interference in monitor mode.
airmon-ng check kill
You may also uncheck the box "Automatically connect to this network when it is avaiable" in nm-connection-editor. This only works if you have a saved wifi connection.
- Set interface down
sudo ip link set wlan0 down
- Set monitor mode
sudo iw dev wlan0 set type monitor
- Set interface up
sudo ip link set wlan0 up
For setting TX power
sudo iw wlan0 set txpower fixed 3000
LED control
You can now control LED behaviour statically by Makefile, for example:
CONFIG_LED_ENABLE = n
value can be y or n
statically by module parameter in /etc/modprobe.d/8812au.conf or wherever, for example:
options 88XXau rtw_led_enable=0
value can be 0 or 1
or dynamically by writing to /proc/net/rtl8812au/$(your interface name)/led_enable, for example:
$ echo "0" > /proc/net/rtl8812au/$(your interface name)/led_enable
value can be 0 or 1
check current value:
$ cat /proc/net/rtl8812au/$(your interface name)/led_enable
USB Mode Switch
0: doesn't switch, 1: switch from usb2.0 to usb 3.0 2: switch from usb3.0 to usb 2.0
$ rmmod 88XXau
$ modprobe 88XXau rtw_switch_usb_mode:int (0: no switch 1: switch from usb2 to usb3 2: switch from usb3 to usb2)
NetworkManager
Newer versions of NetworkManager switches to random MAC address. Some users would prefer to use a fixed address. Simply add these lines below
[device]
wifi.scan-rand-mac-address=no
at the end of file /etc/NetworkManager/NetworkManager.conf and restart NetworkManager with the command:
sudo service NetworkManager restart
Credits / Contributors
astsam - https://github.com/astsam
aircrack-ng - https://github.com/aircrack-ng
evilphish - https://github.com/evilphish
fariouche - https://github.com/fariouche
CGarces - https://github.com/CGarces
ZerBea - https://github.com/ZerBea
lwfinger - https://github.com/lwfinger
Ulli-Kroll - https://github.com/Ulli-Kroll
Aldo, thanks to Realtek and Alfa Networks for all they're help & support.
All the others interested and participating. Appreciate it!