From 2777bcd9179f8b283067efec0057db1113f2b2ee Mon Sep 17 00:00:00 2001 From: kimocoder Date: Sat, 17 Aug 2019 22:31:40 +0200 Subject: [PATCH] Fix the correct interface name instead of being nameless --- os_dep/linux/os_intfs.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index e05977d..0ecbf4a 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -1525,10 +1525,16 @@ static const struct net_device_ops rtw_netdev_ops = { }; #endif +static const struct device_type wlan_type = { + .name = "wlan", +}; + int rtw_init_netdev_name(struct net_device *pnetdev, const char *ifname) { + _adapter *padapter; + pnetdev->dev.type = &wlan_type; + padapter = rtw_netdev_priv(pnetdev); #ifdef CONFIG_EASY_REPLACEMENT - _adapter *padapter = rtw_netdev_priv(pnetdev); struct net_device *TargetNetdev = NULL; _adapter *TargetAdapter = NULL; struct net *devnet = NULL;