You are not logged in.

#1 2022-09-15 19:17:22

avasam
Member
Registered: 2020-01-26
Posts: 72
Website

wifi driver installation error in linux kernel related to linux-lts

I installed two kernels in my Arch : linux and linux-lts .
When I boot with linux kernel and i'm going to install the Wi-Fi driver It gives me an error like this:

 
Error! Module version v5.2.2.4_25483.20171222 for 8188eu.ko.zst
is not newer than what is already found in kernel 5.15.67-1-lts (v5.3.9_28540.20180627).
You may override by specifying --force.

 

I did not boot with Linux-lts , Why does the driver installed on linux-lts affect on linux kernel ?
It was not fixed even by remowing linux-lts

And now i wanna to install 8188eu-aircrack-dkms-git package it gives me an error like this :

Reversed (or previously applied) patch detected!  Assume -R? [n] 
Apply anyway? [n] 
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file os_dep/osdep_service.c.rej
==> ERROR: A failure occurred in prepare().
    Aborting...
 -> error making: 8188eu-aircrack-dkms-git

Last edited by avasam (2022-09-15 19:23:51)

Offline

#2 2022-09-15 19:50:40

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,485

Re: wifi driver installation error in linux kernel related to linux-lts

r8188eu is in all current kernels and the second build fails on applying a patch (because likely the sources are too dated)
What problem do you actually want to solve?

Offline

#3 2022-09-15 19:55:39

avasam
Member
Registered: 2020-01-26
Posts: 72
Website

Re: wifi driver installation error in linux kernel related to linux-lts

seth wrote:

r8188eu is in all current kernels and the second build fails on applying a patch (because likely the sources are too dated)
What problem do you actually want to solve?

The default driver in kernel does not activate monitor mode.i want to install the special driver for Airmon-ng : https://github.com/aircrack-ng/rtl8188eus.
i blacklisted the default driver by :

echo 'blacklist r8188eu'|sudo tee -a '/etc/modprobe.d/realtek.conf'

NOTE : I previously installed this driver when i was in linux-lts but now I can't install in linux kernel

Last edited by avasam (2022-09-15 20:03:03)

Offline

#4 2022-09-15 20:03:05

loqs
Member
Registered: 2014-03-06
Posts: 18,964

Re: wifi driver installation error in linux kernel related to linux-lts

https://github.com/aircrack-ng/rtl8188eus is not compatible with 5.19
Edit:
Note https://github.com/aircrack-ng/rtl8188eus/pull/200 will not work for 5.19 or 5.19.1 but will work 5.19.2 despite linking to https://github.com/aircrack-ng/rtl8812au/pull/992 which checks against 5.19.2 correctly the author changed it to check incorrectly for 5.19.0.

Last edited by loqs (2022-09-15 20:08:03)

Offline

#5 2022-09-15 20:09:21

avasam
Member
Registered: 2020-01-26
Posts: 72
Website

Re: wifi driver installation error in linux kernel related to linux-lts

loqs wrote:

https://github.com/aircrack-ng/rtl8188eus is not compatible with 5.19

So I have to install on 5.15.67-1-lts.
But the next problem is that when i was in linux-lts version 5.15 :
- i remove installed drivers for this device
- i try installing this package from aur : 8188eu-aircrack-dkms-git
- error is :

==> Starting prepare()...
patching file os_dep/linux/os_intfs.c
Reversed (or previously applied) patch detected!  Assume -R? [n] 
Apply anyway? [n] 
Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file os_dep/linux/os_intfs.c.rej
patching file os_dep/linux/rtw_proc.c
Reversed (or previously applied) patch detected!  Assume -R? [n] 
Apply anyway? [n] 
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file os_dep/linux/rtw_proc.c.rej
patching file os_dep/osdep_service.c
Reversed (or previously applied) patch detected!  Assume -R? [n] 
Apply anyway? [n] 
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file os_dep/osdep_service.c.rej
==> ERROR: A failure occurred in prepare().
    Aborting...
 -> error making: 8188eu-aircrack-dkms-git

EDIT : By restarting the system, the problem was solved and this package was installed, of course, on the LTS kernel : 5.15.67-1-lts

Last edited by avasam (2022-09-15 20:14:48)

Offline

#6 2022-09-15 20:33:02

loqs
Member
Registered: 2014-03-06
Posts: 18,964

Re: wifi driver installation error in linux kernel related to linux-lts

The package failed to build,  so you could not install it,  so something else was loaded after you restarted the system.
Flag 8188eu-aircrack-dkms-git out of date.  Send the patches to upstream if you want.

Patch for 5.19 and 6.0 support.

diff --git a/8188eu-aircrack-dkms-git-5.19.patch b/8188eu-aircrack-dkms-git-5.19.patch
new file mode 100644
index 0000000..9b88b32
--- /dev/null
+++ b/8188eu-aircrack-dkms-git-5.19.patch
@@ -0,0 +1,40 @@
+diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
+index 86c45b9..2d9433e 100644
+--- a/os_dep/linux/ioctl_cfg80211.c
++++ b/os_dep/linux/ioctl_cfg80211.c
+@@ -417,7 +417,11 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset, u8
+ 	if (ret != _SUCCESS)
+ 		goto exit;
+ 
++ #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 19, 2)
+ 	cfg80211_ch_switch_notify(adapter->pnetdev, &chdef);
++#else
++	cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0);
++#endif
+ 
+ #else
+ 	int freq = rtw_ch2freq(ch);
+@@ -4876,7 +4880,11 @@ static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *nd
+ 	return ret;
+ }
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 19, 2)
+ static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
++#else
++static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev, unsigned int link_id)
++#endif
+ {
+ 	_adapter *adapter = (_adapter *)rtw_netdev_priv(ndev);
+ 
+@@ -9634,7 +9642,11 @@ void rtw_wdev_unregister(struct wireless_dev *wdev)
+ 	rtw_cfg80211_indicate_scan_done(adapter, _TRUE);
+ 
+ 	#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)) || defined(COMPAT_KERNEL_RELEASE)
++	#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 19, 2)
+ 	if (wdev->current_bss) {
++	#else
++	if (wdev->connected) {
++	#endif
+ 		RTW_INFO(FUNC_ADPT_FMT" clear current_bss by cfg80211_disconnected\n", FUNC_ADPT_ARG(adapter));
+ 		rtw_cfg80211_indicate_disconnect(adapter, 0, 1);
+ 	}
diff --git a/8188eu-aircrack-dkms-git-6.0.patch b/8188eu-aircrack-dkms-git-6.0.patch
new file mode 100644
index 0000000..e9c1e88
--- /dev/null
+++ b/8188eu-aircrack-dkms-git-6.0.patch
@@ -0,0 +1,18 @@
+diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
+index 2d9433e..d56af64 100644
+--- a/os_dep/linux/ioctl_cfg80211.c
++++ b/os_dep/linux/ioctl_cfg80211.c
+@@ -1103,7 +1103,13 @@ check_bss:
+ 		#endif
+ 
+ 		#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) || defined(RHEL79))
++		#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0)
++		roam_info.channel = notify_channel;
+ 		roam_info.bssid = cur_network->network.MacAddress;
++		#else
++		roam_info.links[0].channel = notify_channel;
++		roam_info.links[0].bssid = cur_network->network.MacAddress;
++		#endif
+ 		roam_info.req_ie = pmlmepriv->assoc_req + sizeof(struct rtw_ieee80211_hdr_3addr) + 2;
+ 		roam_info.req_ie_len = pmlmepriv->assoc_req_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 2;
+ 		roam_info.resp_ie = pmlmepriv->assoc_rsp + sizeof(struct rtw_ieee80211_hdr_3addr) + 6;
diff --git a/PKGBUILD b/PKGBUILD
index d24a244..1ca5428 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
 _pkgname=8188eu
 _pkgver=5.3.9
 pkgname=8188eu-aircrack-dkms-git
-pkgver=5.3.9.r161.0958f29
+pkgver=5.3.9.r165.4ba8e08
 pkgrel=1
 pkgdesc="Realtek RTL8188EUS and RTL8188ETV Wi-Fi driver with monitor mode & frame injection support"
 arch=('x86_64' 'i686' 'pentium4' 'aarch64')
@@ -14,19 +14,23 @@ makedepends=('git')
 provides=('8188eu-dkms')
 conflicts=('8188eu-dkms' '8188eu-dkms-git')
 source=("${_pkgname}::git+${url}#branch=v${_pkgver}"
-        'https://github.com/aircrack-ng/rtl8188eus/pull/174.patch'
+         8188eu-aircrack-dkms-git-5.19.patch
+         8188eu-aircrack-dkms-git-6.0.patch
         'blacklist-r8188eu.conf')
 md5sums=('SKIP'
-         'ca4fc44d077a0d8ceb22ade7c47dc36f'
+         'c56e14ef5cf878ab9d4f7befe3547bed'
+         'e4882479ea876d2001a8dec2e243381b'
          '8af5df9ed717b3bb48df59dac0c8a9c8')
 
-pkgver() {
+prepare() {
 	cd "${_pkgname}"
-	printf "${_pkgver}.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+	patch -Np1 -i ../8188eu-aircrack-dkms-git-5.19.patch
+	patch -Np1 -i ../8188eu-aircrack-dkms-git-6.0.patch
 }
 
-prepare() {
-        patch -p1 -d $srcdir/8188eu/ < 174.patch
+pkgver() {
+	cd "${_pkgname}"
+	printf "${_pkgver}.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
 }
 
 package() {

Last edited by loqs (2022-09-15 21:26:29)

Offline

Board footer

Powered by FluxBB