Fix interface rename issue

This commit is contained in:
kimocoder 2019-08-24 00:48:52 +02:00
parent f4bd60fbcd
commit 703d5772d4

View File

@ -1431,6 +1431,7 @@ static u8 is_rtw_ndev(struct net_device *ndev)
static int rtw_ndev_notifier_call(struct notifier_block *nb, unsigned long state, void *ptr)
{
struct net_device *ndev;
_adapter *adapter = rtw_netdev_priv(ndev);
if (ptr == NULL)
return NOTIFY_DONE;
@ -1452,6 +1453,8 @@ static int rtw_ndev_notifier_call(struct notifier_block *nb, unsigned long state
switch (state) {
case NETDEV_CHANGENAME:
//rtw_adapter_proc_replace(ndev);
strncpy(adapter->old_ifname, ndev->name, IFNAMSIZ);
adapter->old_ifname[IFNAMSIZ-1] = 0;
break;
#ifdef CONFIG_NEW_NETDEV_HDL
case NETDEV_PRE_UP :