rtl88x2bu-openhd-dkms-git: fix build on 6.9.0

This commit is contained in:
Rihards Skuja 2024-06-13 23:09:20 +03:00
parent f63adef198
commit aa33311685
Signed by: rhssk
GPG Key ID: BABE7EB1F38C7EF6
3 changed files with 39 additions and 6 deletions

View File

@ -1,7 +1,7 @@
pkgbase = rtl88x2bu-openhd-dkms-git
pkgdesc = Realtek RTL88x2BU WiFi USB driver (with OpenHD patches)
pkgver = 5.13.1.r224.g4e07c13
pkgrel = 5
pkgver = 5.13.1.r227.g9571cc7
pkgrel = 6
url = https://github.com/OpenHD/rtl88x2bu
arch = any
license = GPL2
@ -9,6 +9,8 @@ pkgbase = rtl88x2bu-openhd-dkms-git
depends = dkms
depends = bc
source = git+https://github.com/OpenHD/rtl88x2bu.git
source = fix-6.9.0-build.patch
sha256sums = SKIP
sha256sums = fd6afeadc4b00b74d9ed870fe446ffcc0773d07364fb7ed07f538b0ca07507ed
pkgname = rtl88x2bu-openhd-dkms-git

View File

@ -2,23 +2,28 @@
pkgname=rtl88x2bu-openhd-dkms-git
_modname=88x2bu_ohd
pkgver=5.13.1.r224.g4e07c13
pkgver=5.13.1.r227.g9571cc7
_pkgver=5.13.1
pkgrel=5
pkgrel=6
pkgdesc='Realtek RTL88x2BU WiFi USB driver (with OpenHD patches)'
arch=(any)
url='https://github.com/OpenHD/rtl88x2bu'
license=(GPL2)
depends=(dkms bc)
makedepends=(git)
source=('git+https://github.com/OpenHD/rtl88x2bu.git')
sha256sums=('SKIP')
source=('git+https://github.com/OpenHD/rtl88x2bu.git' 'fix-6.9.0-build.patch')
sha256sums=('SKIP' 'fd6afeadc4b00b74d9ed870fe446ffcc0773d07364fb7ed07f538b0ca07507ed')
pkgver() {
cd "${srcdir}/rtl88x2bu"
printf '%s.r%s.g%s' "${_pkgver}" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}
prepare() {
cd "${srcdir}/rtl88x2bu"
patch -p1 -i "$srcdir/fix-6.9.0-build.patch"
}
package() {
cd "${srcdir}/rtl88x2bu"
mkdir -p "${pkgdir}/usr/src/${_modname}-${pkgver}"

View File

@ -0,0 +1,26 @@
diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
index 1c1c3c4..76d71f4 100644
--- a/os_dep/linux/ioctl_cfg80211.c
+++ b/os_dep/linux/ioctl_cfg80211.c
@@ -454,7 +454,9 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0))
if (started) {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 9, 0))
+ cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0);
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0))
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0, 0);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false);
@@ -479,7 +481,9 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset,
if (!rtw_cfg80211_allow_ch_switch_notify(adapter))
goto exit;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 9, 0))
+ cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0);
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0))
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0, 0);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0);