aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2008-04-03 15:32:54 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-04-08 16:44:41 -0400
commit253898c4170c7f426d1bc32860fee04f27de3ade (patch)
treee016a6e7de609bf6544026b74f7f14dc43b1c595
parentd59f720d88089f2feabe4335839521b26572dc75 (diff)
cfg80211: default to regulatory max power for channel
If the driver does not specify a maximum power output, default to the regulatory max. Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--net/wireless/reg.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 8cc6037eb2ae..185488da2466 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -136,7 +136,10 @@ static void handle_channel(struct ieee80211_channel *chan,
136 chan->flags = flags; 136 chan->flags = flags;
137 chan->max_antenna_gain = min(chan->orig_mag, 137 chan->max_antenna_gain = min(chan->orig_mag,
138 rg->max_antenna_gain); 138 rg->max_antenna_gain);
139 chan->max_power = min(chan->orig_mpwr, rg->max_power); 139 if (chan->orig_mpwr)
140 chan->max_power = min(chan->orig_mpwr, rg->max_power);
141 else
142 chan->max_power = rg->max_power;
140} 143}
141 144
142static void handle_band(struct ieee80211_supported_band *sband, 145static void handle_band(struct ieee80211_supported_band *sband,