Compare commits
2 Commits
kali/5.3.9
...
upstream/5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e82f2058a | ||
|
|
88c8fcfece |
4
Makefile
4
Makefile
@@ -10,10 +10,6 @@ EXTRA_CFLAGS += -Wno-unused
|
|||||||
EXTRA_CFLAGS += -Wno-vla
|
EXTRA_CFLAGS += -Wno-vla
|
||||||
EXTRA_CFLAGS += -Wno-date-time
|
EXTRA_CFLAGS += -Wno-date-time
|
||||||
|
|
||||||
REDHAT_VER := $(shell cut -f4 -d" " /etc/redhat-release |cut -d"." -f1,2 )
|
|
||||||
ifeq ($(REDHAT_VER), 7.9)
|
|
||||||
EXTRA_CFLAGS += -DRHEL79
|
|
||||||
endif
|
|
||||||
|
|
||||||
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)
|
||||||
|
|||||||
27
README.md
27
README.md
@@ -1,3 +1,24 @@
|
|||||||
|
If you are are taking "Learn Ethical Hacking From Scratch | Udemy" by Zaid Sabih and using Kali 2022 x64 Customized by zSecurity 1.0.7 and TP-Link TL-WN722N v2/v3 [Realtek RTL8188EUS], you might find this helpful. In the begining, I am able to enter monitor mode. However after a few days, I found out it doesn't allow to enter monitor mode. I think TP-Link TL-WN722N v2/v3 have automatically updated its driver. Then, I find a video from David Bombal (https://www.youtube.com/watch?v=tYnjMiTTdms) but still can't perfectly solve the issue. However, I find below steps work fine for me.
|
||||||
|
|
||||||
|
1. sudo apt update
|
||||||
|
2. sudo apt upgrade
|
||||||
|
3. sudo apt-get dist-upgrade
|
||||||
|
4. reboot
|
||||||
|
5. sudo apt-get install linux-headers-$(uname -r)
|
||||||
|
6. sudo apt install bc
|
||||||
|
7. sudo apt-get install build-essential
|
||||||
|
8. sudo apt-get install libelf-dev
|
||||||
|
10. sudo apt install dkms
|
||||||
|
11. sudo rmmod r8188eu.ko
|
||||||
|
12. git https://github.com/drygdryg/rtl8188eus (This works for me 😂)
|
||||||
|
13. cd rtl8188eus
|
||||||
|
14. sudo -i
|
||||||
|
15. echo 'blacklist r8188eu'|sudo tee -a '/etc/modprobe.d/realtek.conf'
|
||||||
|
16. reboot
|
||||||
|
17. cd rtl8188eus
|
||||||
|
18. sudo make && make install
|
||||||
|
19. reboot
|
||||||
|
|
||||||
Like https://github.com/cccooo/rtl8812au-centos-7.6, forked from aircrack-ng/rtl8188eus and modified for CentOS 7.9
|
Like https://github.com/cccooo/rtl8812au-centos-7.6, forked from aircrack-ng/rtl8188eus and modified for CentOS 7.9
|
||||||
as CentOS Kernel 3.10 contains many code from 4.x
|
as CentOS Kernel 3.10 contains many code from 4.x
|
||||||
|
|
||||||
@@ -27,8 +48,10 @@ as CentOS Kernel 3.10 contains many code from 4.x
|
|||||||
# Howto build/install
|
# Howto build/install
|
||||||
1. You will need to blacklist another driver in order to use this one.
|
1. You will need to blacklist another driver in order to use this one.
|
||||||
2. `echo 'blacklist r8188eu'|sudo tee -a '/etc/modprobe.d/realtek.conf'`
|
2. `echo 'blacklist r8188eu'|sudo tee -a '/etc/modprobe.d/realtek.conf'`
|
||||||
3. `make && sudo make install`
|
3. Reboot
|
||||||
4. Reboot in order to blacklist and load the new driver/module.
|
4. cd rtl8188eus
|
||||||
|
5. `make && sudo make install`
|
||||||
|
6. Reboot in order to blacklist and load the new driver/module.
|
||||||
|
|
||||||
# MONITOR MODE howto
|
# MONITOR MODE howto
|
||||||
Use these steps to enter monitor mode.
|
Use these steps to enter monitor mode.
|
||||||
|
|||||||
@@ -15,9 +15,12 @@
|
|||||||
#define _RTW_BR_EXT_C_
|
#define _RTW_BR_EXT_C_
|
||||||
|
|
||||||
#ifdef __KERNEL__
|
#ifdef __KERNEL__
|
||||||
|
#include <linux/version.h>
|
||||||
#include <linux/if_arp.h>
|
#include <linux/if_arp.h>
|
||||||
#include <net/ip.h>
|
#include <net/ip.h>
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
|
||||||
#include <net/ipx.h>
|
#include <net/ipx.h>
|
||||||
|
#endif
|
||||||
#include <linux/atalk.h>
|
#include <linux/atalk.h>
|
||||||
#include <linux/udp.h>
|
#include <linux/udp.h>
|
||||||
#include <linux/if_pppox.h>
|
#include <linux/if_pppox.h>
|
||||||
@@ -948,6 +951,7 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
|
||||||
/* IPX */
|
/* IPX */
|
||||||
if (ipx != NULL) {
|
if (ipx != NULL) {
|
||||||
switch (method) {
|
switch (method) {
|
||||||
@@ -1016,8 +1020,12 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* AARP */
|
/* AARP */
|
||||||
else if (ea != NULL) {
|
else if (ea != NULL) {
|
||||||
|
#else
|
||||||
|
if (ea != NULL) {
|
||||||
|
#endif
|
||||||
/* Sanity check fields. */
|
/* Sanity check fields. */
|
||||||
if (ea->hw_len != ETH_ALEN || ea->pa_len != AARP_PA_ALEN) {
|
if (ea->hw_len != ETH_ALEN || ea->pa_len != AARP_PA_ALEN) {
|
||||||
DEBUG_WARN("NAT25: Appletalk AARP Sanity check fail!\n");
|
DEBUG_WARN("NAT25: Appletalk AARP Sanity check fail!\n");
|
||||||
|
|||||||
@@ -1831,11 +1831,13 @@ void mgt_dispatcher(_adapter *padapter, union recv_frame *precv_frame)
|
|||||||
ptable->func = &OnAuth;
|
ptable->func = &OnAuth;
|
||||||
else
|
else
|
||||||
ptable->func = &OnAuthClient;
|
ptable->func = &OnAuthClient;
|
||||||
|
_mgt_dispatcher(padapter, ptable, precv_frame);
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)
|
||||||
__attribute__ ((fallthrough));
|
__attribute__ ((fallthrough));
|
||||||
#else
|
#else
|
||||||
__attribute__ ((__fallthrough__));
|
__attribute__ ((__fallthrough__));
|
||||||
#endif
|
#endif
|
||||||
|
break;
|
||||||
case WIFI_ASSOCREQ:
|
case WIFI_ASSOCREQ:
|
||||||
case WIFI_REASSOCREQ:
|
case WIFI_REASSOCREQ:
|
||||||
_mgt_dispatcher(padapter, ptable, precv_frame);
|
_mgt_dispatcher(padapter, ptable, precv_frame);
|
||||||
|
|||||||
5
debian/README.Debian
vendored
5
debian/README.Debian
vendored
@@ -1,5 +0,0 @@
|
|||||||
realtek-rtl8188eus-dkms for Debian
|
|
||||||
---------------------------------
|
|
||||||
|
|
||||||
This package was automatically generated by the DKMS system,
|
|
||||||
for distribution on Debian based operating systems.
|
|
||||||
64
debian/changelog
vendored
64
debian/changelog
vendored
@@ -1,64 +0,0 @@
|
|||||||
realtek-rtl8188eus-dkms (5.3.9~git20210504.6146193-0kali1) kali-dev; urgency=medium
|
|
||||||
|
|
||||||
* New upstream version 5.3.9~git20210504.6146193
|
|
||||||
* Refresh patches
|
|
||||||
|
|
||||||
-- Sophie Brun <sophie@offensive-security.com> Tue, 28 Sep 2021 11:00:05 +0200
|
|
||||||
|
|
||||||
realtek-rtl8188eus-dkms (5.3.9~git20210206.1e7145f-0kali2) kali-dev; urgency=medium
|
|
||||||
|
|
||||||
* Bump Standards-Version to 4.5.1
|
|
||||||
* Blacklist r8188eu
|
|
||||||
|
|
||||||
-- Sophie Brun <sophie@offensive-security.com> Tue, 13 Jul 2021 10:50:42 +0200
|
|
||||||
|
|
||||||
realtek-rtl8188eus-dkms (5.3.9~git20210206.1e7145f-0kali1) kali-dev; urgency=medium
|
|
||||||
|
|
||||||
* Update debian/watch
|
|
||||||
* New upstream version 5.3.9~git20210206.1e7145f
|
|
||||||
* Refresh patches
|
|
||||||
|
|
||||||
-- Sophie Brun <sophie@offensive-security.com> Wed, 14 Apr 2021 17:25:11 +0200
|
|
||||||
|
|
||||||
realtek-rtl8188eus-dkms (5.3.9~git20201227-0kali1) kali-dev; urgency=medium
|
|
||||||
|
|
||||||
* New upstream version 5.3.9~git20201227
|
|
||||||
* Refresh patches
|
|
||||||
|
|
||||||
-- Sophie Brun <sophie@offensive-security.com> Tue, 26 Jan 2021 17:04:18 +0100
|
|
||||||
|
|
||||||
realtek-rtl8188eus-dkms (5.3.9~git20200829-0kali2) kali-dev; urgency=medium
|
|
||||||
|
|
||||||
* Fix errors introduced in 5a7f22 (lintian-overrides)
|
|
||||||
|
|
||||||
-- Sophie Brun <sophie@offensive-security.com> Wed, 16 Sep 2020 15:54:13 +0200
|
|
||||||
|
|
||||||
realtek-rtl8188eus-dkms (5.3.9~git20200829-0kali1) kali-dev; urgency=medium
|
|
||||||
|
|
||||||
* New upstream version 5.3.9~git20200829
|
|
||||||
* Refresh patches
|
|
||||||
* Add comment in debian/copyright
|
|
||||||
* Bump Standards-Version to 4.5.0
|
|
||||||
* Add lintian-overrides for dh-exec-subst-unknown-variable
|
|
||||||
|
|
||||||
-- Sophie Brun <sophie@offensive-security.com> Wed, 16 Sep 2020 15:07:29 +0200
|
|
||||||
|
|
||||||
realtek-rtl8188eus-dkms (5.3.9~git20200710-0kali1) kali-dev; urgency=medium
|
|
||||||
|
|
||||||
* New upstream version 5.3.9~20200710
|
|
||||||
|
|
||||||
-- Sophie Brun <sophie@offensive-security.com> Fri, 10 Jul 2020 08:49:51 +0200
|
|
||||||
|
|
||||||
realtek-rtl8188eus-dkms (5.3.9~git20200316-0kali1) kali-dev; urgency=medium
|
|
||||||
|
|
||||||
* Configure git-buildpackage for Kali
|
|
||||||
* Add GitLab's CI configuration file
|
|
||||||
* New upstream version 5.3.9~git20200316
|
|
||||||
|
|
||||||
-- Sophie Brun <sophie@offensive-security.com> Thu, 14 May 2020 11:45:14 +0200
|
|
||||||
|
|
||||||
realtek-rtl8188eus-dkms (5.3.9~20191129-0kali1) kali-dev; urgency=medium
|
|
||||||
|
|
||||||
* Initial release (see 5842)
|
|
||||||
|
|
||||||
-- Sophie Brun <sophie@offensive-security.com> Tue, 17 Dec 2019 17:14:38 +0100
|
|
||||||
19
debian/control
vendored
19
debian/control
vendored
@@ -1,19 +0,0 @@
|
|||||||
Source: realtek-rtl8188eus-dkms
|
|
||||||
Section: contrib/kernel
|
|
||||||
Priority: optional
|
|
||||||
Maintainer: Kali Developers <devel@kali.org>
|
|
||||||
Uploaders: Sophie Brun <sophie@offensive-security.com>
|
|
||||||
Build-Depends: debhelper-compat (= 12), dkms, dh-exec
|
|
||||||
Standards-Version: 4.5.1
|
|
||||||
Homepage: https://github.com/aircrack-ng/rtl8188eus
|
|
||||||
Vcs-Browser: https://gitlab.com/kalilinux/packages/realtek-rtl8188eus-dkms
|
|
||||||
Vcs-Git: https://gitlab.com/kalilinux/packages/realtek-rtl8188eus-dkms.git
|
|
||||||
|
|
||||||
Package: realtek-rtl8188eus-dkms
|
|
||||||
Architecture: all
|
|
||||||
Depends: dkms (>= 1.95), ${misc:Depends}
|
|
||||||
Description: Realtek RTL8188EUS driver in DKMS format
|
|
||||||
This package provides the source code for RTL8188EUS Linux driver (with
|
|
||||||
monitor mode and frame injection) to be build with dkms. Kernel sources or
|
|
||||||
headers are required to compile this module.
|
|
||||||
|
|
||||||
34
debian/copyright
vendored
34
debian/copyright
vendored
@@ -1,34 +0,0 @@
|
|||||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
|
||||||
Upstream-Name: realtek-rtl8188eus-dkms
|
|
||||||
Source: https://github.com/aircrack-ng/rtl8188eus
|
|
||||||
Comment: dkms package built during installation
|
|
||||||
|
|
||||||
Files: *
|
|
||||||
Copyright: 2007 - 2017 Realtek Corporation.
|
|
||||||
License: GPL-2
|
|
||||||
|
|
||||||
Files: os_dep/linux/rhashtable.*
|
|
||||||
Copyright: 2015 Herbert Xu <herbert@gondor.apana.org.au>
|
|
||||||
2014-2015 Thomas Graf <tgraf@suug.ch>
|
|
||||||
2008-2014 Patrick McHardy <kaber@trash.net>
|
|
||||||
License: GPL-2
|
|
||||||
|
|
||||||
Files: debian/*
|
|
||||||
Copyright: 2019 Sophie Brun <sophie@offensive-security.com>
|
|
||||||
License: GPL-2
|
|
||||||
|
|
||||||
License: GPL-2
|
|
||||||
This package is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 as published
|
|
||||||
by the Free Software Foundation.
|
|
||||||
.
|
|
||||||
This package is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or 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, see <https://www.gnu.org/licenses/>
|
|
||||||
.
|
|
||||||
On Debian systems, the complete text of the GNU General
|
|
||||||
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
|
|
||||||
10
debian/gbp.conf
vendored
10
debian/gbp.conf
vendored
@@ -1,10 +0,0 @@
|
|||||||
[DEFAULT]
|
|
||||||
debian-branch = kali/master
|
|
||||||
debian-tag = kali/%(version)s
|
|
||||||
pristine-tar = True
|
|
||||||
|
|
||||||
[pq]
|
|
||||||
patch-numbers = False
|
|
||||||
|
|
||||||
[dch]
|
|
||||||
multimaint-merge = True
|
|
||||||
2
debian/kali-ci.yml
vendored
2
debian/kali-ci.yml
vendored
@@ -1,2 +0,0 @@
|
|||||||
include:
|
|
||||||
- https://gitlab.com/kalilinux/tools/kali-ci-pipeline/raw/master/recipes/kali.yml
|
|
||||||
20
debian/patches/Change-dkms-version.patch
vendored
20
debian/patches/Change-dkms-version.patch
vendored
@@ -1,20 +0,0 @@
|
|||||||
From: Sophie Brun <sophie@offensive-security.com>
|
|
||||||
Date: Fri, 10 Jul 2020 08:49:31 +0200
|
|
||||||
Subject: Change dkms version
|
|
||||||
|
|
||||||
Forwarded: not-needed
|
|
||||||
---
|
|
||||||
dkms.conf | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/dkms.conf b/dkms.conf
|
|
||||||
index 1c14127..bc56f1e 100644
|
|
||||||
--- a/dkms.conf
|
|
||||||
+++ b/dkms.conf
|
|
||||||
@@ -1,5 +1,5 @@
|
|
||||||
PACKAGE_NAME="realtek-rtl8188eus"
|
|
||||||
-PACKAGE_VERSION="5.3.9~20200316"
|
|
||||||
+PACKAGE_VERSION="5.3.9~git20210504.6146193"
|
|
||||||
CLEAN="'make' clean"
|
|
||||||
BUILT_MODULE_NAME[0]=8188eu
|
|
||||||
PROCS_NUM=`nproc`
|
|
||||||
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@@ -1 +0,0 @@
|
|||||||
Change-dkms-version.patch
|
|
||||||
2
debian/r8188eus-dkms.conf
vendored
2
debian/r8188eus-dkms.conf
vendored
@@ -1,2 +0,0 @@
|
|||||||
# blacklist the driver
|
|
||||||
blacklist r8188eu
|
|
||||||
1
debian/realtek-rtl8188eus-dkms.docs
vendored
1
debian/realtek-rtl8188eus-dkms.docs
vendored
@@ -1 +0,0 @@
|
|||||||
README.md
|
|
||||||
3
debian/realtek-rtl8188eus-dkms.install
vendored
3
debian/realtek-rtl8188eus-dkms.install
vendored
@@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/dh-exec
|
|
||||||
core hal include Kconfig Makefile os_dep platform usr/src/realtek-rtl8188eus-${DEB_VERSION_UPSTREAM}
|
|
||||||
debian/r8188eus-dkms.conf etc/modprobe.d
|
|
||||||
21
debian/rules
vendored
21
debian/rules
vendored
@@ -1,21 +0,0 @@
|
|||||||
#!/usr/bin/make -f
|
|
||||||
#export DH_VERBOSE = 1
|
|
||||||
|
|
||||||
include /usr/share/dpkg/pkg-info.mk
|
|
||||||
export DEB_VERSION_UPSTREAM
|
|
||||||
|
|
||||||
%:
|
|
||||||
dh $@ --with dkms
|
|
||||||
|
|
||||||
override_dh_dkms:
|
|
||||||
dh_dkms -V $(DEB_VERSION_UPSTREAM) -- dkms.conf
|
|
||||||
|
|
||||||
override_dh_fixperms:
|
|
||||||
dh_fixperms
|
|
||||||
find debian/realtek-rtl8188eus-dkms/usr/src -type f -exec chmod -x {} \;
|
|
||||||
|
|
||||||
# Nothing to configure, build or auto-install (all is done after
|
|
||||||
# installation using dkms)
|
|
||||||
override_dh_auto_configure:
|
|
||||||
override_dh_auto_build:
|
|
||||||
override_dh_auto_install:
|
|
||||||
22
debian/script-targz
vendored
22
debian/script-targz
vendored
@@ -1,22 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
if [ "$1" = '--upstream-version' ]; then
|
|
||||||
new_version="$2"
|
|
||||||
else
|
|
||||||
printf "Missing --upstream-version argument" 1>&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
DEB_SOURCE="$(dpkg-parsechangelog -SSource)"
|
|
||||||
|
|
||||||
default_branch="$(git remote show https://github.com/aircrack-ng/rtl8188eus.git | grep 'HEAD' | sed 's/.*: v//')"
|
|
||||||
|
|
||||||
version="$(echo ${new_version} | sed 's/~git.*//')"
|
|
||||||
|
|
||||||
# fails if the upstream default branch has changed and is no longer the
|
|
||||||
# version mentioned in debian/watch
|
|
||||||
if [ "${default_branch}" != "${version}" ]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
1
debian/source/format
vendored
1
debian/source/format
vendored
@@ -1 +0,0 @@
|
|||||||
3.0 (quilt)
|
|
||||||
2
debian/source/lintian-overrides
vendored
2
debian/source/lintian-overrides
vendored
@@ -1,2 +0,0 @@
|
|||||||
#we export the variable provided by /usr/share/dpkg/pkg-info.mk
|
|
||||||
realtek-rtl8188eus-dkms source: dh-exec-subst-unknown-variable debian/realtek-rtl8188eus-dkms.install DEB_VERSION_UPSTREAM
|
|
||||||
9
debian/watch
vendored
9
debian/watch
vendored
@@ -1,9 +0,0 @@
|
|||||||
version=4
|
|
||||||
opts="mode=git, pretty=5.3.9~git%cd.%h, pgpmode=none" \
|
|
||||||
https://github.com/aircrack-ng/rtl8188eus.git \
|
|
||||||
HEAD debian debian/script-targz
|
|
||||||
|
|
||||||
# Use the following when upstream starts to tag releases:
|
|
||||||
#opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%realtek-rtl8188eus-dkms-$1.tar.gz%" \
|
|
||||||
# https://github.com/aircrack-ng/rtl8188eus/tags \
|
|
||||||
# (?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate
|
|
||||||
@@ -1529,6 +1529,7 @@ enum ieee80211_state {
|
|||||||
(((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \
|
(((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \
|
||||||
(((Addr[5]) & 0xff) == 0xff))
|
(((Addr[5]) & 0xff) == 0xff))
|
||||||
#else
|
#else
|
||||||
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 00))
|
||||||
extern __inline int is_multicast_mac_addr(const u8 *addr)
|
extern __inline int is_multicast_mac_addr(const u8 *addr)
|
||||||
{
|
{
|
||||||
return (addr[0] != 0xff) && (0x01 & addr[0]);
|
return (addr[0] != 0xff) && (0x01 & addr[0]);
|
||||||
@@ -1545,6 +1546,24 @@ extern __inline int is_zero_mac_addr(const u8 *addr)
|
|||||||
return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \
|
return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \
|
||||||
(addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00));
|
(addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00));
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
static __inline int is_multicast_mac_addr(const u8 *addr)
|
||||||
|
{
|
||||||
|
return (addr[0] != 0xff) && (0x01 & addr[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline int is_broadcast_mac_addr(const u8 *addr)
|
||||||
|
{
|
||||||
|
return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \
|
||||||
|
(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline int is_zero_mac_addr(const u8 *addr)
|
||||||
|
{
|
||||||
|
return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \
|
||||||
|
(addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00));
|
||||||
|
}
|
||||||
|
#endif /* LINUX_VERSION_CODE */
|
||||||
#endif /* PLATFORM_FREEBSD */
|
#endif /* PLATFORM_FREEBSD */
|
||||||
|
|
||||||
#define CFG_IEEE80211_RESERVE_FCS (1<<0)
|
#define CFG_IEEE80211_RESERVE_FCS (1<<0)
|
||||||
|
|||||||
@@ -1199,7 +1199,11 @@ static int rtw_net_set_mac_address(struct net_device *pnetdev, void *addr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memcpy(adapter_mac_addr(padapter), sa->sa_data, ETH_ALEN); /* set mac addr to adapter */
|
_rtw_memcpy(adapter_mac_addr(padapter), sa->sa_data, ETH_ALEN); /* set mac addr to adapter */
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
|
||||||
|
eth_hw_addr_set(pnetdev, sa->sa_data);
|
||||||
|
#else
|
||||||
_rtw_memcpy(pnetdev->dev_addr, sa->sa_data, ETH_ALEN); /* set mac addr to net_device */
|
_rtw_memcpy(pnetdev->dev_addr, sa->sa_data, ETH_ALEN); /* set mac addr to net_device */
|
||||||
|
#endif
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if (rtw_is_hw_init_completed(padapter)) {
|
if (rtw_is_hw_init_completed(padapter)) {
|
||||||
@@ -1628,7 +1632,11 @@ int rtw_os_ndev_register(_adapter *adapter, const char *name)
|
|||||||
/* alloc netdev name */
|
/* alloc netdev name */
|
||||||
rtw_init_netdev_name(ndev, name);
|
rtw_init_netdev_name(ndev, name);
|
||||||
|
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
|
||||||
|
eth_hw_addr_set(ndev, adapter_mac_addr(adapter));
|
||||||
|
#else
|
||||||
_rtw_memcpy(ndev->dev_addr, adapter_mac_addr(adapter), ETH_ALEN);
|
_rtw_memcpy(ndev->dev_addr, adapter_mac_addr(adapter), ETH_ALEN);
|
||||||
|
#endif
|
||||||
#if defined(CONFIG_NET_NS)
|
#if defined(CONFIG_NET_NS)
|
||||||
dev_net_set(ndev, wiphy_net(adapter_to_wiphy(adapter)));
|
dev_net_set(ndev, wiphy_net(adapter_to_wiphy(adapter)));
|
||||||
#endif //defined(CONFIG_NET_NS)
|
#endif //defined(CONFIG_NET_NS)
|
||||||
|
|||||||
@@ -45,6 +45,10 @@ inline struct proc_dir_entry *get_rtw_drv_proc(void)
|
|||||||
#define get_proc_net init_net.proc_net
|
#define get_proc_net init_net.proc_net
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if(LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
|
||||||
|
#define PDE_DATA(inode) pde_data(inode)
|
||||||
|
#endif
|
||||||
|
|
||||||
inline struct proc_dir_entry *rtw_proc_create_dir(const char *name, struct proc_dir_entry *parent, void *data)
|
inline struct proc_dir_entry *rtw_proc_create_dir(const char *name, struct proc_dir_entry *parent, void *data)
|
||||||
{
|
{
|
||||||
struct proc_dir_entry *entry;
|
struct proc_dir_entry *entry;
|
||||||
|
|||||||
@@ -160,6 +160,7 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
|
|||||||
{USB_DEVICE(0x2001, 0x3311), .driver_info = RTL8188E}, /* DLink GO-USB-N150 REV B1 */
|
{USB_DEVICE(0x2001, 0x3311), .driver_info = RTL8188E}, /* DLink GO-USB-N150 REV B1 */
|
||||||
{USB_DEVICE(0x2001, 0x331B), .driver_info = RTL8188E}, /* DLink DWA-121 REV B1 */
|
{USB_DEVICE(0x2001, 0x331B), .driver_info = RTL8188E}, /* DLink DWA-121 REV B1 */
|
||||||
{USB_DEVICE(0x056E, 0x4008), .driver_info = RTL8188E}, /* Elecom WDC-150SU2M */
|
{USB_DEVICE(0x056E, 0x4008), .driver_info = RTL8188E}, /* Elecom WDC-150SU2M */
|
||||||
|
{USB_DEVICE(0x7392, 0xB811), .driver_info = RTL8188E}, /* Edimax EW-7811UN v2 */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RTL8812A
|
#ifdef CONFIG_RTL8812A
|
||||||
|
|||||||
@@ -1268,8 +1268,12 @@ u32 _rtw_down_sema(_sema *sema)
|
|||||||
inline void thread_exit(_completion *comp)
|
inline void thread_exit(_completion *comp)
|
||||||
{
|
{
|
||||||
#ifdef PLATFORM_LINUX
|
#ifdef PLATFORM_LINUX
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
|
||||||
|
kthread_complete_and_exit(comp, 0);
|
||||||
|
#else
|
||||||
complete_and_exit(comp, 0);
|
complete_and_exit(comp, 0);
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef PLATFORM_FREEBSD
|
#ifdef PLATFORM_FREEBSD
|
||||||
printf("%s", "RTKTHREAD_exit");
|
printf("%s", "RTKTHREAD_exit");
|
||||||
|
|||||||
Reference in New Issue
Block a user