Commit bf8c1ac6 authored by Jouni Malinen's avatar Jouni Malinen Committed by John W. Linville

nl80211: Change max TX power to be in mBm instead of dBm

In order to be consistent with NL80211_ATTR_POWER_RULE_MAX_EIRP,
change NL80211_FREQUENCY_ATTR_MAX_TX_POWER to use mBm and U32 instead
of dBm and U8. This is a userspace interface change, but the previous
version had not yet been pushed upstream and there are no userspace
programs using this yet, so there is justification to get this change in
as long as it goes in before the previous version gets out.
Signed-off-by: default avatarJouni Malinen <j@w1.fi>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 39d1ffee
...@@ -508,7 +508,8 @@ enum nl80211_band_attr { ...@@ -508,7 +508,8 @@ enum nl80211_band_attr {
* on this channel in current regulatory domain. * on this channel in current regulatory domain.
* @NL80211_FREQUENCY_ATTR_RADAR: Radar detection is mandatory * @NL80211_FREQUENCY_ATTR_RADAR: Radar detection is mandatory
* on this channel in current regulatory domain. * on this channel in current regulatory domain.
* @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in dBm. * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm
* (100 * dBm).
*/ */
enum nl80211_frequency_attr { enum nl80211_frequency_attr {
__NL80211_FREQUENCY_ATTR_INVALID, __NL80211_FREQUENCY_ATTR_INVALID,
......
...@@ -198,8 +198,8 @@ static int nl80211_send_wiphy(struct sk_buff *msg, u32 pid, u32 seq, int flags, ...@@ -198,8 +198,8 @@ static int nl80211_send_wiphy(struct sk_buff *msg, u32 pid, u32 seq, int flags,
if (chan->flags & IEEE80211_CHAN_RADAR) if (chan->flags & IEEE80211_CHAN_RADAR)
NLA_PUT_FLAG(msg, NL80211_FREQUENCY_ATTR_RADAR); NLA_PUT_FLAG(msg, NL80211_FREQUENCY_ATTR_RADAR);
NLA_PUT_U8(msg, NL80211_FREQUENCY_ATTR_MAX_TX_POWER, NLA_PUT_U32(msg, NL80211_FREQUENCY_ATTR_MAX_TX_POWER,
chan->max_power); DBM_TO_MBM(chan->max_power));
nla_nest_end(msg, nl_freq); nla_nest_end(msg, nl_freq);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment