rtl8189es: fix build on kernel 4.9
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
parent
ce30363cd9
commit
00cd325b19
@ -1,14 +1,11 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
# Copyright (C) 2021-2022 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=rtl8189es
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/jwrdegoede/rtl8189ES_linux.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
|
||||
@ -0,0 +1,51 @@
|
||||
diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
|
||||
index 0fc6fbd..bc883ab 100644
|
||||
--- a/os_dep/linux/ioctl_cfg80211.c
|
||||
+++ b/os_dep/linux/ioctl_cfg80211.c
|
||||
@@ -797,7 +797,7 @@ check_bss:
|
||||
struct ieee80211_channel *notify_channel;
|
||||
u32 freq;
|
||||
u16 channel = cur_network->network.Configuration.DSConfig;
|
||||
- #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
|
||||
|
||||
@@ -806,7 +806,7 @@ check_bss:
|
||||
#endif
|
||||
|
||||
DBG_871X(FUNC_ADPT_FMT" call cfg80211_roamed\n", FUNC_ADPT_ARG(padapter));
|
||||
- #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.channel = notify_channel;
|
||||
roam_info.bssid = cur_network->network.MacAddress;
|
||||
roam_info.req_ie =
|
||||
@@ -1889,7 +1889,8 @@ enum nl80211_iftype {
|
||||
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)
|
||||
@@ -4009,7 +4010,8 @@ static int
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0))
|
||||
unsigned char name_assign_type,
|
||||
#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)
|
||||
enum nl80211_iftype type, struct vif_params *params)
|
||||
#else
|
||||
enum nl80211_iftype type, u32 *flags, struct vif_params *params)
|
||||
@@ -6414,7 +6416,7 @@ static void rtw_cfg80211_preinit_wiphy(_adapter *adapter, struct wiphy *wiphy)
|
||||
#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->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
|
||||
#else // KERNEL_VERSION >= 4.12
|
||||
wiphy->max_sched_scan_reqs = 1;
|
||||
Loading…
Reference in New Issue
Block a user