mirror of
https://github.com/chinawrj/rtl8812au
synced 2024-11-28 08:04:25 +00:00
commit
4845895d62
13
Makefile
13
Makefile
@ -1,8 +1,8 @@
|
|||||||
EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)
|
EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)
|
||||||
EXTRA_CFLAGS += -O1
|
EXTRA_CFLAGS += -O1
|
||||||
#EXTRA_CFLAGS += -O3
|
#EXTRA_CFLAGS += -O3
|
||||||
#EXTRA_CFLAGS += -Wall
|
EXTRA_CFLAGS += -Wall
|
||||||
#EXTRA_CFLAGS += -Wextra
|
EXTRA_CFLAGS += -Wextra
|
||||||
#EXTRA_CFLAGS += -Werror
|
#EXTRA_CFLAGS += -Werror
|
||||||
#EXTRA_CFLAGS += -pedantic
|
#EXTRA_CFLAGS += -pedantic
|
||||||
#EXTRA_CFLAGS += -Wshadow -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
|
#EXTRA_CFLAGS += -Wshadow -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
|
||||||
@ -13,7 +13,13 @@ EXTRA_CFLAGS += -Wno-unused-label
|
|||||||
EXTRA_CFLAGS += -Wno-unused-parameter
|
EXTRA_CFLAGS += -Wno-unused-parameter
|
||||||
EXTRA_CFLAGS += -Wno-unused-function
|
EXTRA_CFLAGS += -Wno-unused-function
|
||||||
EXTRA_CFLAGS += -Wno-unused
|
EXTRA_CFLAGS += -Wno-unused
|
||||||
#EXTRA_CFLAGS += -Wno-uninitialized
|
EXTRA_CFLAGS += -Wno-date-time
|
||||||
|
EXTRA_CFLAGS += -Wno-misleading-indentation
|
||||||
|
EXTRA_CFLAGS += -Wno-uninitialized
|
||||||
|
# Relax some warnings from '-Wextra' so we won't get flooded with warnings
|
||||||
|
EXTRA_CFLAGS += -Wno-sign-compare
|
||||||
|
EXTRA_CFLAGS += -Wno-missing-field-initializers
|
||||||
|
EXTRA_CFLAGS += -Wno-type-limits
|
||||||
|
|
||||||
GCC_VER_49 := $(shell echo `$(CC) -dumpversion | cut -f1-2 -d.` \>= 4.9 | bc )
|
GCC_VER_49 := $(shell echo `$(CC) -dumpversion | cut -f1-2 -d.` \>= 4.9 | bc )
|
||||||
ifeq ($(GCC_VER_49),1)
|
ifeq ($(GCC_VER_49),1)
|
||||||
@ -45,6 +51,7 @@ CONFIG_PCI_HCI = n
|
|||||||
CONFIG_SDIO_HCI = n
|
CONFIG_SDIO_HCI = n
|
||||||
CONFIG_GSPI_HCI = n
|
CONFIG_GSPI_HCI = n
|
||||||
########################## Features ###########################
|
########################## Features ###########################
|
||||||
|
CONFIG_NET_NS = y
|
||||||
CONFIG_MP_INCLUDED = y
|
CONFIG_MP_INCLUDED = y
|
||||||
CONFIG_POWER_SAVING = n
|
CONFIG_POWER_SAVING = n
|
||||||
CONFIG_USB_AUTOSUSPEND = n
|
CONFIG_USB_AUTOSUSPEND = n
|
||||||
|
86
README.md
86
README.md
@ -1,19 +1,14 @@
|
|||||||
# rtl8812au
|
# rtl8812au
|
||||||
|
|
||||||
## Realtek 8812AU driver version 5.2.20
|
## Realtek 8812AU driver v5.2.20 with monitor mode and frame injection
|
||||||
|
|
||||||
Only supports 8812AU chipset.
|
Only supports 8812AU chipset, not the 8814AU or the 8821AU at this point.
|
||||||
|
|
||||||
Works fine with 4.15 kernel. Source now builds with no warnings or errors.
|
### Changelogs and TODO
|
||||||
|
Check the "docs/" folder for more information.
|
||||||
|
Both Realtek changelog is added and our personal changelog and TODO is in there.
|
||||||
|
|
||||||
Added (cosmeticly edited) original Realtek_Changelog.txt, this README.md and dkms.conf.
|
### Building / Installing
|
||||||
|
|
||||||
Added device USB IDs, sorted by ID number.
|
|
||||||
Added LED control by Makefile, module parameter and dynamic /proc writing.
|
|
||||||
Added VHT extras.
|
|
||||||
Added regdb files.
|
|
||||||
|
|
||||||
### Building
|
|
||||||
|
|
||||||
To build and install module manually:
|
To build and install module manually:
|
||||||
```sh
|
```sh
|
||||||
@ -24,25 +19,55 @@ $ sudo make install
|
|||||||
To use dkms install:
|
To use dkms install:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
(as root, or sudo) copy source folder contents to /usr/src/rtl8812au-5.2.20
|
$ sudo ./dkms-install.sh
|
||||||
```
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ sudo dkms add -m rtl8812au -v 5.2.20
|
|
||||||
$ sudo dkms build -m rtl8812au -v 5.2.20
|
|
||||||
$ sudo dkms install -m rtl8812au -v 5.2.20
|
|
||||||
```
|
```
|
||||||
|
|
||||||
To use dkms uninstall and remove:
|
To use dkms uninstall and remove:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ sudo dkms remove -m rtl8812au -v 5.2.20 --all
|
$ sudo ./dkms-remove.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### Notes
|
||||||
|
Download
|
||||||
|
```
|
||||||
|
git clone -b v5.1.5 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) also
|
||||||
|
```
|
||||||
|
sudo apt install raspberrypi-kernel-headers
|
||||||
|
```
|
||||||
|
|
||||||
|
### For setting monitor mode
|
||||||
|
1. 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.
|
||||||
|
|
||||||
|
2. Set interface down
|
||||||
|
```
|
||||||
|
sudo ip link set wlan0 down
|
||||||
|
```
|
||||||
|
3. Set monitor mode
|
||||||
|
```
|
||||||
|
sudo iw dev wlan0 set type monitor
|
||||||
|
```
|
||||||
|
4. Set interface up
|
||||||
|
```
|
||||||
|
sudo ip link set wlan0 up
|
||||||
```
|
```
|
||||||
|
|
||||||
### LED control
|
### LED control
|
||||||
|
|
||||||
Thanks to @dkadioglu and others for a start on this.
|
|
||||||
|
|
||||||
#### You can now control LED behaviour statically by Makefile, for example:
|
#### You can now control LED behaviour statically by Makefile, for example:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@ -72,17 +97,12 @@ $ cat /proc/net/rtl8812au/$(your interface name)/led_enable
|
|||||||
|
|
||||||
### NetworkManager
|
### NetworkManager
|
||||||
|
|
||||||
As others have noted, people using NetworkManager need to add this stanza to /etc/NetworkManager/NetworkManager.conf
|
Newer versions of NetworkManager switches to random MAC address. Some users would prefer to use a fixed address.
|
||||||
|
Simply add these lines below
|
||||||
```sh
|
|
||||||
[device]
|
|
||||||
wifi.scan-rand-mac-address=no
|
|
||||||
```
|
```
|
||||||
|
[device]
|
||||||
### Regdb files
|
wifi.scan-rand-mac-address=no
|
||||||
|
|
||||||
If needed, copy the regulatory database files in regdb/ to /lib/firmware/
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ sudo cp ./regdb/* /lib/firmware/
|
|
||||||
```
|
```
|
||||||
|
at the end of file /etc/NetworkManager/NetworkManager.conf and restart NetworkManager with the command:
|
||||||
|
```
|
||||||
|
sudo service NetworkManager restart
|
||||||
|
@ -3,9 +3,7 @@
|
|||||||
----------------------------------------------------------------------------------------
|
----------------------------------------------------------------------------------------
|
||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
- Add support for namespaces (NS)
|
|
||||||
- Fix count for frames in RadioTap header (add to stats)
|
- Fix count for frames in RadioTap header (add to stats)
|
||||||
- Enable TX queue in monitor mode
|
|
||||||
- Place signal quality and per antenna rssi into radiotap header
|
- Place signal quality and per antenna rssi into radiotap header
|
||||||
- Calculate signal quality in the monitor mode
|
- Calculate signal quality in the monitor mode
|
||||||
- Add channels 151 and 153
|
- Add channels 151 and 153
|
||||||
@ -23,6 +21,10 @@
|
|||||||
|
|
||||||
+++ And propably alot more. We'll see.
|
+++ And propably alot more. We'll see.
|
||||||
|
|
||||||
|
[2018.06.26]
|
||||||
|
- Enable TX queue in the monitor mode
|
||||||
|
- Add support for namespaces (CONFIG_NET_NS)
|
||||||
|
|
||||||
[2018.06.25]
|
[2018.06.25]
|
||||||
- Fix injected frames drop
|
- Fix injected frames drop
|
||||||
- Fixed compilation on some ARM platforms
|
- Fixed compilation on some ARM platforms
|
||||||
|
@ -7188,6 +7188,9 @@ static void rtw_cfg80211_preinit_wiphy(_adapter *adapter, struct wiphy *wiphy)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 0, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 0, 0))
|
||||||
|
#if defined(CONFIG_NET_NS)
|
||||||
|
wiphy->flags |= WIPHY_FLAG_NETNS_OK;
|
||||||
|
#endif //CONFIG_NET_NS
|
||||||
wiphy->flags |= WIPHY_FLAG_SUPPORTS_SEPARATE_DEFAULT_KEYS;
|
wiphy->flags |= WIPHY_FLAG_SUPPORTS_SEPARATE_DEFAULT_KEYS;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1605,6 +1605,9 @@ int rtw_os_ndev_register(_adapter *adapter, const char *name)
|
|||||||
rtw_init_netdev_name(ndev, name);
|
rtw_init_netdev_name(ndev, name);
|
||||||
|
|
||||||
_rtw_memcpy(ndev->dev_addr, adapter_mac_addr(adapter), ETH_ALEN);
|
_rtw_memcpy(ndev->dev_addr, adapter_mac_addr(adapter), ETH_ALEN);
|
||||||
|
#if defined(CONFIG_NET_NS)
|
||||||
|
dev_net_set(ndev, wiphy_net(adapter_to_wiphy(adapter)));
|
||||||
|
#endif //defined(CONFIG_NET_NS)
|
||||||
|
|
||||||
/* Tell the network stack we exist */
|
/* Tell the network stack we exist */
|
||||||
|
|
||||||
@ -3211,7 +3214,7 @@ int _netdev_open(struct net_device *pnetdev)
|
|||||||
rtw_set_pwr_state_check_timer(pwrctrlpriv);
|
rtw_set_pwr_state_check_timer(pwrctrlpriv);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* rtw_netif_carrier_on(pnetdev); */ /* call this func when rtw_joinbss_event_callback return success */
|
rtw_netif_carrier_on(pnetdev); /* call this func when rtw_joinbss_event_callback return success */
|
||||||
rtw_netif_wake_queue(pnetdev);
|
rtw_netif_wake_queue(pnetdev);
|
||||||
|
|
||||||
#ifdef CONFIG_BR_EXT
|
#ifdef CONFIG_BR_EXT
|
||||||
|
@ -220,6 +220,7 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
|
|||||||
{USB_DEVICE(0x0411, 0x025D), .driver_info = RTL8821}, /* BUFFALO - WI-U3-866D */
|
{USB_DEVICE(0x0411, 0x025D), .driver_info = RTL8821}, /* BUFFALO - WI-U3-866D */
|
||||||
{USB_DEVICE(0x0411, 0x029B), .driver_info = RTL8821}, /* BUFFALO - WI-U2-433DHP */
|
{USB_DEVICE(0x0411, 0x029B), .driver_info = RTL8821}, /* BUFFALO - WI-U2-433DHP */
|
||||||
{USB_DEVICE(0x0BDA, 0xA811), .driver_info = RTL8821}, /* Comfast - CF-915AC, CF-916AC */
|
{USB_DEVICE(0x0BDA, 0xA811), .driver_info = RTL8821}, /* Comfast - CF-915AC, CF-916AC */
|
||||||
|
{USB_DEVICE(0x056E, 0x4007), .driver_info = RTL8821}, /* Elecom - WDC-433DU2HBK */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RTL8192E
|
#ifdef CONFIG_RTL8192E
|
||||||
@ -241,13 +242,21 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
|
|||||||
#endif /* CONFIG_RTL8703B */
|
#endif /* CONFIG_RTL8703B */
|
||||||
|
|
||||||
#ifdef CONFIG_RTL8814A
|
#ifdef CONFIG_RTL8814A
|
||||||
|
|
||||||
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8813), .driver_info = RTL8814A},
|
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8813), .driver_info = RTL8814A},
|
||||||
{USB_DEVICE(0x2001, 0x331a), .driver_info = RTL8814A}, /* D-Link - D-Link */
|
{USB_DEVICE(0x2001, 0x331A), .driver_info = RTL8814A}, /* D-Link - D-Link */
|
||||||
{USB_DEVICE(0x0b05, 0x1817), .driver_info = RTL8814A}, /* ASUS - ASUSTeK */
|
{USB_DEVICE(0x0B05, 0x1817), .driver_info = RTL8814A}, /* ASUS - ASUSTeK */
|
||||||
|
{USB_DEVICE(0x0B05, 0x1852), .driver_info = RTL8814A}, /* ASUS - ASUSTeK */
|
||||||
|
{USB_DEVICE(0x0B05, 0x1853), .driver_info = RTL8814A}, /* ASUS - ASUSTeK */
|
||||||
{USB_DEVICE(0x056E, 0x400B), .driver_info = RTL8814A}, /* ELECOM - ELECOM */
|
{USB_DEVICE(0x056E, 0x400B), .driver_info = RTL8814A}, /* ELECOM - ELECOM */
|
||||||
{USB_DEVICE(0x056E, 0x400D), .driver_info = RTL8814A}, /* ELECOM - ELECOM */
|
{USB_DEVICE(0x056E, 0x400D), .driver_info = RTL8814A}, /* ELECOM - ELECOM */
|
||||||
{USB_DEVICE(0x7392, 0xA834), .driver_info = RTL8814A}, /* Edimax - Edimax */
|
{USB_DEVICE(0x7392, 0xA834), .driver_info = RTL8814A}, /* Edimax - Edimax */
|
||||||
|
{USB_DEVICE(0x7392, 0xA833), .driver_info = RTL8814A}, /* Edimax - AC1750 */
|
||||||
|
{USB_DEVICE(0x0BDA, 0x8813), .driver_info = RTL8814A}, /* Edimax - EDUP Adapters */
|
||||||
|
{USB_DEVICE(0x2357, 0x0106), .driver_info = RTL8814A}, /* TP-LINK Archer T9UH */
|
||||||
|
{USB_DEVICE(0x20F4, 0x809A), .driver_info = RTL8814A}, /* TRENDnet - TRENDnet */
|
||||||
|
{USB_DEVICE(0x20F4, 0x809B), .driver_info = RTL8814A}, /* TRENDnet TEW-809UB */
|
||||||
|
{USB_DEVICE(0x0846, 0x9054), .driver_info = RTL8814A}, /* Netgear A7000 */
|
||||||
|
{USB_DEVICE(0x0E66, 0x0026), .driver_info = RTL8814A}, /* Hawking HW17ACU 1750AC */
|
||||||
#endif /* CONFIG_RTL8814A */
|
#endif /* CONFIG_RTL8814A */
|
||||||
|
|
||||||
#ifdef CONFIG_RTL8188F
|
#ifdef CONFIG_RTL8188F
|
||||||
|
Loading…
Reference in New Issue
Block a user