diff --git a/Makefile b/Makefile index 3cb036e..f9b7afe 100755 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS) EXTRA_CFLAGS += -O1 #EXTRA_CFLAGS += -O3 -#EXTRA_CFLAGS += -Wall +EXTRA_CFLAGS += -Wall #EXTRA_CFLAGS += -Wextra #EXTRA_CFLAGS += -Werror #EXTRA_CFLAGS += -pedantic @@ -9,8 +9,8 @@ EXTRA_CFLAGS += -O1 #EXTRA_CFLAGS += -Wno-tautological-compare #EXTRA_CFLAGS += -Wno-incompatible-pointer-types -#EXTRA_CFLAGS += -Wno-switch -#EXTRA_CFLAGS += -Wno-cast-function-type +EXTRA_CFLAGS += -Wno-switch +EXTRA_CFLAGS += -Wno-cast-function-type EXTRA_CFLAGS += -Wno-unused-variable EXTRA_CFLAGS += -Wno-unused-value EXTRA_CFLAGS += -Wno-unused-label @@ -20,11 +20,11 @@ EXTRA_CFLAGS += -Wno-unused EXTRA_CFLAGS += -Wno-cast-function-type EXTRA_CFLAGS += -Wno-date-time #EXTRA_CFLAGS += -Wsign-conversion -#EXTRA_CFLAGS += -Wno-misleading-indentation +EXTRA_CFLAGS += -Wno-misleading-indentation EXTRA_CFLAGS += -Wno-uninitialized # Relax some warnings from '-Wextra' so we won't get flooded with warnings #EXTRA_CFLAGS += -Wno-sign-compare -Wno-sign-conversion -#EXTRA_CFLAGS += -Wno-missing-field-initializers +EXTRA_CFLAGS += -Wno-missing-field-initializers #EXTRA_CFLAGS += -Wno-type-limits #EXTRA_CFLAGS += -Wconversion -Wformat-overflow -Wswitch -Wswitch-bool #EXTRA_CFLAGS += -Wno-tautological-compare -Wno-ignored-qualifiers diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index cd6b560..97044ff 100755 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -4763,7 +4763,11 @@ static const struct net_device_ops rtw_cfg80211_monitor_if_ops = { }; #endif -static int rtw_cfg80211_add_monitor_if(_adapter *padapter, char *name, struct net_device **ndev) +static int rtw_cfg80211_add_monitor_if(_adapter *padapter, char *name, +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)) + unsigned char name_assign_type, +#endif + struct net_device **ndev) { int ret = 0; struct net_device *mon_ndev = NULL; @@ -4794,6 +4798,9 @@ static int rtw_cfg80211_add_monitor_if(_adapter *padapter, char *name, struct ne mon_ndev->type = ARPHRD_IEEE80211_RADIOTAP; strncpy(mon_ndev->name, name, IFNAMSIZ); mon_ndev->name[IFNAMSIZ - 1] = 0; +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0)) + mon_ndev->name_assign_type = name_assign_type; +#endif #if (LINUX_VERSION_CODE > KERNEL_VERSION(4, 11, 8)) mon_ndev->priv_destructor = rtw_ndev_destructor; #else @@ -4883,7 +4890,11 @@ static int switch (type) { case NL80211_IFTYPE_MONITOR: padapter = wiphy_to_adapter(wiphy); /* TODO: get ap iface ? */ - ret = rtw_cfg80211_add_monitor_if(padapter, (char *)name, &ndev); + ret = rtw_cfg80211_add_monitor_if(padapter, (char *)name, + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0)) + name_assign_type, + #endif + &ndev); if (ret == 0) wdev = ndev->ieee80211_ptr; break;