1
0
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:
kimocoder 2019-02-16 02:20:27 +01:00
parent 1ff4839d5b
commit eaf2707950

View File

@ -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));