wifi: rtlwifi: correct unit of center_freq as KHZ passing to freq_reg_info()
Ping-Ke Shih
maintainerPATCH 1/1 wifi: rtlwifi: correct unit of center_freq as KHZ passing to freq_reg_info()
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 <[email protected]>
--- drivers/net/wireless/realtek/rtlwifi/regd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/realtek/rtlwifi/regd.c +3 -3
@@ -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
Signature · 1 line
2.25.1
Ping-Ke Shih
maintainerQuoted 5 lines · Ping-Ke Shih
The unit of argument
center_freqoffreq_reg_info()should be KHz, but it wrongly passesch->center_freqin unit of MHz tofreq_reg_info(). Correct the unit.Signed-off-by Ping-Ke Shih <[email protected]>
1 patch(es) applied to rtw-next branch of rtw.git, thanks.
58729ada8f5d wifi: rtlwifi: correct unit of center_freq as KHZ passing to freq_reg_info()