mirror of
https://github.com/chinawrj/rtl8812au
synced 2024-11-09 23:57:10 +00:00
Reorder shutdown to eliminate warning from cfg80211
This commit is contained in:
parent
1ff4839d5b
commit
eaf2707950
@ -1650,19 +1650,21 @@ void rtw_os_ndev_unregister(_adapter *adapter)
|
||||
|
||||
netdev = adapter->pnetdev;
|
||||
|
||||
if ((adapter->DriverState != DRIVER_DISAPPEAR) && netdev) {
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(adapter);
|
||||
u8 rtnl_lock_needed = rtw_rtnl_lock_needed(dvobj);
|
||||
|
||||
if (rtnl_lock_needed)
|
||||
unregister_netdev(netdev);
|
||||
else
|
||||
unregister_netdevice(netdev);
|
||||
}
|
||||
#if defined(CONFIG_IOCTL_CFG80211)
|
||||
rtw_cfg80211_ndev_res_unregister(adapter);
|
||||
#endif
|
||||
|
||||
if ((adapter->DriverState != DRIVER_DISAPPEAR) && netdev) {
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(adapter);
|
||||
u8 rtnl_lock_needed = rtw_rtnl_lock_needed(dvobj);
|
||||
|
||||
if (rtnl_lock_needed)
|
||||
unregister_netdev(netdev);
|
||||
else
|
||||
unregister_netdevice(netdev);
|
||||
}
|
||||
|
||||
|
||||
#if defined(CONFIG_IOCTL_CFG80211) && !defined(RTW_SINGLE_WIPHY)
|
||||
#ifdef CONFIG_RFKILL_POLL
|
||||
rtw_cfg80211_deinit_rfkill(adapter_to_wiphy(adapter));
|
||||
|
Loading…
Reference in New Issue
Block a user