* [PATCH rtw-next] wifi: rtlwifi: correct unit of center_freq as KHZ passing to freq_reg_info()
@ 2026-10-13 2:32 Ping-Ke Shih
0 siblings, 0 replies; only message in thread
From: Ping-Ke Shih @ 2026-10-13 2:32 UTC (permalink / raw)
To: linux-wireless
The unit of argument center_freq of freq_reg_info() should be KHz, but it
wrongly passes ch->center_freq in unit of MHz to freq_reg_info(). Correct
the unit.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtlwifi/regd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtlwifi/regd.c b/drivers/net/wireless/realtek/rtlwifi/regd.c
index 503625b50fc3..2e4c60886c1e 100644
--- a/drivers/net/wireless/realtek/rtlwifi/regd.c
+++ b/drivers/net/wireless/realtek/rtlwifi/regd.c
@@ -153,7 +153,7 @@ static void _rtl_reg_apply_beaconing_flags(struct wiphy *wiphy,
guard(rcu)();
reg_rule = freq_reg_info(wiphy,
- ch->center_freq);
+ MHZ_TO_KHZ(ch->center_freq));
if (IS_ERR(reg_rule))
continue;
/*
@@ -217,7 +217,7 @@ static void _rtl_reg_apply_active_scan_flags(struct wiphy *wiphy,
guard(rcu)();
ch = &sband->channels[11]; /* CH 12 */
- reg_rule = freq_reg_info(wiphy, ch->center_freq);
+ reg_rule = freq_reg_info(wiphy, MHZ_TO_KHZ(ch->center_freq));
if (!IS_ERR(reg_rule)) {
if (!(reg_rule->flags & NL80211_RRF_PASSIVE_SCAN))
if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
@@ -225,7 +225,7 @@ static void _rtl_reg_apply_active_scan_flags(struct wiphy *wiphy,
}
ch = &sband->channels[12]; /* CH 13 */
- reg_rule = freq_reg_info(wiphy, ch->center_freq);
+ reg_rule = freq_reg_info(wiphy, MHZ_TO_KHZ(ch->center_freq));
if (!IS_ERR(reg_rule)) {
if (!(reg_rule->flags & NL80211_RRF_PASSIVE_SCAN))
if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
base-commit: fbfa27d9b06f025c5f2cfa79d0e01e6400eeff2a
--
2.25.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-13 2:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-13 2:32 [PATCH rtw-next] wifi: rtlwifi: correct unit of center_freq as KHZ passing to freq_reg_info() Ping-Ke Shih
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox