diff --git a/include/autoconf.h b/include/autoconf.h index 9dce108..a41c662 100644 --- a/include/autoconf.h +++ b/include/autoconf.h @@ -28,11 +28,9 @@ #define CONFIG_USB_HCI - #define PLATFORM_LINUX - -/* #define CONFIG_IOCTL_CFG80211 1 */ +#define CONFIG_IOCTL_CFG80211 1 #ifdef CONFIG_IOCTL_CFG80211 /* #define RTW_USE_CFG80211_STA_EVENT */ /* Indecate new sta asoc through cfg80211_new_sta */ diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index bb45482..48a49a9 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -1763,10 +1763,6 @@ void rtw_os_ndev_unregister(_adapter *adapter) netdev = adapter->pnetdev; -#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); @@ -1776,6 +1772,9 @@ void rtw_os_ndev_unregister(_adapter *adapter) else unregister_netdevice(netdev); } +#if defined(CONFIG_IOCTL_CFG80211) + rtw_cfg80211_ndev_res_unregister(adapter); +#endif #if defined(CONFIG_IOCTL_CFG80211) && !defined(RTW_SINGLE_WIPHY) #ifdef CONFIG_RFKILL_POLL @@ -2055,10 +2054,8 @@ u8 rtw_init_default_value(_adapter *padapter) psecuritypriv->dot118021x_bmc_cam_id = INVALID_SEC_MAC_CAM_ID; #endif - /* pwrctrl_priv */ - /* registry_priv */ rtw_init_registrypriv_dev_network(padapter); rtw_update_registrypriv_dev_network(padapter); @@ -2198,12 +2195,11 @@ struct dvobj_priv *devobj_init(void) pdvobj->en_napi_dynamic = 0; #endif /* CONFIG_RTW_NAPI_DYNAMIC */ - #ifdef CONFIG_RTW_TPT_MODE pdvobj->tpt_mode = 0; pdvobj->edca_be_ul = 0x5ea42b; pdvobj->edca_be_dl = 0x00a42b; -#endif +#endif pdvobj->scan_deny = _FALSE; return pdvobj;