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 <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2022-01-15 11:42:34 -06:00
parent a2c8a1deda
commit 7ba3df1bcb

View file

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