From 7ba3df1bcb7a7735a9271e05c0368ceb3d03ea5a Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Sat, 15 Jan 2022 11:42:34 -0600 Subject: [PATCH] rtl8188eu: Fix lockup on start Kernel commit 51d62f2f2c50 ("cfg80211: Save the regulatory domain with a lock") caused a lock dependency to the cfg80211 version of this driver. It is fixed by moving the regulatory domain initialization call so that it is outside the lock in the probe routine. See https://github.com/lwfinger/rtl8188eu/issues/386 for further discussion. Signed-off-by: Georg Mueller Signed-off-by: Larry Finger --- ioctl_cfg80211.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ioctl_cfg80211.c b/ioctl_cfg80211.c index 1d7ff70..0e629a2 100644 --- a/ioctl_cfg80211.c +++ b/ioctl_cfg80211.c @@ -6514,9 +6514,6 @@ void rtw_cfg80211_init_wiphy(_adapter *padapter) rtw_cfg80211_init_ht_capab(padapter, &bands->ht_cap, NL80211_BAND_5GHZ, rf_type); } #endif - /* init regulary domain */ - rtw_regd_init(padapter); - /* copy mac_addr to wiphy */ memcpy(wiphy->perm_addr, adapter_mac_addr(padapter), ETH_ALEN); @@ -6928,6 +6925,9 @@ int rtw_wdev_alloc(_adapter *padapter, struct wiphy *wiphy) ATOMIC_SET(&pwdev_priv->switch_ch_to, 1); #endif + /* init regulary domain */ + rtw_regd_init(padapter); + exit: return ret; }