summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2015-05-17 22:44:41 +0300
committerMarcel Holtmann <marcel@holtmann.org>2015-05-19 12:44:42 +0300
commit32b23550ad64d9676f2218b3d5de46bacf98ef1d (patch)
treeb6c2c1523a886fd89cb12a04c46e02787641f26b /drivers
parente2eb173aaacd1a1bcd255d3e74ffb719e47eeadb (diff)
downloadlinux-32b23550ad64d9676f2218b3d5de46bacf98ef1d.tar.xz
ieee802154: change cca ed level to mbm
This patch change the handling of cca energy detection level from dbm to mbm. This prepares to handle floating point cca energy detection 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')
-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 3a303e4a3c07..e68d45ed622e 100644
--- a/drivers/net/ieee802154/at86rf230.c
+++ b/drivers/net/ieee802154/at86rf230.c
@@ -1268,9 +1268,10 @@ at86rf23x_get_desens_steps(struct at86rf230_local *lp, s32 level)
}
static int
-at86rf230_set_cca_ed_level(struct ieee802154_hw *hw, s32 level)
+at86rf230_set_cca_ed_level(struct ieee802154_hw *hw, s32 mbm)
{
struct at86rf230_local *lp = hw->priv;
+ s32 level = mbm / 100;
if (level < lp->data->rssi_base_val || level > 30)
return -EINVAL;