mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2024-11-10 08:07:05 +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;
|
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)
|
#if defined(CONFIG_IOCTL_CFG80211)
|
||||||
rtw_cfg80211_ndev_res_unregister(adapter);
|
rtw_cfg80211_ndev_res_unregister(adapter);
|
||||||
#endif
|
#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)
|
#if defined(CONFIG_IOCTL_CFG80211) && !defined(RTW_SINGLE_WIPHY)
|
||||||
#ifdef CONFIG_RFKILL_POLL
|
#ifdef CONFIG_RFKILL_POLL
|
||||||
rtw_cfg80211_deinit_rfkill(adapter_to_wiphy(adapter));
|
rtw_cfg80211_deinit_rfkill(adapter_to_wiphy(adapter));
|
||||||
|
Loading…
Reference in New Issue
Block a user