summaryrefslogtreecommitdiffstats
path: root/include/net/mac802154.h
diff options
context:
space:
mode:
authorPhoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>2014-02-17 11:34:12 +0100
committerDavid S. Miller <davem@davemloft.net>2014-02-17 22:42:38 +0100
commit6ca001978dce0d50ebac01a38d6287f241a520c6 (patch)
tree2ed75aadbfb16ca006a2cd94bc30ebf614783ffc /include/net/mac802154.h
parentieee802154: add support for CCA mode in wpan phys (diff)
downloadlinux-6ca001978dce0d50ebac01a38d6287f241a520c6.tar.xz
linux-6ca001978dce0d50ebac01a38d6287f241a520c6.zip
ieee802154: add support for setting CCA energy detection levels
Since three of the four clear channel assesment modes make use of energy detection, provide an API to set the energy detection threshold. Driver support for this is available in at86rf230 for the RF212 chips. Since for these chips the minimal energy detection threshold depends on page and channel used, add a field to struct at86rf230_local that stores the minimal threshold. Actual ED thresholds are configured as offsets from this value. For RF212, setting the ED threshold will not work before a channel/page has been set due to the dependency of energy detection in the chip and the actual channel/page selected. Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/mac802154.h')
-rw-r--r--include/net/mac802154.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/net/mac802154.h b/include/net/mac802154.h
index 1a98e5014e66..15fe6bca80f0 100644
--- a/include/net/mac802154.h
+++ b/include/net/mac802154.h
@@ -126,6 +126,11 @@ struct ieee802154_dev {
* set_cca_mode
* Sets the CCA mode used by the device. Called with pib_lock held.
* Returns either zero, or negative errno.
+ *
+ * set_cca_ed_level
+ * Sets the CCA energy detection threshold in dBm. Called with pib_lock
+ * held.
+ * Returns either zero, or negative errno.
*/
struct ieee802154_ops {
struct module *owner;
@@ -145,6 +150,8 @@ struct ieee802154_ops {
int (*set_txpower)(struct ieee802154_dev *dev, int db);
int (*set_lbt)(struct ieee802154_dev *dev, bool on);
int (*set_cca_mode)(struct ieee802154_dev *dev, u8 mode);
+ int (*set_cca_ed_level)(struct ieee802154_dev *dev,
+ s32 level);
};
/* Basic interface to register ieee802154 device */