From: Felix Fietkau Date: Wed, 17 Oct 2012 11:56:20 +0000 (+0200) Subject: cfg80211: fix initialization of chan->max_reg_power X-Git-Tag: upstream/snapshot3+hdmi~6176^2~2^2~4^2~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=279f0f55249820d8129470c0e104084b252f26f3;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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: Felix Fietkau Signed-off-by: Johannes Berg --- diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 3b8cbbc..bcc7d7e 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -908,7 +908,7 @@ static void handle_channel(struct wiphy *wiphy, map_regdom_flags(reg_rule->flags) | bw_flags; chan->max_antenna_gain = chan->orig_mag = (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); return; } @@ -1331,7 +1331,8 @@ static void handle_channel_custom(struct wiphy *wiphy, 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_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,