summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2015-05-17 15:44:40 -0400
committerMarcel Holtmann <marcel@holtmann.org>2015-05-19 05:44:41 -0400
commite2eb173aaacd1a1bcd255d3e74ffb719e47eeadb (patch)
treea0f074e27b399f23a5ca497e3afed3595631d27c /drivers/net
parent1a19cb680be0d4b06ce9a9d6516b8f45f544d3e8 (diff)
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')
-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,
1194} 1194}
1195 1195
1196static int 1196static int
1197at86rf230_set_txpower(struct ieee802154_hw *hw, s32 db) 1197at86rf230_set_txpower(struct ieee802154_hw *hw, s32 mbm)
1198{ 1198{
1199 struct at86rf230_local *lp = hw->priv; 1199 struct at86rf230_local *lp = hw->priv;
1200 s8 db = mbm / 100;
1200 1201
1201 /* typical maximum output is 5dBm with RG_PHY_TX_PWR 0x60, lower five 1202 /* typical maximum output is 5dBm with RG_PHY_TX_PWR 0x60, lower five
1202 * bits decrease power in 1dB steps. 0x60 represents extra PA gain of 1203 * bits decrease power in 1dB steps. 0x60 represents extra PA gain of