Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 253898c4 authored by John W. Linville's avatar John W. Linville
Browse files

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: default avatarJohn W. Linville <linville@tuxdriver.com>
parent d59f720d
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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);
	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,