提交 279f0f55 编写于 作者: F Felix Fietkau 提交者: Johannes Berg

cfg80211: fix initialization of chan->max_reg_power

A few places touch chan->max_power based on updated tx power rules, but
forget to do the same to chan->max_reg_power.
Signed-off-by: NFelix Fietkau <nbd@openwrt.org>
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 c4a9fafc
...@@ -908,7 +908,7 @@ static void handle_channel(struct wiphy *wiphy, ...@@ -908,7 +908,7 @@ static void handle_channel(struct wiphy *wiphy,
map_regdom_flags(reg_rule->flags) | bw_flags; map_regdom_flags(reg_rule->flags) | bw_flags;
chan->max_antenna_gain = chan->orig_mag = chan->max_antenna_gain = chan->orig_mag =
(int) MBI_TO_DBI(power_rule->max_antenna_gain); (int) MBI_TO_DBI(power_rule->max_antenna_gain);
chan->max_power = chan->orig_mpwr = chan->max_reg_power = chan->max_power = chan->orig_mpwr =
(int) MBM_TO_DBM(power_rule->max_eirp); (int) MBM_TO_DBM(power_rule->max_eirp);
return; return;
} }
...@@ -1331,7 +1331,8 @@ static void handle_channel_custom(struct wiphy *wiphy, ...@@ -1331,7 +1331,8 @@ static void handle_channel_custom(struct wiphy *wiphy,
chan->flags |= map_regdom_flags(reg_rule->flags) | bw_flags; chan->flags |= map_regdom_flags(reg_rule->flags) | bw_flags;
chan->max_antenna_gain = (int) MBI_TO_DBI(power_rule->max_antenna_gain); chan->max_antenna_gain = (int) MBI_TO_DBI(power_rule->max_antenna_gain);
chan->max_power = (int) MBM_TO_DBM(power_rule->max_eirp); chan->max_reg_power = chan->max_power =
(int) MBM_TO_DBM(power_rule->max_eirp);
} }
static void handle_band_custom(struct wiphy *wiphy, enum ieee80211_band band, static void handle_band_custom(struct wiphy *wiphy, enum ieee80211_band band,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册