diff options
author | alex.bluesman.smirnov@gmail.com <alex.bluesman.smirnov@gmail.com> | 2012-05-15 16:50:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-16 15:16:56 -0400 |
commit | 74a02fcf77dd760176418e1641a8624b26b357a2 (patch) | |
tree | 3b89ae15fb61189a04663783bc2299b3612bfa0e | |
parent | 5b641ebeec348761c9ebac9454c672d4d2d3ef91 (diff) |
mac802154: declare reduced mlme operations
According IEEE 802.15.4 standard each node can be either full functionality
device (FFD) or reduce functionality device (RFD). So 2 sets of operations
are needed. This patch declare RFD operations structure.
Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/net/ieee802154_netdev.h | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/include/net/ieee802154_netdev.h b/include/net/ieee802154_netdev.h index 12a7ee4b855e..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,6 +21,7 @@ | |||
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 |
@@ -112,12 +113,26 @@ struct ieee802154_mlme_ops { | |||
112 | u8 (*get_bsn)(const struct net_device *dev); | 113 | u8 (*get_bsn)(const struct net_device *dev); |
113 | }; | 114 | }; |
114 | 115 | ||
115 | static inline struct ieee802154_mlme_ops *ieee802154_mlme_ops( | 116 | /* The IEEE 802.15.4 standard defines 2 type of the devices: |
116 | 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 | */ | ||
122 | struct ieee802154_reduced_mlme_ops { | ||
123 | struct wpan_phy *(*get_phy)(const struct net_device *dev); | ||
124 | }; | ||
125 | |||
126 | static inline struct ieee802154_mlme_ops * | ||
127 | ieee802154_mlme_ops(const struct net_device *dev) | ||
117 | { | 128 | { |
118 | return dev->ml_priv; | 129 | return dev->ml_priv; |
119 | } | 130 | } |
120 | 131 | ||
121 | #endif | 132 | static inline struct ieee802154_reduced_mlme_ops * |
122 | 133 | ieee802154_reduced_mlme_ops(const struct net_device *dev) | |
134 | { | ||
135 | return dev->ml_priv; | ||
136 | } | ||
123 | 137 | ||
138 | #endif | ||