1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-09 23:57:00 +00:00

Fix interface rename error

This commit is contained in:
astsam 2017-03-23 21:04:32 +03:00
parent 51198653d4
commit 4e69a2756d

View File

@ -1109,6 +1109,7 @@ static int rtw_ndev_notifier_call(struct notifier_block *nb, unsigned long state
#else #else
struct net_device *dev = ptr; struct net_device *dev = ptr;
#endif #endif
_adapter *adapter = rtw_netdev_priv(dev);
if (dev == NULL) if (dev == NULL)
return NOTIFY_DONE; return NOTIFY_DONE;
@ -1134,6 +1135,8 @@ static int rtw_ndev_notifier_call(struct notifier_block *nb, unsigned long state
switch (state) { switch (state) {
case NETDEV_CHANGENAME: case NETDEV_CHANGENAME:
rtw_adapter_proc_replace(dev); rtw_adapter_proc_replace(dev);
strncpy(adapter->old_ifname, dev->name, IFNAMSIZ);
adapter->old_ifname[IFNAMSIZ-1] = 0;
break; break;
} }