summaryrefslogtreecommitdiff
path: root/drivers/net/ieee802154/at86rf230.c
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2015-05-17 22:44:40 +0300
committerMarcel Holtmann <marcel@holtmann.org>2015-05-19 12:44:41 +0300
commite2eb173aaacd1a1bcd255d3e74ffb719e47eeadb (patch)
treea0f074e27b399f23a5ca497e3afed3595631d27c /drivers/net/ieee802154/at86rf230.c
parent1a19cb680be0d4b06ce9a9d6516b8f45f544d3e8 (diff)
downloadlinux-e2eb173aaacd1a1bcd255d3e74ffb719e47eeadb.tar.xz
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 <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/net/ieee802154/at86rf230.c')
-rw-r--r--drivers/net/ieee802154/at86rf230.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c
index 02b6bb72304d..3a303e4a3c07 100644
--- a/drivers/net/ieee802154/at86rf230.c
+++ b/drivers/net/ieee802154/at86rf230.c
@@ -1194,9 +1194,10 @@ at86rf230_set_hw_addr_filt(struct ieee802154_hw *hw,
}
static int
-at86rf230_set_txpower(struct ieee802154_hw *hw, s32 db)
+at86rf230_set_txpower(struct ieee802154_hw *hw, s32 mbm)
{
struct at86rf230_local *lp = hw->priv;
+ s8 db = mbm / 100;
/* typical maximum output is 5dBm with RG_PHY_TX_PWR 0x60, lower five
* bits decrease power in 1dB steps. 0x60 represents extra PA gain of