diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index 79a6874..9c32964 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -1404,7 +1404,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); + _adapter *adapter; if (ptr == NULL) return NOTIFY_DONE; @@ -1423,6 +1423,8 @@ static int rtw_ndev_notifier_call(struct notifier_block *nb, unsigned long state RTW_INFO(FUNC_NDEV_FMT" state:%lu\n", FUNC_NDEV_ARG(ndev), state); + adapter = rtw_netdev_priv(ndev); + switch (state) { case NETDEV_CHANGENAME: //rtw_adapter_proc_replace(ndev);