aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/mac802154.h
diff options
context:
space:
mode:
authorPhoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>2014-02-17 11:34:14 +0100
committerDavid S. Miller <davem@davemloft.net>2014-02-17 16:42:39 -0500
commit4244db1b0b7bc9ab7b67d8c1c38de6cf15bc87a8 (patch)
treec729b4b8546421f0f17fd5e9bee0820e2335882d /include/net/mac802154.h
parentieee802154: ensure that first RF212 state comes from TRX_OFF (diff)
downloadlinux-dev-4244db1b0b7bc9ab7b67d8c1c38de6cf15bc87a8.tar.xz
linux-dev-4244db1b0b7bc9ab7b67d8c1c38de6cf15bc87a8.zip
ieee802154: add netlink APIs for smartMAC configuration
Introduce new netlink attributes for SET_PHY_ATTRS: * CSMA minimal backoff exponent * CSMA maximal backoff exponent * CSMA retry limit * frame retransmission limit The CSMA attributes shall correspond to minBE, maxBE and maxCSMABackoffs of 802.15.4, respectively. The frame retransmission shall correspond to maxFrameRetries of 802.15.4, unless given as -1: then the old behaviour of the stack shall apply. For RF2xy, the old behaviour is to not do channel sensing at all and simply send *right now*, which is not intended behaviour for most applications and actually prohibited for some channel/page combinations. For all values except frame retransmission limit, the defaults of 802.15.4 apply. Frame retransmission limits are set to -1 to indicate backward-compatible behaviour. 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.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/net/mac802154.h b/include/net/mac802154.h
index 15fe6bca80f0..8ca3d04e7558 100644
--- a/include/net/mac802154.h
+++ b/include/net/mac802154.h
@@ -131,6 +131,14 @@ struct ieee802154_dev {
* Sets the CCA energy detection threshold in dBm. Called with pib_lock
* held.
* Returns either zero, or negative errno.
+ *
+ * set_csma_params
+ * Sets the CSMA parameter set for the PHY. Called with pib_lock held.
+ * Returns either zero, or negative errno.
+ *
+ * set_frame_retries
+ * Sets the retransmission attempt limit. Called with pib_lock held.
+ * Returns either zero, or negative errno.
*/
struct ieee802154_ops {
struct module *owner;
@@ -152,6 +160,10 @@ struct ieee802154_ops {
int (*set_cca_mode)(struct ieee802154_dev *dev, u8 mode);
int (*set_cca_ed_level)(struct ieee802154_dev *dev,
s32 level);
+ int (*set_csma_params)(struct ieee802154_dev *dev,
+ u8 min_be, u8 max_be, u8 retries);
+ int (*set_frame_retries)(struct ieee802154_dev *dev,
+ s8 retries);
};
/* Basic interface to register ieee802154 device */