提交 253898c4 编写于 作者: J John W. Linville

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: NJohn W. Linville <linville@tuxdriver.com>
上级 d59f720d
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册