mirror of https://github.com/aircrack-ng/rtl8812au
Compare commits
16 Commits
1d10541616
...
9d23382f00
Author | SHA1 | Date |
---|---|---|
Deleted user | 9d23382f00 | |
Christian Bremvåg | 4f645eec17 | |
Rudi Heitbaum | 123e373f88 | |
Christian Bremvåg | f23979f0d2 | |
Christian Bremvåg | 98895e9f2e | |
Christian Bremvåg | 6b6f1347dc | |
Christian Bremvåg | 135756af13 | |
alium | 88d0f5ca85 | |
alium | d3feb6ae93 | |
CamiKaseM7 | c0d16813f5 | |
Debojyoty Datta | a1ce9a47cf | |
Debojyoty Datta | 254d2f8e69 | |
Debojyoty Datta | 8b482a7a83 | |
Debojyoty Datta | 05a3e3a04d | |
Debojyoty Datta | b332880374 | |
Debojyoty Datta | 58db858ae6 |
|
@ -0,0 +1,116 @@
|
|||
## Driver version 5.6.4.2
|
||||
|
||||
## First Edit the ioctl_cfg80211.c file in this location rtl8812au/os_dep/linux/ioctl_cfg80211.c
|
||||
|
||||
line no 2328 sinfo->bss_param.flags |= NL80211_STA_BSS_PARAM_SHORT_PREAMBLE;
|
||||
line no 2331 sinfo->bss_param.flags |= NL80211_STA_BSS_PARAM_SHORT_SLOT_TIME;
|
||||
line no 2335 sinfo->bss_param.flags |= NL80211_STA_BSS_PARAM_CTS_PROT;
|
||||
line no 2338 sinfo->bss_param.flags |= NL80211_STA_BSS_PARAM_DTIM_PERIOD;
|
||||
|
||||
|
||||
## Some Important Points
|
||||
|
||||
Do not change your kernel name or version in any manner while preparing the module or else it will not work and you will get errors like insmod 8188.ko >> fatal error exec format failed. This happens when you use build script from kali site and on the other hand you build your modules manually.
|
||||
|
||||
For example say during the time of building kernel your situation was like /lib/modules/3.10.35-kali and while making the module your position is say /lib/modules/3.10.35_kali or anything else. This kind of thing will not work. So first built your kernel then just after that build your modules.
|
||||
|
||||
|
||||
## Toolchain Used for building this module - gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf
|
||||
|
||||
## 2.Your kernel should enabled below. check in /proc/config.gz or device_defconfig
|
||||
|
||||
CONFIG_MODULES (loadable module support)
|
||||
|
||||
CONFIG_MODULE_FORCE_LOAD (forced module loading)
|
||||
|
||||
CONFIG_MODULE_UNLOAD (module unloading)
|
||||
|
||||
CONFIG_MODULE_FORCE_UNLOAD (forced module loading)
|
||||
|
||||
CONFIG_CFG80211_WEXT (wireless extension compability)
|
||||
|
||||
CONFIG_MAC80211 (IEEE 802.11 Networking Stack)
|
||||
|
||||
|
||||
## Step 1- Do the following: After building the kernel stay inside that directory so the first line is irrelevant.
|
||||
|
||||
|
||||
Cd android kernel-sourcedirectory on your pc or laptop
|
||||
|
||||
mkdir ../kernel-headers (make kernel-headers directory outside kernel source)
|
||||
|
||||
make O=../kernel-headers someone_defconfig
|
||||
|
||||
make O=../kernel-headers modules_prepare (prepare module)
|
||||
|
||||
make O=../kernel-headers modules INSTALL_MOD_PATH=../kernel-headers (make modules)
|
||||
|
||||
make O=../kernel-headers modules_install INSTALL_MOD_PATH=../kernel-headers(install modules)
|
||||
|
||||
|
||||
|
||||
## Build Kernel Headers ( shown for armhf/arm only do changes for arm64)
|
||||
|
||||
make headers_install CROSS_COMPILE=$path-your-cross-compiler ARCH=arm SUBARCH=arm INSTALL_HDR_PATH=../kernel-headers (install kernel headers on the same directory ie “kernel-headers”)
|
||||
|
||||
-Note eg: CROSS_COMPILE= /home/user/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
|
||||
|
||||
|
||||
## Build RTL8188EUS driver/modules
|
||||
|
||||
```
|
||||
cd ../
|
||||
git clone -b v5.6.4.2 https://github.com/aircrack-ng/rtl8812au.git
|
||||
cd rtl8812au
|
||||
|
||||
|
||||
Now enter rtl8188eus directory using your file manager and edit the “makefile” as follows: for armhf
|
||||
|
||||
---------Platform Related (armhf/arm only for arm64 change respective line)------------
|
||||
|
||||
Line number 94-95
|
||||
|
||||
CONFIG_PLATFORM_I386_PC = n
|
||||
CONFIG_PLATFORM_ANDROID_ARM64 = n (for arm64 make this y)
|
||||
CONFIG_PLATFORM_ARM_RPI = y
|
||||
|
||||
------------------For ARM ToolChain use Hardware FLOATING line number 1056-1165-------------------
|
||||
(Again for armhf/arm do the following but for arm64 first find your respective section then do the
|
||||
editing.)
|
||||
|
||||
ifeq ($(CONFIG_PLATFORM_ARM_RPI), y)
|
||||
|
||||
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
|
||||
|
||||
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
|
||||
|
||||
ARCH ?= arm
|
||||
|
||||
CROSS_COMPILE ?=toolchain path (give urs)
|
||||
|
||||
KVER ?= 3.18.35-kali (give urs version /lib/modules/)
|
||||
|
||||
KSRC := fullpath not shown include it/kernel-headers/lib/modules/3.18.35-kali/build (give urs)
|
||||
|
||||
MODDESTDIR := fullpath not shown include it/3.18.35-kali/kernel/drivers/net/wireless/ (give urs)
|
||||
|
||||
INSTALL_PREFIX := leave as it is
|
||||
|
||||
Endif
|
||||
|
||||
## Step 4- from inside of rtl8812au directory
|
||||
|
||||
export ARCH=arm
|
||||
|
||||
Make
|
||||
|
||||
Done enjoy your 8812au.ko inside this same directory. Transfer it to your nethunter by reflashing
|
||||
kernel after including it inside /lib/modules/(uname -r)/.
|
||||
|
||||
## Load the driver (8812au.ko)
|
||||
```
|
||||
su
|
||||
cd /system/lib/modules
|
||||
insmod 8188eu.ko
|
||||
```
|
||||
ENJOY........
|
4
Makefile
4
Makefile
|
@ -7,9 +7,11 @@ EXTRA_CFLAGS += -Wno-unused-label
|
|||
EXTRA_CFLAGS += -Wno-unused-function
|
||||
EXTRA_CFLAGS += -Wno-implicit-fallthrough
|
||||
EXTRA_CFLAGS += -Wno-cast-function-type
|
||||
EXTRA_CFLAGS += -Wno-missing-declarations
|
||||
EXTRA_CFLAGS += -Wno-missing-prototypes
|
||||
#EXTRA_CFLAGS += -Wno-error=cast-function-type
|
||||
#EXTRA_CFLAGS += -Wno-parentheses-equality
|
||||
EXTRA_CFLAGS += -Wno-error=incompatible-pointer-types
|
||||
#EXTRA_CFLAGS += -Wno-error=incompatible-pointer-types
|
||||
EXTRA_CFLAGS += -Wno-stringop-overread
|
||||
#EXTRA_CFLAGS += -Wno-pointer-bool-conversion
|
||||
EXTRA_CFLAGS += -Wno-unknown-pragmas
|
||||
|
|
|
@ -5283,9 +5283,16 @@ exit:
|
|||
return ret;
|
||||
}
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0))
|
||||
static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev,
|
||||
struct cfg80211_ap_update *params)
|
||||
{
|
||||
struct cfg80211_beacon_data *info = ¶ms->beacon;
|
||||
#else
|
||||
static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev,
|
||||
struct cfg80211_beacon_data *info)
|
||||
{
|
||||
#endif
|
||||
int ret = 0;
|
||||
_adapter *adapter = (_adapter *)rtw_netdev_priv(ndev);
|
||||
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
#include <drv_types.h>
|
||||
#include <hal_data.h>
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 8, 0))
|
||||
#define strlcpy strscpy
|
||||
#endif
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DESCRIPTION("Realtek Wireless Lan Driver");
|
||||
MODULE_AUTHOR("Realtek Semiconductor Corp.");
|
||||
|
|
|
@ -270,7 +270,7 @@ struct rtw_usb_drv usb_drv = {
|
|||
.usbdrv.supports_autosuspend = 1,
|
||||
#endif
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0))
|
||||
.usbdrv.drvwrap.driver.shutdown = rtw_dev_shutdown,
|
||||
#else
|
||||
.usbdrv.driver.shutdown = rtw_dev_shutdown,
|
||||
|
|
Loading…
Reference in New Issue