diff --git a/Makefile b/Makefile index ed06a80..850498e 100755 --- a/Makefile +++ b/Makefile @@ -68,6 +68,8 @@ CONFIG_RTW_REPEATER_SON = n CONFIG_RTW_WIFI_HAL = n CONFIG_ICMP_VOQ = n CONFIG_IP_R_MONITOR = n #arp VOQ and high rate +# disable virtual intf for openwrt 21.02 +CONFIG_RTW_VIRTUAL_INTF = n ########################## Debug ########################### CONFIG_RTW_DEBUG = n # default log level is _DRV_INFO_ = 4, @@ -1137,6 +1139,10 @@ endif EXTRA_CFLAGS += -DDM_ODM_SUPPORT_TYPE=0x04 +ifeq ($(CONFIG_RTW_VIRTUAL_INTF), y) +EXTRA_CFLAGS += -DRTW_VIRTUAL_INTF=1 +endif + ifeq ($(CONFIG_PLATFORM_I386_PC), y) EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index 8e8c109..5289234 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -4844,6 +4844,7 @@ out: return ret; } +#ifdef RTW_VIRTUAL_INT #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) static struct wireless_dev * #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)) || defined(COMPAT_KERNEL_RELEASE) @@ -4999,6 +5000,7 @@ exit: rtw_set_rtnl_lock_holder(dvobj, NULL); return ret; } +#endif /* RTW_VIRTUAL_INT */ static int rtw_add_beacon(_adapter *adapter, const u8 *head, size_t head_len, const u8 *tail, size_t tail_len) { @@ -10136,8 +10138,10 @@ static struct cfg80211_ops rtw_cfg80211_ops = { .flush_pmksa = cfg80211_rtw_flush_pmksa, #ifdef CONFIG_AP_MODE +#ifdef RTW_VIRTUAL_INT .add_virtual_intf = cfg80211_rtw_add_virtual_intf, .del_virtual_intf = cfg80211_rtw_del_virtual_intf, +#endif #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)) && !defined(COMPAT_KERNEL_RELEASE) .add_beacon = cfg80211_rtw_add_beacon,