diff --git a/Makefile b/Makefile index 0d9f5f9..97d510e 100755 --- a/Makefile +++ b/Makefile @@ -100,7 +100,7 @@ endif SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ | sed -e s/ppc/powerpc/ | sed -e s/armv.l/arm/) ARCH ?= $(SUBARCH) CROSS_COMPILE ?= -KVER := $(shell uname -r) +KVER ?= $(shell uname -r) KERNEL_SRC ?= /lib/modules/$(KVER)/build MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/ INSTALL_PREFIX := diff --git a/os_dep/ioctl_cfg80211.c b/os_dep/ioctl_cfg80211.c index 6ea8adf..5944b20 100644 --- a/os_dep/ioctl_cfg80211.c +++ b/os_dep/ioctl_cfg80211.c @@ -4419,11 +4419,11 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) u16 frame_type; bool reg = false; -#endif if (upd->global_stypes < 11) frame_type = (u16)BIT(upd->global_stypes << 4); else frame_type = 0; +#endif #ifdef CONFIG_DEBUG_CFG80211 DBG_88E(FUNC_ADPT_FMT" frame_type:%x, reg:%d\n", FUNC_ADPT_ARG(adapter), frame_type, reg); diff --git a/os_dep/rtw_android.c b/os_dep/rtw_android.c index 7c6bc9c..ec62ddf 100644 --- a/os_dep/rtw_android.c +++ b/os_dep/rtw_android.c @@ -356,7 +356,7 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd) goto exit; } -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)) if (!access_ok(priv_cmd.buf, priv_cmd.total_len)) { #else if (!access_ok(VERIFY_READ, (const void __user *)priv_cmd.buf,