From: Felix Fietkau <nbd@openwrt.org>
To: linux-wireless@vger.kernel.org
Cc: linville@tuxdriver.com, mcgrof@qca.qualcomm.com,
johannes@sipsolutions.net, arend@broadcom.com
Subject: [PATCH v2 3.7 2/2] cfg80211: fix initialization of chan->max_reg_power
Date: Sat, 6 Oct 2012 14:40:54 +0200 [thread overview]
Message-ID: <1349527254-41080-2-git-send-email-nbd@openwrt.org> (raw)
In-Reply-To: <1349527254-41080-1-git-send-email-nbd@openwrt.org>
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 <nbd@openwrt.org>
Cc: stable@vger.kernel.org
---
net/wireless/reg.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
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,
--
1.7.9.6 (Apple Git-31.1)
next prev parent reply other threads:[~2012-10-06 12:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-06 12:40 [PATCH v2 3.7 1/2] cfg80211: fix antenna gain handling Felix Fietkau
2012-10-06 12:40 ` Felix Fietkau [this message]
2012-10-08 19:01 ` [PATCH v2 3.7 2/2] cfg80211: fix initialization of chan->max_reg_power Luis R. Rodriguez
2012-10-08 21:01 ` Felix Fietkau
2012-10-09 0:12 ` Luis R. Rodriguez
2012-10-08 18:37 ` [PATCH v2 3.7 1/2] cfg80211: fix antenna gain handling Luis R. Rodriguez
2012-10-08 20:52 ` Felix Fietkau
2012-10-09 1:00 ` Luis R. Rodriguez
2012-10-09 9:49 ` Felix Fietkau
2012-10-09 18:43 ` Luis R. Rodriguez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1349527254-41080-2-git-send-email-nbd@openwrt.org \
--to=nbd@openwrt.org \
--cc=arend@broadcom.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mcgrof@qca.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox