From: John W. Linville Date: Thu, 3 Apr 2008 19:32:54 +0000 (-0400) Subject: cfg80211: default to regulatory max power for channel X-Git-Tag: v2.6.26-rc1~1138^2~177 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=253898c4170c7f426d1bc32860fee04f27de3ade;p=linux-2.6-omap-h63xx.git 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 --- diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 8cc6037eb2a..185488da246 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -136,7 +136,10 @@ static void handle_channel(struct ieee80211_channel *chan, chan->flags = flags; chan->max_antenna_gain = min(chan->orig_mag, rg->max_antenna_gain); - chan->max_power = min(chan->orig_mpwr, rg->max_power); + if (chan->orig_mpwr) + chan->max_power = min(chan->orig_mpwr, rg->max_power); + else + chan->max_power = rg->max_power; } static void handle_band(struct ieee80211_supported_band *sband,