linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3.7 1/2] cfg80211: fix antenna gain handling
@ 2012-10-03 17:51 Felix Fietkau
  2012-10-03 17:51 ` [PATCH 3.7 2/2] cfg80211: fix initialization of chan->max_reg_power Felix Fietkau
  2012-10-05 20:22 ` [PATCH 3.7 1/2] cfg80211: fix antenna gain handling John W. Linville
  0 siblings, 2 replies; 10+ messages in thread
From: Felix Fietkau @ 2012-10-03 17:51 UTC (permalink / raw)
  To: linux-wireless; +Cc: linville, johannes, mcgrof

When not intersecting, orig->chan_mag is initialized to zero. Because of
that, the regulatory antenna gain limit never gets set.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@vger.kernel.org
---
 net/wireless/reg.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 3b8cbbc..1a16f19 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -915,8 +915,7 @@ static void handle_channel(struct wiphy *wiphy,
 
 	chan->beacon_found = false;
 	chan->flags = flags | bw_flags | map_regdom_flags(reg_rule->flags);
-	chan->max_antenna_gain = min(chan->orig_mag,
-		(int) MBI_TO_DBI(power_rule->max_antenna_gain));
+	chan->max_antenna_gain = (int) MBI_TO_DBI(power_rule->max_antenna_gain);
 	chan->max_reg_power = (int) MBM_TO_DBM(power_rule->max_eirp);
 	if (chan->orig_mpwr) {
 		/*
-- 
1.7.9.6 (Apple Git-31.1)


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-10-06 15:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-03 17:51 [PATCH 3.7 1/2] cfg80211: fix antenna gain handling Felix Fietkau
2012-10-03 17:51 ` [PATCH 3.7 2/2] cfg80211: fix initialization of chan->max_reg_power Felix Fietkau
2012-10-05 20:22   ` John W. Linville
2012-10-05 20:22 ` [PATCH 3.7 1/2] cfg80211: fix antenna gain handling John W. Linville
2012-10-05 21:02   ` Arend van Spriel
2012-10-05 23:15     ` Felix Fietkau
2012-10-06  8:01       ` Arend van Spriel
2012-10-06 12:26         ` Felix Fietkau
2012-10-06 14:47           ` Johannes Berg
2012-10-06 15:12             ` Felix Fietkau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).