summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2015-05-17 21:44:40 +0200
committerMarcel Holtmann <marcel@holtmann.org>2015-05-19 11:44:41 +0200
commite2eb173aaacd1a1bcd255d3e74ffb719e47eeadb (patch)
treea0f074e27b399f23a5ca497e3afed3595631d27c /include/net
parent1a19cb680be0d4b06ce9a9d6516b8f45f544d3e8 (diff)
downloadlinux-e2eb173aaacd1a1bcd255d3e74ffb719e47eeadb.tar.bz2
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 'include/net')
-rw-r--r--include/net/cfg802154.h1
-rw-r--r--include/net/mac802154.h4
2 files changed, 3 insertions, 2 deletions
diff --git a/include/net/cfg802154.h b/include/net/cfg802154.h
index 47804cddb46f..b5b3f9f43084 100644
--- a/include/net/cfg802154.h
+++ b/include/net/cfg802154.h
@@ -85,6 +85,7 @@ struct wpan_phy {
u8 current_channel;
u8 current_page;
u32 channels_supported[IEEE802154_MAX_PAGE + 1];
+ /* current transmit_power in mBm */
s32 transmit_power;
struct wpan_phy_cca cca;
diff --git a/include/net/mac802154.h b/include/net/mac802154.h
index 400e4e85c53f..e863a8557c0a 100644
--- a/include/net/mac802154.h
+++ b/include/net/mac802154.h
@@ -171,7 +171,7 @@ struct ieee802154_hw {
* Returns either zero, or negative errno.
*
* set_txpower:
- * Set radio transmit power in dB. Called with pib_lock held.
+ * Set radio transmit power in mBm. Called with pib_lock held.
* Returns either zero, or negative errno.
*
* set_lbt
@@ -213,7 +213,7 @@ struct ieee802154_ops {
int (*set_hw_addr_filt)(struct ieee802154_hw *hw,
struct ieee802154_hw_addr_filt *filt,
unsigned long changed);
- int (*set_txpower)(struct ieee802154_hw *hw, s32 dbm);
+ int (*set_txpower)(struct ieee802154_hw *hw, s32 mbm);
int (*set_lbt)(struct ieee802154_hw *hw, bool on);
int (*set_cca_mode)(struct ieee802154_hw *hw,
const struct wpan_phy_cca *cca);