diff --git a/package/kernel/rtl8812au-ac/Makefile b/package/kernel/rtl8812au-ac/Makefile index 520be3ff1a..7f9cb67007 100644 --- a/package/kernel/rtl8812au-ac/Makefile +++ b/package/kernel/rtl8812au-ac/Makefile @@ -1,18 +1,14 @@ +# SPDX-License-Identifier: GPL-3.0-only # # Copyright (C) 2020 stepheny # # -# Copyright (C) 2021 ImmortalWrt -# -# -# This is free software, licensed under the GNU General Public License v3. -# See /LICENSE for more information. -# +# Copyright (C) 2021-2022 ImmortalWrt.org include $(TOPDIR)/rules.mk PKG_NAME:=rtl8812au-ac -PKG_RELEASE:=1 +PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_URL:=https://github.com/aircrack-ng/rtl8812au.git PKG_SOURCE_PROTO:=git diff --git a/package/kernel/rtl8812au-ac/patches/040-fix-build-newer-k4.9.patch b/package/kernel/rtl8812au-ac/patches/040-fix-build-newer-k4.9.patch new file mode 100644 index 0000000000..7b22dc066a --- /dev/null +++ b/package/kernel/rtl8812au-ac/patches/040-fix-build-newer-k4.9.patch @@ -0,0 +1,60 @@ +diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c +index e9f4ba9..0800861 100644 +--- a/os_dep/linux/ioctl_cfg80211.c ++++ b/os_dep/linux/ioctl_cfg80211.c +@@ -1071,7 +1071,7 @@ void rtw_cfg80211_indicate_connect(_adapter *padapter) + #ifdef CONFIG_P2P + struct wifidirect_info *pwdinfo = &(padapter->wdinfo); + #endif +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) || LINUX_VERSION_IN_RANGE(4, 9, 255, 4, 10, 0) + struct cfg80211_roam_info roam_info ={}; + #endif + +@@ -1144,7 +1144,7 @@ check_bss: + notify_channel = ieee80211_get_channel(wiphy, freq); + #endif + +- #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) ++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) || LINUX_VERSION_IN_RANGE(4, 9, 255, 4, 10, 0) + roam_info.bssid = cur_network->network.MacAddress; + 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; +@@ -1163,7 +1163,7 @@ check_bss: + , pmlmepriv->assoc_rsp + sizeof(struct rtw_ieee80211_hdr_3addr) + 6 + , pmlmepriv->assoc_rsp_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 6 + , GFP_ATOMIC); +- #endif /*LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)*/ ++ #endif /*LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) || LINUX_VERSION_IN_RANGE(4, 9, 255, 4, 10, 0)*/ + + RTW_INFO(FUNC_ADPT_FMT" call cfg80211_roamed\n", FUNC_ADPT_ARG(padapter)); + +@@ -2404,7 +2404,8 @@ extern int netdev_if2_open(struct net_device *pnetdev); + static int cfg80211_rtw_change_iface(struct wiphy *wiphy, + struct net_device *ndev, + enum nl80211_iftype type, +-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)) ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)) && \ ++ !LINUX_VERSION_IN_RANGE(4, 9, 255, 4, 10, 0) + u32 *flags, + #endif + struct vif_params *params) +@@ -4852,7 +4853,8 @@ static int + unsigned char name_assign_type, + #endif + enum nl80211_iftype type, +- #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)) ++ #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)) && \ ++ !LINUX_VERSION_IN_RANGE(4, 9, 255, 4, 10, 0) + u32 *flags, + #endif + struct vif_params *params) +@@ -9745,7 +9747,7 @@ struct ieee80211_supported_band *band; + #endif + + #if defined(CONFIG_PM) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0)) +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)) || LINUX_VERSION_IN_RANGE(4, 9, 255, 4, 10, 0) + wiphy->max_sched_scan_reqs = 1; + #else + wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;