--- rtl8812au_linux-master/os_dep/linux/ioctl_cfg80211.c.orig 2015-09-27 12:11:20.000000000 +0200 +++ rtl8812au_linux-master/os_dep/linux/ioctl_cfg80211.c 2015-09-27 13:53:42.644724720 +0200 @@ -3741,7 +3737,11 @@ }; #endif +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)) +static int rtw_cfg80211_add_monitor_if(_adapter *padapter, char *name, unsigned char name_assign_type, struct net_device **ndev) +#else static int rtw_cfg80211_add_monitor_if(_adapter *padapter, char *name, struct net_device **ndev) +#endif { int ret = 0; struct net_device* mon_ndev = NULL; @@ -3772,6 +3772,9 @@ 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 mon_ndev->destructor = rtw_ndev_destructor; #if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,29)) @@ -3836,6 +3839,9 @@ #else char *name, #endif +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)) + unsigned char name_assign_type, +#endif enum nl80211_iftype type, u32 *flags, struct vif_params *params) { int ret = 0; @@ -3853,7 +3859,11 @@ ret = -ENODEV; break; case NL80211_IFTYPE_MONITOR: +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)) + ret = rtw_cfg80211_add_monitor_if(padapter, (char *)name, name_assign_type, &ndev); +#else ret = rtw_cfg80211_add_monitor_if(padapter, (char *)name, &ndev); +#endif break; #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE) @@ -4130,12 +4140,15 @@ } static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) - const u8 *mac) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0)) + u8 *mac) { +#elif (LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0)) + const u8 *mac) { #else - u8 *mac) -#endif + struct station_del_parameters *params) { + const u8 *mac = params->mac; +#endif int ret=0; _irqL irqL; _list *phead, *plist;