rtl88x2bu: fix build for kernel 5.15

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2023-09-21 14:55:58 +08:00
parent a6a58e6dc1
commit da5714041d
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
2 changed files with 18 additions and 3 deletions

View File

@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=rtl88x2bu
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE_URL:=https://github.com/morrownr/88x2bu-20210702.git
PKG_SOURCE_PROTO:=git

View File

@ -123,12 +123,27 @@
if (wdev->current_bss) {
--- a/os_dep/linux/os_intfs.c
+++ b/os_dep/linux/os_intfs.c
@@ -2166,7 +2166,7 @@ int rtw_os_ndev_register(_adapter *adapt
@@ -2166,7 +2166,11 @@ int rtw_os_ndev_register(_adapter *adapt
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(RHEL88))
netif_napi_add_weight(ndev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT);
#else
- netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT);
+ netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll);
+ netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll
+#ifndef BUILD_OPENWRT
+ , RTL_NAPI_WEIGHT
+#endif
+ );
#endif
#endif /* CONFIG_RTW_NAPI */
--- a/os_dep/linux/wifi_regd.c
+++ b/os_dep/linux/wifi_regd.c
@@ -405,7 +405,7 @@ int rtw_regd_init(struct wiphy *wiphy)
wiphy->regulatory_flags &= ~REGULATORY_DISABLE_BEACON_HINTS;
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 39))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 39) && !defined(BUILD_OPENWRT))
wiphy->regulatory_flags |= REGULATORY_IGNORE_STALE_KICKOFF;
#endif