From 680f78830ca72d52dc3cbaec83f0f91440a81629 Mon Sep 17 00:00:00 2001 From: kimocoder Date: Sat, 11 Aug 2018 18:36:59 +0200 Subject: [PATCH] Reinstate: Fix interface rename error --- dkms.conf | 2 +- os_dep/linux/os_intfs.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dkms.conf b/dkms.conf index 28209e2..a1dacee 100644 --- a/dkms.conf +++ b/dkms.conf @@ -1,5 +1,5 @@ PACKAGE_NAME="realtek-rtl88xxau" -PACKAGE_VERSION="5.2.20.2~20180810" +PACKAGE_VERSION="5.2.20.2~20180811" CLEAN="'make' clean" BUILT_MODULE_NAME[0]=88XXau PROCS_NUM=`nproc` diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index cb97b85..1bb7292 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -1352,6 +1352,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; @@ -1373,6 +1374,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; }