From 3e24ca110550062c67761218261717d618e4a67b Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Wed, 30 Oct 2024 21:04:40 +0800 Subject: [PATCH] kernel: fix rtw88x kernel 6.x build --- package/kernel/rtl8812au-ac/Makefile | 21 +-- .../patches/001-use-kernel-byteorder.patch | 1 - ...ch => 010-disable-default-build-x86.patch} | 2 +- ...nge-value-of-vht-enable-and-usb-mode.patch | 13 +- ...add-missing-code-for-concurrent-mode.patch | 2 +- .../patches/040-wireless-5.8.patch | 99 ++++++++------ .../patches/050-backport-6.1.patch | 127 ------------------ package/kernel/rtl8812au-ct/Makefile | 2 +- package/kernel/rtw88-usb/Makefile | 1 + 9 files changed, 81 insertions(+), 187 deletions(-) rename package/kernel/rtl8812au-ac/patches/{010-disable-default-build-x86.patch.patch => 010-disable-default-build-x86.patch} (87%) delete mode 100644 package/kernel/rtl8812au-ac/patches/050-backport-6.1.patch diff --git a/package/kernel/rtl8812au-ac/Makefile b/package/kernel/rtl8812au-ac/Makefile index 80ec906e5..dfe1764d0 100644 --- a/package/kernel/rtl8812au-ac/Makefile +++ b/package/kernel/rtl8812au-ac/Makefile @@ -1,20 +1,23 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# Copyright (C) 2020 stepheny +# +# + include $(TOPDIR)/rules.mk PKG_NAME:=rtl8812au-ac -PKG_RELEASE:=2 - -PKG_LICENSE:=GPLv2 -PKG_LICENSE_FILES:= +PKG_RELEASE:=1 PKG_SOURCE_URL:=https://github.com/aircrack-ng/rtl8812au.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2023-01-23 -PKG_SOURCE_VERSION:=e72dacdc4af7cf421484ce9567ef2cc995a16f3a -PKG_MIRROR_HASH:=4e2168712f62a6d736fbc3422f651c6738a37a40d226617f7d8248ad8abd2433 +PKG_SOURCE_DATE:=2024-05-10 +PKG_SOURCE_VERSION:=b44d288f423ede0fc7cdbf92d07a7772cd727de4 +PKG_MIRROR_HASH:=dd27206739be50517dff9fccca6724b5aae6e7b4d9fa06bddfc9bdacc325b25b PKG_LICENSE:=GPL-2.0-only PKG_LICENSE_FILES:=LICENSE -# PKG_MAINTAINER:= +PKG_MAINTAINER:=Marty Jones PKG_BUILD_PARALLEL:=1 @@ -26,7 +29,7 @@ include $(INCLUDE_DIR)/package.mk define KernelPackage/rtl8812au-ac SUBMENU:=Wireless Drivers TITLE:=Realtek RTL8812AU/21AU wireless drivers - DEPENDS:=+kmod-cfg80211 +kmod-usb-core +@DRIVER_11AC_SUPPORT + DEPENDS:=@!(LINUX_6_6) +kmod-cfg80211 +kmod-usb-core +@DRIVER_11AC_SUPPORT FILES:=$(PKG_BUILD_DIR)/rtl8812au.ko AUTOLOAD:=$(call AutoProbe,rtl8812au) CONFLICTS:=kmod-rtl8812au-ct diff --git a/package/kernel/rtl8812au-ac/patches/001-use-kernel-byteorder.patch b/package/kernel/rtl8812au-ac/patches/001-use-kernel-byteorder.patch index 17013bfec..187a6788e 100644 --- a/package/kernel/rtl8812au-ac/patches/001-use-kernel-byteorder.patch +++ b/package/kernel/rtl8812au-ac/patches/001-use-kernel-byteorder.patch @@ -13,4 +13,3 @@ of the byteorder headers. #include #include #include - \ No newline at end of file diff --git a/package/kernel/rtl8812au-ac/patches/010-disable-default-build-x86.patch.patch b/package/kernel/rtl8812au-ac/patches/010-disable-default-build-x86.patch similarity index 87% rename from package/kernel/rtl8812au-ac/patches/010-disable-default-build-x86.patch.patch rename to package/kernel/rtl8812au-ac/patches/010-disable-default-build-x86.patch index 1cfa22bd9..6856138d8 100644 --- a/package/kernel/rtl8812au-ac/patches/010-disable-default-build-x86.patch.patch +++ b/package/kernel/rtl8812au-ac/patches/010-disable-default-build-x86.patch @@ -1,6 +1,6 @@ --- a/Makefile +++ b/Makefile -@@ -98,7 +98,7 @@ CONFIG_RTW_SDIO_PM_KEEP_POWER = y +@@ -97,7 +97,7 @@ CONFIG_RTW_SDIO_PM_KEEP_POWER = y ###################### MP HW TX MODE FOR VHT ####################### CONFIG_MP_VHT_HW_TX_MODE = n ###################### Platform Related ####################### diff --git a/package/kernel/rtl8812au-ac/patches/020-change-value-of-vht-enable-and-usb-mode.patch b/package/kernel/rtl8812au-ac/patches/020-change-value-of-vht-enable-and-usb-mode.patch index aba8ce762..44fed1c2a 100644 --- a/package/kernel/rtl8812au-ac/patches/020-change-value-of-vht-enable-and-usb-mode.patch +++ b/package/kernel/rtl8812au-ac/patches/020-change-value-of-vht-enable-and-usb-mode.patch @@ -1,21 +1,20 @@ --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c -@@ -254,7 +254,7 @@ int rtw_bfee_rf_number = 0; /*BeamformeeCapRfNum Rf path number, 0 for auto, ot +@@ -258,7 +258,7 @@ int rtw_bfee_rf_number = 0; /*Beamformee #endif /* CONFIG_80211N_HT */ - + #ifdef CONFIG_80211AC_VHT -int rtw_vht_enable = 1; /* 0:disable, 1:enable, 2:force auto enable */ +int rtw_vht_enable = 2; /* 0:disable, 1:enable, 2:force auto enable */ module_param(rtw_vht_enable, int, 0644); - + int rtw_ampdu_factor = 7; -@@ -324,7 +324,7 @@ int rtw_drv_ant_band_switch = 1; /* 0:OFF , 1:ON, Driver control antenna band sw +@@ -328,7 +328,7 @@ int rtw_drv_ant_band_switch = 1; /* 0:OF int rtw_single_ant_path; /*0:main ant , 1:aux ant , Fixed single antenna path, default main ant*/ - + /* 0: doesn't switch, 1: switch from usb2.0 to usb 3.0 2: switch from usb3.0 to usb 2.0 */ -int rtw_switch_usb_mode = 0; +int rtw_switch_usb_mode = 1; - + #ifdef CONFIG_USB_AUTOSUSPEND int rtw_enusbss = 1;/* 0:disable,1:enable */ --- diff --git a/package/kernel/rtl8812au-ac/patches/030-add-missing-code-for-concurrent-mode.patch b/package/kernel/rtl8812au-ac/patches/030-add-missing-code-for-concurrent-mode.patch index 32fe0e064..fb44f9ec2 100644 --- a/package/kernel/rtl8812au-ac/patches/030-add-missing-code-for-concurrent-mode.patch +++ b/package/kernel/rtl8812au-ac/patches/030-add-missing-code-for-concurrent-mode.patch @@ -1,6 +1,6 @@ --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c -@@ -2807,6 +2807,7 @@ static int netdev_vir_if_close(struct ne +@@ -2782,6 +2782,7 @@ static int netdev_vir_if_close(struct ne { _adapter *padapter = (_adapter *)rtw_netdev_priv(pnetdev); struct mlme_priv *pmlmepriv = &padapter->mlmepriv; diff --git a/package/kernel/rtl8812au-ac/patches/040-wireless-5.8.patch b/package/kernel/rtl8812au-ac/patches/040-wireless-5.8.patch index 4b57e0bed..c31b78bb9 100644 --- a/package/kernel/rtl8812au-ac/patches/040-wireless-5.8.patch +++ b/package/kernel/rtl8812au-ac/patches/040-wireless-5.8.patch @@ -4,119 +4,138 @@ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)) if (started) { --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT)) +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0)) && !defined(BUILD_OPENWRT) + cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false, 0); +-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) || defined(BUILD_OPENWRT) cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false); --#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0)) -+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0) || defined(BUILD_OPENWRT)) + #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0)) || (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8,0)) cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, false); - #else - cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0); -@@ -474,7 +474,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapte +@@ -476,9 +476,9 @@ u8 rtw_cfg80211_ch_switch_notify(_adapte if (!rtw_cfg80211_allow_ch_switch_notify(adapter)) goto exit; --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(BUILD_OPENWRT)) +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0)) && !defined(BUILD_OPENWRT) + cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0, 0); +-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || defined(BUILD_OPENWRT) cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0); #else cfg80211_ch_switch_notify(adapter->pnetdev, &chdef); -@@ -1151,7 +1151,7 @@ check_bss: +@@ -1155,7 +1155,7 @@ check_bss: #endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) || defined(BUILD_OPENWRT)) - roam_info.links[0].bssid = cur_network->network.MacAddress; - #else +- #if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) ++ #if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) && !defined(BUILD_OPENWRT) + roam_info.channel = notify_channel; roam_info.bssid = cur_network->network.MacAddress; -@@ -1721,7 +1721,7 @@ exit: + #endif +@@ -1738,7 +1738,7 @@ exit: } static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) || defined(BUILD_OPENWRT) , int link_id #endif , u8 key_index -@@ -1868,7 +1868,7 @@ addkey_end: +@@ -1885,7 +1885,7 @@ addkey_end: } static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) || defined(BUILD_OPENWRT) , int link_id #endif , u8 keyid -@@ -2036,7 +2036,7 @@ exit: +@@ -2053,7 +2053,7 @@ exit: } static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) || defined(BUILD_OPENWRT) int link_id, #endif #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) -@@ -2060,7 +2060,7 @@ static int cfg80211_rtw_del_key(struct w +@@ -2077,7 +2077,7 @@ static int cfg80211_rtw_del_key(struct w static int cfg80211_rtw_set_default_key(struct wiphy *wiphy, struct net_device *ndev, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) || defined(BUILD_OPENWRT) int link_id, #endif u8 key_index -@@ -2112,7 +2112,7 @@ static int cfg80211_rtw_set_default_key( +@@ -2129,7 +2129,7 @@ static int cfg80211_rtw_set_default_key( #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)) int cfg80211_rtw_set_default_mgmt_key(struct wiphy *wiphy, struct net_device *ndev, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) || defined(BUILD_OPENWRT) int link_id, #endif u8 key_index) -@@ -5248,7 +5248,7 @@ static int cfg80211_rtw_change_beacon(st +@@ -5283,7 +5283,7 @@ exit: return ret; } --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(BUILD_OPENWRT)) - static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev, unsigned int link_id) - #else +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0)) || defined(BUILD_OPENWRT) + static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev, + struct cfg80211_ap_update *params) + { +@@ -5315,7 +5315,7 @@ static int cfg80211_rtw_change_beacon(st + return ret; + } + +-#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 19, 2)) ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 19, 2)) && !defined(BUILD_OPENWRT) static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev) -@@ -6125,7 +6125,7 @@ static int cfg80211_rtw_set_channel(stru + #else + static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev, unsigned int link_id) +@@ -6191,7 +6191,7 @@ static int cfg80211_rtw_set_channel(stru return 0; } -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(BUILD_OPENWRT)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || defined(BUILD_OPENWRT) static int cfg80211_rtw_get_channel(struct wiphy *wiphy, struct wireless_dev *wdev, unsigned int link_id, struct cfg80211_chan_def *chandef){ #else static int cfg80211_rtw_get_channel(struct wiphy *wiphy, struct wireless_dev *wdev, struct cfg80211_chan_def *chandef){ -@@ -10434,9 +10434,9 @@ void rtw_wdev_unregister(struct wireless +@@ -7862,7 +7862,7 @@ static int cfg80211_rtw_tdls_mgmt(struct + #else + u8 *peer, + #endif +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 5, 0)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 5, 0)) || defined(BUILD_OPENWRT) + int link_id, + #endif + u8 action_code, +@@ -10484,7 +10484,7 @@ void rtw_wdev_unregister(struct wireless 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(6, 0, 0)) -+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) || defined(BUILD_OPENWRT)) +- #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) ++ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || defined(BUILD_OPENWRT) if (wdev->links[0].client.current_bss) { -- #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) -+ #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(BUILD_OPENWRT)) + #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) if (wdev->connected) { - #else - if (wdev->current_bss) { --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c -@@ -2823,7 +2823,13 @@ static int netdev_vir_if_close(struct ne +@@ -2798,7 +2798,13 @@ static int netdev_vir_if_close(struct ne #ifdef CONFIG_IOCTL_CFG80211 wdev->iftype = NL80211_IFTYPE_MONITOR; +- wdev->current_bss = NULL; + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) || defined(BUILD_OPENWRT)) + wdev->links[0].client.current_bss = NULL; + #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19, 2)) + wdev->connected = NULL; + #else - wdev->current_bss = NULL; ++ wdev->current_bss = NULL; + #endif rtw_scan_abort(padapter); rtw_cfg80211_wait_scan_req_empty(padapter, 200); diff --git a/package/kernel/rtl8812au-ac/patches/050-backport-6.1.patch b/package/kernel/rtl8812au-ac/patches/050-backport-6.1.patch deleted file mode 100644 index 2c6fa17c7..000000000 --- a/package/kernel/rtl8812au-ac/patches/050-backport-6.1.patch +++ /dev/null @@ -1,127 +0,0 @@ ---- a/os_dep/linux/ioctl_cfg80211.c -+++ b/os_dep/linux/ioctl_cfg80211.c -@@ -460,9 +460,7 @@ - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)) - if (started) { --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT)) -- cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false); --#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0) || defined(BUILD_OPENWRT)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0) || defined(BUILD_OPENWRT)) - cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, false); - #else - cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0); -@@ -475,7 +473,7 @@ - goto exit; - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(BUILD_OPENWRT)) -- cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0); -+ cfg80211_ch_switch_notify(adapter->pnetdev, &chdef); - #else - cfg80211_ch_switch_notify(adapter->pnetdev, &chdef); - #endif -@@ -1152,7 +1150,7 @@ - - #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) || defined(BUILD_OPENWRT)) -- roam_info.links[0].bssid = cur_network->network.MacAddress; -+ roam_info.bssid = cur_network->network.MacAddress; - #else - roam_info.bssid = cur_network->network.MacAddress; - #endif -@@ -1721,9 +1719,6 @@ - } - - static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT)) -- , int link_id --#endif - , u8 key_index - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) - , bool pairwise -@@ -1868,9 +1863,6 @@ - } - - static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT)) -- , int link_id --#endif - , u8 keyid - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) - , bool pairwise -@@ -2036,9 +2028,6 @@ - } - - static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev, --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT)) -- int link_id, --#endif - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) - u8 key_index, bool pairwise, const u8 *mac_addr) - #else /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) */ -@@ -2059,11 +2048,7 @@ - } - - static int cfg80211_rtw_set_default_key(struct wiphy *wiphy, -- struct net_device *ndev, --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT)) -- int link_id, --#endif -- u8 key_index -+ struct net_device *ndev, u8 key_index - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)) || defined(COMPAT_KERNEL_RELEASE) - , bool unicast, bool multicast - #endif -@@ -2111,11 +2096,7 @@ - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)) - int cfg80211_rtw_set_default_mgmt_key(struct wiphy *wiphy, -- struct net_device *ndev, --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT)) -- int link_id, --#endif -- u8 key_index) -+ struct net_device *ndev, u8 key_index) - { - #define SET_DEF_KEY_PARAM_FMT " key_index=%d" - #define SET_DEF_KEY_PARAM_ARG , key_index -@@ -5248,11 +5229,7 @@ - return ret; - } - --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(BUILD_OPENWRT)) --static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev, unsigned int link_id) --#else - static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev) --#endif - { - _adapter *adapter = (_adapter *)rtw_netdev_priv(ndev); - -@@ -6125,11 +6102,8 @@ - return 0; - } - --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(BUILD_OPENWRT)) --static int cfg80211_rtw_get_channel(struct wiphy *wiphy, struct wireless_dev *wdev, unsigned int link_id, struct cfg80211_chan_def *chandef){ --#else -+ - static int cfg80211_rtw_get_channel(struct wiphy *wiphy, struct wireless_dev *wdev, struct cfg80211_chan_def *chandef){ --#endif - _adapter *padapter= wiphy_to_adapter(wiphy); - int channel; - int control_freq; -@@ -10434,13 +10408,8 @@ - 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(6, 0, 0) || defined(BUILD_OPENWRT)) -- if (wdev->links[0].client.current_bss) { -- #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(BUILD_OPENWRT)) -- if (wdev->connected) { -- #else -+ - if (wdev->current_bss) { -- #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/package/kernel/rtl8812au-ct/Makefile b/package/kernel/rtl8812au-ct/Makefile index be1acabf2..ceb1d06f1 100644 --- a/package/kernel/rtl8812au-ct/Makefile +++ b/package/kernel/rtl8812au-ct/Makefile @@ -24,7 +24,7 @@ include $(INCLUDE_DIR)/package.mk define KernelPackage/rtl8812au-ct SUBMENU:=Wireless Drivers TITLE:=Driver for Realtek 8812 AU devices comfast 912-ac, etc - DEPENDS:=+kmod-cfg80211 +kmod-usb-core +@DRIVER_11AC_SUPPORT + DEPENDS:=@!(LINUX_6_6) +kmod-cfg80211 +kmod-usb-core +@DRIVER_11AC_SUPPORT FILES:=\ $(PKG_BUILD_DIR)/rtl8812au.ko AUTOLOAD:=$(call AutoProbe,rtl8812au) diff --git a/package/kernel/rtw88-usb/Makefile b/package/kernel/rtw88-usb/Makefile index 4cb0a9d4f..3c638f375 100644 --- a/package/kernel/rtw88-usb/Makefile +++ b/package/kernel/rtw88-usb/Makefile @@ -43,6 +43,7 @@ define KernelPackage/rtl8723du TITLE:=Realtek RTL8723DU support DEPENDS+=+kmod-rtw88-usb +rtl8723du-firmware FILES:= \ + $(PKG_BUILD_DIR)/rtw88_8723x.ko \ $(PKG_BUILD_DIR)/rtw_8723d.ko \ $(PKG_BUILD_DIR)/rtw_8723du.ko AUTOLOAD:=$(call AutoProbe,rtw_8723du)