aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ieee802154_netdev.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/ieee802154_netdev.h')
-rw-r--r--include/net/ieee802154_netdev.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/include/net/ieee802154_netdev.h b/include/net/ieee802154_netdev.h
index 57430555487a..d104c882fc29 100644
--- a/include/net/ieee802154_netdev.h
+++ b/include/net/ieee802154_netdev.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * An interface between IEEE802.15.4 device and rest of the kernel. 2 * An interface between IEEE802.15.4 device and rest of the kernel.
3 * 3 *
4 * Copyright (C) 2007, 2008, 2009 Siemens AG 4 * Copyright (C) 2007-2012 Siemens AG
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 7 * it under the terms of the GNU General Public License version 2
@@ -21,11 +21,14 @@
21 * Maxim Gorbachyov <maxim.gorbachev@siemens.com> 21 * Maxim Gorbachyov <maxim.gorbachev@siemens.com>
22 * Maxim Osipov <maxim.osipov@siemens.com> 22 * Maxim Osipov <maxim.osipov@siemens.com>
23 * Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> 23 * Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
24 * Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
24 */ 25 */
25 26
26#ifndef IEEE802154_NETDEVICE_H 27#ifndef IEEE802154_NETDEVICE_H
27#define IEEE802154_NETDEVICE_H 28#define IEEE802154_NETDEVICE_H
28 29
30#include <net/af_ieee802154.h>
31
29/* 32/*
30 * A control block of skb passed between the ARPHRD_IEEE802154 device 33 * A control block of skb passed between the ARPHRD_IEEE802154 device
31 * and other stack parts. 34 * and other stack parts.
@@ -110,12 +113,26 @@ struct ieee802154_mlme_ops {
110 u8 (*get_bsn)(const struct net_device *dev); 113 u8 (*get_bsn)(const struct net_device *dev);
111}; 114};
112 115
113static inline struct ieee802154_mlme_ops *ieee802154_mlme_ops( 116/* The IEEE 802.15.4 standard defines 2 type of the devices:
114 const struct net_device *dev) 117 * - FFD - full functionality device
118 * - RFD - reduce functionality device
119 *
120 * So 2 sets of mlme operations are needed
121 */
122struct ieee802154_reduced_mlme_ops {
123 struct wpan_phy *(*get_phy)(const struct net_device *dev);
124};
125
126static inline struct ieee802154_mlme_ops *
127ieee802154_mlme_ops(const struct net_device *dev)
115{ 128{
116 return dev->ml_priv; 129 return dev->ml_priv;
117} 130}
118 131
119#endif 132static inline struct ieee802154_reduced_mlme_ops *
120 133ieee802154_reduced_mlme_ops(const struct net_device *dev)
134{
135 return dev->ml_priv;
136}
121 137
138#endif