diff options
author | Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> | 2014-02-17 11:34:11 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-02-17 16:42:38 -0500 |
commit | ba08fea53a43e02b590d89224afdad976dece841 (patch) | |
tree | b7cfcfcfc9b923360c477e55df12a501eda169b0 /include | |
parent | 84dda3c648fd55898064d76366b14f964cdc9d16 (diff) |
ieee802154: add support for CCA mode in wpan phys
The standard describes four modes of clear channel assesment: "energy
above threshold", "carrier found", and the logical and/or of these two.
Support for CCA mode setting is included in the at86rf230 driver,
predicated for RF212 chips.
Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/nl802154.h | 1 | ||||
-rw-r--r-- | include/net/mac802154.h | 5 | ||||
-rw-r--r-- | include/net/wpan-phy.h | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/nl802154.h b/include/linux/nl802154.h index 326baee227f..5edefc14bd8 100644 --- a/include/linux/nl802154.h +++ b/include/linux/nl802154.h @@ -72,6 +72,7 @@ enum { IEEE802154_ATTR_TXPOWER, IEEE802154_ATTR_LBT_ENABLED, + IEEE802154_ATTR_CCA_MODE, __IEEE802154_ATTR_MAX, }; diff --git a/include/net/mac802154.h b/include/net/mac802154.h index 521edcb0e58..1a98e5014e6 100644 --- a/include/net/mac802154.h +++ b/include/net/mac802154.h @@ -122,6 +122,10 @@ struct ieee802154_dev { * Enables or disables listen before talk on the device. Called with * pib_lock held. * Returns either zero, or negative errno. + * + * set_cca_mode + * Sets the CCA mode used by the device. Called with pib_lock held. + * Returns either zero, or negative errno. */ struct ieee802154_ops { struct module *owner; @@ -140,6 +144,7 @@ struct ieee802154_ops { u8 addr[IEEE802154_ADDR_LEN]); 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); }; /* Basic interface to register ieee802154 device */ diff --git a/include/net/wpan-phy.h b/include/net/wpan-phy.h index 804e6c4f5f8..03b59051972 100644 --- a/include/net/wpan-phy.h +++ b/include/net/wpan-phy.h @@ -58,6 +58,7 @@ struct wpan_phy { int (*set_txpower)(struct wpan_phy *phy, int db); int (*set_lbt)(struct wpan_phy *phy, bool on); + int (*set_cca_mode)(struct wpan_phy *phy, u8 cca_mode); char priv[0] __attribute__((__aligned__(NETDEV_ALIGN))); }; |