wifi: rtlwifi: use freq_reg_info() under RCU

This will soon be required, because there won't be the
RTNL to protect everything. Use RCU for freq_reg_info().

Link: https://patch.msgid.link/20261006120655.2faed090a837.I556a1b30d7d7fee64edeeefa26996d62be14cfca@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Johannes Berg 2026-10-06 12:04:13 +02:00
parent 3118fac306
commit 04655cc0d2

View File

@ -150,6 +150,8 @@ static void _rtl_reg_apply_beaconing_flags(struct wiphy *wiphy,
(ch->flags & IEEE80211_CHAN_RADAR))
continue;
if (initiator == NL80211_REGDOM_SET_BY_COUNTRY_IE) {
guard(rcu)();
reg_rule = freq_reg_info(wiphy,
ch->center_freq);
if (IS_ERR(reg_rule))
@ -212,6 +214,8 @@ static void _rtl_reg_apply_active_scan_flags(struct wiphy *wiphy,
*custom regulatory domain.
*/
guard(rcu)();
ch = &sband->channels[11]; /* CH 12 */
reg_rule = freq_reg_info(wiphy, ch->center_freq);
if (!IS_ERR(reg_rule)) {