Commit 544c9e80 authored by Sophie Brun's avatar Sophie Brun

Update upstream source from tag 'upstream/5.2.20.2_20180812'

Update to upstream version '5.2.20.2~20180812'
with Debian dir af27e988021634268e2aaa6117c0d0ba8ad69951
parents 0afe0f18 5b88d986
language: c
compiler: gcc
sudo: required
before_install:
- export ALL_DEB=$(wget --quiet -O - ${KERNEL_URL}v${KVER}/ | grep -o 'href=".*"' | grep -m1 all | cut -d '"' -f 2)
- export KVER_BUILD=$(echo $ALL_DEB | cut -d '_' -f 1 | cut -c15-)
- wget ${KERNEL_URL}v${KVER}/$(wget --quiet -O - ${KERNEL_URL}v${KVER}/ | grep -o 'href=".*"' | grep headers | grep generic | grep -m1 amd64 | cut -d '"' -f 2)
- wget ${KERNEL_URL}v${KVER}/$ALL_DEB
- sudo dpkg -i *.deb
script:
- gcc --version
- make CC=$COMPILER KVER=$KVER_BUILD-generic
env:
global:
- KERNEL_URL=http://kernel.ubuntu.com/~kernel-ppa/mainline/
matrix:
include:
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-5
env: COMPILER=gcc-5 KVER=4.15
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-6
env: COMPILER=gcc-6 KVER=4.15
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-7
env: COMPILER=gcc-7 KVER=4.15
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-5
env: COMPILER=gcc-5 KVER=4.14
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-6
env: COMPILER=gcc-6 KVER=4.14
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-7
env: COMPILER=gcc-7 KVER=4.14
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-5
env: COMPILER=gcc-5 KVER=4.4.97
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-4.9
env: COMPILER=gcc-4.9 KVER=3.16.50
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-5
env: COMPILER=gcc-5 KVER=3.14.79
......@@ -3,9 +3,3 @@ config RTL8812AU
depends on USB
---help---
Help message of RTL8812AU
config RTL8814AU
tristate "Realtek 8814A USB WiFi"
depends on USB
---help---
Help message of RTL8814AU
This diff is collapsed.
# RTL8812AU/21AU and RTL8814AU drivers
# with monitor mode and frame injection
## RTL8812AU/21AU and RTL8814AU drivers
## with monitor mode and frame injection
## DKMS
### 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
### 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
### 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 RTL8812AU driver with 'make' use
### Make
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
### Notes
Download
```
git clone -b v5.1.5 https://github.com/aircrack-ng/rtl8812au.git
git clone -b v5.2.20 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 install raspberrypi-kernel-headers
sudo apt-get install raspberrypi-kernel-headers
```
For setting monitor mode
1. Fix problematic interference in monitor mode.
......@@ -70,41 +66,45 @@ For setting TX power
```
sudo iw wlan0 set txpower fixed 3000
```
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
```
## Tested / Working
### LED control
#### You can now control LED behaviour statically by Makefile, for example:
```sh
CONFIG_LED_ENABLE = n
```
Tested and working on
* Kali Linux
* Raspberry PI
value can be y or n
#### statically by module parameter in /etc/modprobe.d/8812au.conf or wherever, for example:
```sh
options 88XXau rtw_led_enable=0
```
value can be 0 or 1
## LED Parameter
#### or dynamically by writing to /proc/net/rtl8812au/$(your interface name)/led_enable, for example:
```sh
$ echo "0" > /proc/net/rtl8812au/$(your interface name)/led_enable
```
We've added the "realtek-leds.conf" in build directory,
with this you may change the leds to
"2: Allways On", "1: Normal" or "0: Allways Off" with placing the file in "/etc/modprobe.d/
value can be 0 or 1
#### check current value:
Manual modprobe will override this file if option value also included at the command line, e.g.,
$ sudo modprobe -r 8812au
$ sudo modprobe 8812au rtw_led_ctrl=1
```sh
$ cat /proc/net/rtl8812au/$(your interface name)/led_enable
```
## Credits
### NetworkManager
Newer versions of NetworkManager switches to random MAC address. Some users would prefer to use a fixed address.
Simply add these lines below
```
astsam - for the main work + monitor/injection support - https://github.com/astsam
evilphish - for great patching (USB3, VHT + txpower control +++) - https://github.com/evilphish
jcard0na - for fixing the "sluggish" / broken injection - https://github.com/jcard0na
dpShaker - for adding support for pre-configured SeqNum (RadioTap)
CGarces - for providing kernel support patch (v4.15)
brimstone - for providing kernel support patch (v4.14)
[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
```
Product: RTL8812A USB Software Package - Linux Driver
Version: v5.2.20.2_28373.20180619
Release History:
v5.2.20.2_28373.20180619
Update phydm to improve TP stability
v5.2.20.1_27761.20180508
Support WiFi-HAL for Android 8
v5.2.20_25672.20171213
Update PHYDM setting
Update FW to v52.10
Correct DFS master function
Fixed WPA2 vulnerability - key reinstallation attacks(KRACKs)(update)
v5.2.9.3_24903.20171101
Fixed WPA2 vulnerability - key reinstallation attacks(KRACKs)
v5.2.9.2_24491.20171027
Remove test code
Fix crash for BF function
Fix wrong memory accesse
Fix encrypt broadcast packet fail
Fix crash for TDLS
v5.2.9.1_24461.20171018
(Do not use)
v5.2.9_22809.20170621
Update FW to v52.2
Update PHYDM setting
Support PNO
Fix WOW issue
Fix efuse issue
Sync channel plan document
Fix DFS issue
Support NAPI & GRO
Enable Power by rate
Fix MP power tracking issue
Fix potential memory out of range
Support CE-RED. 2G: ETSI v2.1.1 / 5G: ETSI v2.1.0
v5.1.5_19247.20160830
Update FW to v49
Update PHY parameters v57
Support TDLS
Enable GTK offload under WOW
Fix no scan results after resume
Fix NDPA issue under scan
Fix dynamic watchdog don't work
v4.3.20_16317.20160108
Disable CONFIG_WIFI_TEST & CONFIG_WOWLAN in Makefile default
v4.3.20_16317.20151231
Fix STBC issue
Fix NDPA sounding issue
Fix r/w rf register racing issue
Fix kernel panic for BT & timer
Fix memory leak for cmd thread
Fix ADDBA flow
Support Power limit
Support USB mode switch
Support Linux Kernel 4.2
Update FW to v41
Update PHY parameters to v55
v4.3.13_14061.20150505
Update FW
Update Phy parameters
Support WOWLAN GTK offload
Support Adaptivity
Support 1T2R
Support 8812AU-VN
Fix scan timeout issue
Fix RFE type error
Fix Spur Calibration flow
Fix some 802.11 logo issue
Fix some crash issues
v4.3.8_12175.20140912
Update PHY parameters to improve throughput
Update FW
Support PMF
Support WoWLAN
Modify channel plan
Fix MP issue
v4.3.2_11100.20140411
Fix p2p issues
Improve throughput
Update FW
v4.2.3_8123.20130705
Update PHY parameters to improve throughput
v4.2.2_7502.20130517
Support 11AC for STA
v4.2.0_7054.20130328
Fix LED behavior
v4.2.0_6952.20130315
First release
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
* Copyright(c) 2007 - 2017 Realtek Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
......@@ -11,12 +11,7 @@
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
*****************************************************************************/
#define _RTW_BR_EXT_C_
#ifdef __KERNEL__
......
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
* Copyright(c) 2007 - 2017 Realtek Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
......@@ -11,12 +11,7 @@
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
*****************************************************************************/
#include <drv_types.h>
......@@ -36,7 +31,7 @@ void MPh2c_timeout_handle(void *FunctionContext)
RTW_INFO("[MPT], MPh2c_timeout_handle\n");
pAdapter = (PADAPTER)FunctionContext;
pMptCtx = &pAdapter->mppriv.MptCtx;
pMptCtx = &pAdapter->mppriv.mpt_ctx;
pMptCtx->bMPh2c_timeout = _TRUE;
......@@ -48,7 +43,7 @@ void MPh2c_timeout_handle(void *FunctionContext)
u32 WaitC2Hevent(PADAPTER pAdapter, u8 *C2H_event, u32 delay_time)
{
PMPT_CONTEXT pMptCtx = &(pAdapter->mppriv.MptCtx);
PMPT_CONTEXT pMptCtx = &(pAdapter->mppriv.mpt_ctx);
pMptCtx->bMPh2c_timeout = _FALSE;
if (pAdapter->registrypriv.mp_mode == 0) {
......@@ -107,7 +102,7 @@ mptbt_SendH2c(
{
/* KIRQL OldIrql = KeGetCurrentIrql(); */
BT_CTRL_STATUS h2cStatus = BT_STATUS_H2C_SUCCESS;
PMPT_CONTEXT pMptCtx = &(Adapter->mppriv.MptCtx);
PMPT_CONTEXT pMptCtx = &(Adapter->mppriv.mpt_ctx);
u1Byte i;
RTW_INFO("[MPT], mptbt_SendH2c()=========>\n");
......@@ -205,7 +200,7 @@ mptbt_BtFwOpCodeProcess(
{
u1Byte H2C_Parameter[6] = {0};
PBT_H2C pH2c = (PBT_H2C)&H2C_Parameter[0];
PMPT_CONTEXT pMptCtx = &(Adapter->mppriv.MptCtx);
PMPT_CONTEXT pMptCtx = &(Adapter->mppriv.mpt_ctx);
PBT_EXT_C2H pExtC2h = (PBT_EXT_C2H)&pMptCtx->c2hBuf[0];
u2Byte paraLen = 0, i;
BT_CTRL_STATUS h2cStatus = BT_STATUS_H2C_SUCCESS, c2hStatus = BT_STATUS_C2H_SUCCESS;
......@@ -266,7 +261,7 @@ mptbt_BtReady(
u1Byte retStatus = BT_STATUS_BT_OP_SUCCESS;
u1Byte btOpcode;
u1Byte btOpcodeVer = 0;
PMPT_CONTEXT pMptCtx = &(Adapter->mppriv.MptCtx);
PMPT_CONTEXT pMptCtx = &(Adapter->mppriv.mpt_ctx);
PBT_EXT_C2H pExtC2h = (PBT_EXT_C2H)&pMptCtx->c2hBuf[0];
u1Byte i;
u1Byte btFwVer = 0, bdAddr[6] = {0};
......@@ -353,16 +348,16 @@ mptbt_BtReady(
void mptbt_close_WiFiRF(PADAPTER Adapter)
{
PHY_SetBBReg(Adapter, 0x824, 0xF, 0x0);
PHY_SetBBReg(Adapter, 0x824, 0x700000, 0x0);
PHY_SetRFReg(Adapter, RF_PATH_A, 0x0, 0xF0000, 0x0);