mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2024-11-26 15:14:02 +00:00
Compare commits
8 Commits
eee82ac140
...
fe71d83686
Author | SHA1 | Date | |
---|---|---|---|
|
fe71d83686 | ||
|
9d5c4aac62 | ||
|
a429fe18a1 | ||
|
f6184e3cb0 | ||
|
91db7d2220 | ||
|
42a0c86d1a | ||
|
0445b2ba0a | ||
|
0417a2c5a5 |
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -9,7 +9,7 @@ jobs:
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Avoid 0x0BDA
|
||||
#Find devices that not use 0x0BDA instead of const USB_VENDOR_ID_REALTEK
|
||||
run: grep -c -i "0x0BDA" os_dep/linux/usb_intf.c | grep -w 1
|
||||
@ -58,6 +58,6 @@ jobs:
|
||||
run: |
|
||||
sudo apt-get install linux-headers-$(uname -r)
|
||||
echo "KVER=${{matrix.version }}" >> $GITHUB_ENV
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: build
|
||||
run: make KVER=$KVER
|
||||
|
92
.github/workflows/raspberry.yml
vendored
92
.github/workflows/raspberry.yml
vendored
@ -14,87 +14,75 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt update > /dev/null
|
||||
sudo apt install -y wget gnupg2 > /dev/null
|
||||
sudo apt-get -y install qemu-system-arm qemu-user-static binfmt-support > /dev/null
|
||||
sudo apt install -y gcc-arm-linux-gnueabihf crossbuild-essential-arm64 make > /dev/null
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y curl gnupg2 curl
|
||||
sudo apt-get install -y gcc-arm-linux-gnueabihf crossbuild-essential-arm64 make
|
||||
sudo curl -fsSL http://archive.raspberrypi.org/debian/raspberrypi.gpg.key --output /usr/share/keyrings/raspberrypi.gpg.key
|
||||
echo "deb [arch=amd64, signed-by=/usr/share/keyrings/raspberrypi.gpg.key] http://archive.raspberrypi.org/debian/ bullseye main" | sudo tee /etc/apt/sources.list.d/raspberrypi.list > /dev/null
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y raspberrypi-kernel-headers
|
||||
- name: Build Pi kernel drivers
|
||||
id: build_raspberry
|
||||
run: |
|
||||
echo "deb http://archive.raspberrypi.org/debian/ bullseye main" | sudo tee /etc/apt/sources.list.d/raspbian.list
|
||||
wget -O - http://archive.raspberrypi.org/debian/raspberrypi.gpg.key | sudo apt-key add -
|
||||
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
|
||||
for arch in "armhf" "arm64"; do
|
||||
echo "Adding arch" "$arch"
|
||||
sudo dpkg --add-architecture "$arch" > /dev/null
|
||||
sudo apt update > /dev/null || true
|
||||
sudo apt download -y raspberrypi-kernel-headers:"$arch" > /dev/null
|
||||
sudo dpkg --force-all -i raspberrypi-kernel-headers* > /dev/null
|
||||
sudo rm -f raspberrypi-kernel-headers*.deb
|
||||
if [ "$arch" = "arm64" ]; then
|
||||
for kernel_folder in /lib/modules/*+; do
|
||||
kver=`basename "$kernel_folder"`
|
||||
if [[ $kver =~ "v8" ]]; then
|
||||
target_arch="arm64"
|
||||
cross="aarch64-linux-gnu-"
|
||||
sudo ln -fs /usr/aarch64-linux-gnu/lib/libc.so.6 /lib/libc.so.6
|
||||
sudo ln -fs /usr/aarch64-linux-gnu/lib/ld-linux-aarch64.so.1 /lib/ld-linux-aarch64.so.1
|
||||
else
|
||||
target_arch="arm"
|
||||
cross="arm-linux-gnueabihf-"
|
||||
sudo ln -fs /usr/arm-linux-gnueabihf/lib/libc.so.6 /lib/libc.so.6
|
||||
sudo ln -fs /usr/arm-linux-gnueabihf/lib/ld-linux-armhf.so.3 /lib/ld-linux-armhf.so.3
|
||||
sudo ln -fs /usr/arm-linux-gnueabihf/lib/ld-linux.so.3 /lib/ld-linux.so.3
|
||||
fi
|
||||
for kernel_folder in /lib/modules/*+; do
|
||||
kver=`basename "$kernel_folder"`
|
||||
echo "Cross compiling" "$kver" "for arch" "$target_arch"
|
||||
sed -i '1156s/ARCH ?=.*/ARCH ?= '$target_arch'/g' Makefile
|
||||
sed -i '1157s/CROSS_COMPILE ?=.*/CROSS_COMPILE ?= '$cross'/g' Makefile
|
||||
sed -i '1158s/KVER ?=.*/KVER ?= '$kver'/g' Makefile
|
||||
make clean > log.txt
|
||||
make -j$(nproc) > log.txt && mkdir -p build/raspberrypi/$kver/ && cp 88XXau.ko build/raspberrypi/$kver/
|
||||
echo ::set-output name=kernel_ver::"$(echo $kver | cut -f 1 -d -)"
|
||||
done
|
||||
sudo apt purge -y raspberrypi-kernel-headers:"$arch" > /dev/null
|
||||
echo "Cross compiling" "$kver" "for arch" "$target_arch"
|
||||
make clean > log.txt
|
||||
make ARCH=$target_arch CROSS_COMPILE=$cross KVER=$kver -j$(nproc) > log.txt && mkdir -p build/raspberrypi/$kver/ && cp 88XXau.ko build/raspberrypi/$kver/
|
||||
echo kernel_ver="$(echo $kver | cut -f 1 -d -)" >> $GITHUB_OUTPUT
|
||||
done
|
||||
- name: Build Re4son kernel drivers
|
||||
id: build_kali
|
||||
run: |
|
||||
echo "deb http://http.re4son-kernel.com/re4son/ kali-pi main" | sudo tee /etc/apt/sources.list.d/re4son.list
|
||||
wget -O - https://re4son-kernel.com/keys/http/archive-key.asc | sudo apt-key add -
|
||||
sudo apt-get -y install qemu-system-arm qemu-user-static binfmt-support > /dev/null
|
||||
curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x96d00b0c4b00fd5360cc087711764ee8ac24832f" | sudo gpg --dearmor -o /usr/share/keyrings/kali.gpg
|
||||
echo "deb [arch=armel,armhf,arm64 signed-by=/usr/share/keyrings/kali.gpg] http://http.re4son-kernel.com/re4son/ kali-pi main" | sudo tee /etc/apt/sources.list.d/kali.list
|
||||
sudo sed -i 's/deb http/deb [arch=amd64] http/g' /etc/apt/sources.list
|
||||
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
|
||||
for arch in "armel" "armhf" "arm64"; do
|
||||
echo "Adding arch" "$arch"
|
||||
sudo dpkg --add-architecture "$arch" > /dev/null
|
||||
sudo apt update > /dev/null || true
|
||||
sudo apt install -y kalipi-kernel-headers:"$arch" > /dev/null
|
||||
if [ "$arch" = "arm64" ]; then
|
||||
target_arch="arm64"
|
||||
cross="aarch64-linux-gnu-"
|
||||
sudo ln -fs /usr/aarch64-linux-gnu/lib/libc.so.6 /lib/libc.so.6
|
||||
sudo ln -fs /usr/aarch64-linux-gnu/lib/ld-linux-aarch64.so.1 /lib/ld-linux-aarch64.so.1
|
||||
else
|
||||
target_arch="arm"
|
||||
cross="arm-linux-gnueabihf-"
|
||||
sudo ln -fs /usr/arm-linux-gnueabihf/lib/libc.so.6 /lib/libc.so.6
|
||||
sudo ln -fs /usr/arm-linux-gnueabihf/lib/ld-linux-armhf.so.3 /lib/ld-linux-armhf.so.3
|
||||
sudo ln -fs /usr/arm-linux-gnueabihf/lib/ld-linux.so.3 /lib/ld-linux.so.3
|
||||
fi
|
||||
sudo dpkg --add-architecture "$arch"
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y kalipi-kernel-headers:"$arch"
|
||||
for kernel_folder in /lib/modules/*Re4son*; do
|
||||
kver=`basename "$kernel_folder"`
|
||||
if [[ $kver =~ "v8" ]]; then
|
||||
target_arch="arm64"
|
||||
cross="aarch64-linux-gnu-"
|
||||
sudo ln -fs /usr/aarch64-linux-gnu/lib/libc.so.6 /lib/libc.so.6
|
||||
sudo ln -fs /usr/aarch64-linux-gnu/lib/ld-linux-aarch64.so.1 /lib/ld-linux-aarch64.so.1
|
||||
else
|
||||
target_arch="arm"
|
||||
cross="arm-linux-gnueabihf-"
|
||||
sudo ln -fs /usr/arm-linux-gnueabihf/lib/libc.so.6 /lib/libc.so.6
|
||||
sudo ln -fs /usr/arm-linux-gnueabihf/lib/ld-linux-armhf.so.3 /lib/ld-linux-armhf.so.3
|
||||
sudo ln -fs /usr/arm-linux-gnueabihf/lib/ld-linux.so.3 /lib/ld-linux.so.3
|
||||
fi
|
||||
echo "Cross compiling" "$kver" "for arch" "$target_arch"
|
||||
sed -i '1156s/ARCH ?=.*/ARCH ?= '$target_arch'/g' Makefile
|
||||
sed -i '1157s/CROSS_COMPILE ?=.*/CROSS_COMPILE ?= '$cross'/g' Makefile
|
||||
sed -i '1158s/KVER ?=.*/KVER ?= '$kver'/g' Makefile
|
||||
make clean > log.txt
|
||||
make -j$(nproc) > log.txt && mkdir -p build/kalipi/$kver/ && cp 88XXau.ko build/kalipi/$kver/
|
||||
echo ::set-output name=kernel_ver::"$(echo $kver | cut -f 1 -d -)"
|
||||
make ARCH=$target_arch CROSS_COMPILE=$cross KVER=$kver -j$(nproc) > log.txt && mkdir -p build/kalipi/$kver/ && cp 88XXau.ko build/kalipi/$kver/
|
||||
echo kernel_ver="$(echo $kver | cut -f 1 -d -)" >> $GITHUB_OUTPUT
|
||||
done
|
||||
done
|
||||
- name: Compress artifacts
|
||||
run: |
|
||||
tar czvf rtl8812au-kalipi-${{ steps.build_kali.outputs.kernel_ver }}.tar.gz -C build/kalipi/ .
|
||||
tar czvf rtl8812au-raspberrypi-${{ steps.build_raspberry.outputs.kernel_ver }}.tar.gz -C build/raspberrypi/ .
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: RPi kernel drivers
|
||||
path: rtl8812au*.tar.gz
|
||||
- name: Publish release
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
|
@ -137,7 +137,9 @@ static __inline__ int __nat25_add_pppoe_tag(struct sk_buff *skb, struct pppoe_ta
|
||||
/* have a room for new tag */
|
||||
memmove(((unsigned char *)ph->tag + data_len), (unsigned char *)ph->tag, ntohs(ph->length));
|
||||
ph->length = htons(ntohs(ph->length) + data_len);
|
||||
#pragma GCC diagnostic ignored "-Wstringop-overread"
|
||||
memcpy((unsigned char *)ph->tag, tag, data_len);
|
||||
#pragma GCC diagnostic pop
|
||||
return data_len;
|
||||
}
|
||||
|
||||
|
@ -1156,7 +1156,8 @@ check_bss:
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0))
|
||||
roam_info.links[0].bssid = cur_network->network.MacAddress;
|
||||
roam_info.links[0].channel = notify_channel;
|
||||
roam_info.links[0].bssid = cur_network->network.MacAddress;
|
||||
#else
|
||||
roam_info.bssid = cur_network->network.MacAddress;
|
||||
#endif
|
||||
@ -1190,13 +1191,17 @@ check_bss:
|
||||
RTW_INFO("pwdev->sme_state(b)=%d\n", pwdev->sme_state);
|
||||
#endif
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_MONITOR_STATE) != _TRUE)
|
||||
rtw_cfg80211_connect_result(pwdev, cur_network->network.MacAddress
|
||||
, pmlmepriv->assoc_req + sizeof(struct rtw_ieee80211_hdr_3addr) + 2
|
||||
, pmlmepriv->assoc_req_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 2
|
||||
, pmlmepriv->assoc_rsp + sizeof(struct rtw_ieee80211_hdr_3addr) + 6
|
||||
, pmlmepriv->assoc_rsp_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 6
|
||||
, WLAN_STATUS_SUCCESS, GFP_ATOMIC);
|
||||
if (check_fwstate(pmlmepriv, WIFI_MONITOR_STATE) != _TRUE) {
|
||||
struct cfg80211_bss *bss;
|
||||
bss = cfg80211_get_bss(pwdev->wiphy, NULL, cur_network->network.MacAddress, NULL, 0,
|
||||
IEEE80211_BSS_TYPE_ANY, IEEE80211_PRIVACY_ANY);
|
||||
cfg80211_connect_bss(wdev_to_ndev(pwdev), cur_network->network.MacAddress, bss
|
||||
, pmlmepriv->assoc_req + sizeof(struct rtw_ieee80211_hdr_3addr) + 2
|
||||
, pmlmepriv->assoc_req_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 2
|
||||
, pmlmepriv->assoc_rsp + sizeof(struct rtw_ieee80211_hdr_3addr) + 6
|
||||
, pmlmepriv->assoc_rsp_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 6
|
||||
, WLAN_STATUS_SUCCESS, GFP_ATOMIC, NL80211_TIMEOUT_UNSPECIFIED);
|
||||
}
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) || defined(COMPAT_KERNEL_RELEASE)
|
||||
RTW_INFO("pwdev->sme_state(a)=%d\n", pwdev->sme_state);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user