mirror of
https://github.com/drygdryg/rtl8188eus.git
synced 2025-04-29 02:37:16 +09:00
Updated cfg80211.h's add_virtual_inf implementations with new parameter
This commit is contained in:
parent
9a2618a986
commit
b4e71299d5
@ -4431,7 +4431,11 @@ static const struct net_device_ops rtw_cfg80211_monitor_if_ops = {
|
|||||||
};
|
};
|
||||||
#endif
|
#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;
|
int ret = 0;
|
||||||
struct net_device *mon_ndev = NULL;
|
struct net_device *mon_ndev = NULL;
|
||||||
@ -4462,6 +4466,9 @@ static int rtw_cfg80211_add_monitor_if(_adapter *padapter, char *name, struct ne
|
|||||||
mon_ndev->type = ARPHRD_IEEE80211_RADIOTAP;
|
mon_ndev->type = ARPHRD_IEEE80211_RADIOTAP;
|
||||||
strncpy(mon_ndev->name, name, IFNAMSIZ);
|
strncpy(mon_ndev->name, name, IFNAMSIZ);
|
||||||
mon_ndev->name[IFNAMSIZ - 1] = 0;
|
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))
|
#if (LINUX_VERSION_CODE > KERNEL_VERSION(4, 11, 8))
|
||||||
mon_ndev->priv_destructor = rtw_ndev_destructor;
|
mon_ndev->priv_destructor = rtw_ndev_destructor;
|
||||||
#else
|
#else
|
||||||
@ -4551,7 +4558,11 @@ static int
|
|||||||
switch (type) {
|
switch (type) {
|
||||||
case NL80211_IFTYPE_MONITOR:
|
case NL80211_IFTYPE_MONITOR:
|
||||||
padapter = wiphy_to_adapter(wiphy); /* TODO: get ap iface ? */
|
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)
|
if (ret == 0)
|
||||||
wdev = ndev->ieee80211_ptr;
|
wdev = ndev->ieee80211_ptr;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user