Commit 74a02fcf authored by alex.bluesman.smirnov@gmail.com's avatar alex.bluesman.smirnov@gmail.com Committed by David S. Miller

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: default avatarAlexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5b641ebe
/* /*
* An interface between IEEE802.15.4 device and rest of the kernel. * An interface between IEEE802.15.4 device and rest of the kernel.
* *
* Copyright (C) 2007, 2008, 2009 Siemens AG * Copyright (C) 2007-2012 Siemens AG
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 * it under the terms of the GNU General Public License version 2
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
* Maxim Gorbachyov <maxim.gorbachev@siemens.com> * Maxim Gorbachyov <maxim.gorbachev@siemens.com>
* Maxim Osipov <maxim.osipov@siemens.com> * Maxim Osipov <maxim.osipov@siemens.com>
* Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> * Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
* Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
*/ */
#ifndef IEEE802154_NETDEVICE_H #ifndef IEEE802154_NETDEVICE_H
...@@ -112,12 +113,26 @@ struct ieee802154_mlme_ops { ...@@ -112,12 +113,26 @@ struct ieee802154_mlme_ops {
u8 (*get_bsn)(const struct net_device *dev); u8 (*get_bsn)(const struct net_device *dev);
}; };
static inline struct ieee802154_mlme_ops *ieee802154_mlme_ops( /* The IEEE 802.15.4 standard defines 2 type of the devices:
const struct net_device *dev) * - FFD - full functionality device
* - RFD - reduce functionality device
*
* So 2 sets of mlme operations are needed
*/
struct ieee802154_reduced_mlme_ops {
struct wpan_phy *(*get_phy)(const struct net_device *dev);
};
static inline struct ieee802154_mlme_ops *
ieee802154_mlme_ops(const struct net_device *dev)
{ {
return dev->ml_priv; return dev->ml_priv;
} }
#endif static inline struct ieee802154_reduced_mlme_ops *
ieee802154_reduced_mlme_ops(const struct net_device *dev)
{
return dev->ml_priv;
}
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment