mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
ieee802154: change transmit power to mbm
This patch change the handling of transmit power level from dbm to mbm. This prepares to handle floating point transmit power levels values. The old netlink 802.15.4 will convert the dbm value to mbm for handling backward compatibility. Signed-off-by: Alexander Aring <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
This commit is contained in:
parent
1a19cb680b
commit
e2eb173aaa
5 changed files with 9 additions and 7 deletions
|
|
@ -117,7 +117,7 @@ static int ieee802154_nl_fill_iface(struct sk_buff *msg, u32 portid,
|
|||
rtnl_unlock();
|
||||
|
||||
if (nla_put_s8(msg, IEEE802154_ATTR_TXPOWER,
|
||||
params.transmit_power) ||
|
||||
params.transmit_power / 100) ||
|
||||
nla_put_u8(msg, IEEE802154_ATTR_LBT_ENABLED, params.lbt) ||
|
||||
nla_put_u8(msg, IEEE802154_ATTR_CCA_MODE,
|
||||
params.cca.mode) ||
|
||||
|
|
@ -510,7 +510,7 @@ int ieee802154_set_macparams(struct sk_buff *skb, struct genl_info *info)
|
|||
ops->get_mac_params(dev, ¶ms);
|
||||
|
||||
if (info->attrs[IEEE802154_ATTR_TXPOWER])
|
||||
params.transmit_power = nla_get_s8(info->attrs[IEEE802154_ATTR_TXPOWER]);
|
||||
params.transmit_power = nla_get_s8(info->attrs[IEEE802154_ATTR_TXPOWER]) * 100;
|
||||
|
||||
if (info->attrs[IEEE802154_ATTR_LBT_ENABLED])
|
||||
params.lbt = nla_get_u8(info->attrs[IEEE802154_ATTR_LBT_ENABLED]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue