From 2d93593f86e051dfdafa4a8221ffe289ef9cd8c7 Mon Sep 17 00:00:00 2001 From: Sherry Sun Date: Sat, 9 Oct 2021 10:56:59 +0800 Subject: [PATCH] mxm_wifiex: fix the build error on kernel higher than L5.12 The parameters in cfg80211_unregister_netdevice function is wrong, will cause the build error on kernel higher than L5.12. Signed-off-by: Sherry Sun Approved-by: Tian Yang --- mxm_wifiex/wlan_src/mlinux/moal_uap_cfg80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mxm_wifiex/wlan_src/mlinux/moal_uap_cfg80211.c b/mxm_wifiex/wlan_src/mlinux/moal_uap_cfg80211.c index 0a61a12..2c1d016 100644 --- a/mxm_wifiex/wlan_src/mlinux/moal_uap_cfg80211.c +++ b/mxm_wifiex/wlan_src/mlinux/moal_uap_cfg80211.c @@ -1859,7 +1859,7 @@ int woal_cfg80211_del_virt_if(struct wiphy *wiphy, struct net_device *dev) priv->phandle->priv_num--; if (dev->reg_state == NETREG_REGISTERED) #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 12, 0) - cfg80211_unregister_netdevice(ndev); + cfg80211_unregister_netdevice(dev); #else unregister_netdevice(dev); #endif @@ -1902,7 +1902,7 @@ void woal_remove_virtual_interface(moal_handle *handle) if (priv->netdev->reg_state == NETREG_REGISTERED) #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 12, 0) - cfg80211_unregister_netdevice(ndev); + cfg80211_unregister_netdevice(priv->netdev); #else unregister_netdevice(priv->netdev); #endif