Compare commits

...

4 Commits

Author SHA1 Message Date
Sophie Brun
9185277f38 Prepare for Release 2022-06-21 12:21:06 +02:00
Sophie Brun
dffa09bda6 Add a patch to fix the build with kernel 5.18 2022-06-21 12:19:40 +02:00
Sophie Brun
ca3597e27f Refresh patch 2022-06-21 12:19:30 +02:00
Sophie Brun
4d3330bc88 Remove useless patch (we change version in debian/rules) 2022-06-21 12:08:35 +02:00
6 changed files with 63 additions and 26 deletions

8
debian/changelog vendored
View File

@@ -1,3 +1,11 @@
realtek-rtl8188eus-dkms (5.3.9~git20220319.0958f29-0kali3) kali-dev; urgency=medium
* Remove useless patch (we change version in debian/rules)
* Refresh patch
* Add a patch to fix the build with kernel 5.18
-- Sophie Brun <sophie@offensive-security.com> Tue, 21 Jun 2022 12:20:45 +0200
realtek-rtl8188eus-dkms (5.3.9~git20220319.0958f29-0kali2) kali-dev; urgency=medium
* Add a patch to fix build build with kernel 5.17

View File

@@ -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..1708d4c 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~git20220319.0958f29"
CLEAN="'make' clean"
BUILT_MODULE_NAME[0]=8188eu
PROCS_NUM=`nproc`

View File

@@ -0,0 +1,37 @@
From: Sophie Brun <sophie@offensive-security.com>
Date: Tue, 21 Jun 2022 12:15:03 +0200
Subject: Fix build for linux kernel >= 5.17
Origin: https://github.com/aircrack-ng/rtl8188eus/commit/0f1905259ec9b85fd1453be3abd322ff543e12bc
---
include/ieee80211.h | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/include/ieee80211.h b/include/ieee80211.h
index 5ba92b5..ace221c 100644
--- a/include/ieee80211.h
+++ b/include/ieee80211.h
@@ -1529,18 +1529,20 @@ enum ieee80211_state {
(((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \
(((Addr[5]) & 0xff) == 0xff))
#else
-extern __inline int is_multicast_mac_addr(const u8 *addr)
+
+// I don't know what happened. I think the compiler just got crazy after kernel 5.18+. Normally it have a 'extern' at the beginning.
+__inline int is_multicast_mac_addr(const u8 *addr)
{
return (addr[0] != 0xff) && (0x01 & addr[0]);
}
-extern __inline int is_broadcast_mac_addr(const u8 *addr)
+__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));
}
-extern __inline int is_zero_mac_addr(const u8 *addr)
+__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));

View File

@@ -2,13 +2,12 @@ From: Sophie Brun <sophie@offensive-security.com>
Date: Wed, 18 May 2022 17:47:55 +0200
Subject: Build support with kernel v5.17
Origin: https://github.com/aircrack-ng/rtl8188eus/commit/13cc38399eb44f234a52dde5f94509e54a09c71f
---
os_dep/linux/os_intfs.c | 8 ++++++++
os_dep/linux/rtw_proc.c | 4 ++++
os_dep/linux/rtw_proc.c | 8 ++++++++
os_dep/osdep_service.c | 4 ++++
3 files changed, 16 insertions(+)
3 files changed, 20 insertions(+)
diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c
index bd7da8b..f006fc8 100644
@@ -39,10 +38,20 @@ index bd7da8b..f006fc8 100644
dev_net_set(ndev, wiphy_net(adapter_to_wiphy(adapter)));
#endif //defined(CONFIG_NET_NS)
diff --git a/os_dep/linux/rtw_proc.c b/os_dep/linux/rtw_proc.c
index 8a0fd3e..8b1a424 100644
index 8a0fd3e..9bd4041 100644
--- a/os_dep/linux/rtw_proc.c
+++ b/os_dep/linux/rtw_proc.c
@@ -45,6 +45,10 @@ inline struct proc_dir_entry *get_rtw_drv_proc(void)
@@ -39,12 +39,20 @@ inline struct proc_dir_entry *get_rtw_drv_proc(void)
#define proc_get_parent_data(inode) PDE((inode))->parent->data
#endif
+#if(LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
+#define PDE_DATA(inode) pde_data(inode)
+#endif
+
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24))
#define get_proc_net proc_net
#else
#define get_proc_net init_net.proc_net
#endif

View File

@@ -1,2 +1,2 @@
Change-dkms-version.patch
add-support-kernel-5.17.patch
Fix-build-for-linux-kernel-5.17.patch

3
debian/rules vendored
View File

@@ -15,6 +15,9 @@ override_dh_fixperms:
dh_fixperms
find debian/realtek-rtl8188eus-dkms/usr/src -type f -exec chmod -x {} \;
execute_after_dh_install:
sed -i dkms.conf -e 's%^PACKAGE_VERSION=.*%PACKAGE_VERSION="$(DEB_VERSION_UPSTREAM)"%'
# Nothing to configure, build or auto-install (all is done after
# installation using dkms)
override_dh_auto_configure: