From fd796b8bc11cefa7ad0e542d24d2d0ff087afdca Mon Sep 17 00:00:00 2001 From: kimocoder Date: Sun, 18 Aug 2019 18:49:07 +0200 Subject: [PATCH] Register wiphy after we probe MAC addr. (moved to wiphy_preinit) --- os_dep/linux/ioctl_cfg80211.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index 6d1913a..73e5093 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -9650,9 +9650,6 @@ void rtw_cfg80211_init_wiphy(_adapter *padapter) } #endif - /* copy mac_addr to wiphy */ - _rtw_memcpy(wiphy->perm_addr, adapter_mac_addr(padapter), ETH_ALEN); - } #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0)) @@ -10306,7 +10303,11 @@ void rtw_wiphy_free(struct wiphy *wiphy) int rtw_wiphy_register(struct wiphy *wiphy) { - RTW_INFO(FUNC_WIPHY_FMT"\n", FUNC_WIPHY_ARG(wiphy)); + + //RTW_INFO(FUNC_WIPHY_FMT"\n", FUNC_WIPHY_ARG(wiphy)); + + /* copy mac_addr to wiphy */ + _rtw_memcpy(wiphy->perm_addr, adapter_mac_addr(padapter), ETH_ALEN); #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)) || defined(RTW_VENDOR_EXT_SUPPORT) rtw_cfgvendor_attach(wiphy);