mirror of
https://github.com/chinawrj/rtl8812au
synced 2024-11-30 17:02:28 +00:00
Fix interface rename error
This commit is contained in:
parent
02e8c82c9b
commit
9248e99dcc
@ -1419,7 +1419,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)
|
static int rtw_ndev_notifier_call(struct notifier_block *nb, unsigned long state, void *ptr)
|
||||||
{
|
{
|
||||||
struct net_device *ndev;
|
struct net_device *ndev;
|
||||||
_adapter *adapter;
|
_adapter *adapter = rtw_netdev_priv(ndev);
|
||||||
|
|
||||||
if (ptr == NULL)
|
if (ptr == NULL)
|
||||||
return NOTIFY_DONE;
|
return NOTIFY_DONE;
|
||||||
@ -1443,6 +1443,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(ndev);
|
rtw_adapter_proc_replace(ndev);
|
||||||
|
strncpy(adapter->old_ifname, ndev->name, IFNAMSIZ);
|
||||||
|
adapter->old_ifname[IFNAMSIZ-1] = 0;
|
||||||
break;
|
break;
|
||||||
#ifdef CONFIG_NEW_NETDEV_HDL
|
#ifdef CONFIG_NEW_NETDEV_HDL
|
||||||
case NETDEV_PRE_UP :
|
case NETDEV_PRE_UP :
|
||||||
|
Loading…
Reference in New Issue
Block a user