Skip to content

Commit

Permalink
cfg80211: default to regulatory max power for channel
Browse files Browse the repository at this point in the history
If the driver does not specify a maximum power output, default to the
regulatory max.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
John W. Linville committed Apr 8, 2008
1 parent d59f720 commit 253898c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 253898c

Please sign in to comment.