All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, dbaryshkov@gmail.com,
	Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Subject: [PATCH net-next v5 05/13] mac802154: declare reduced mlme operations
Date: Wed, 16 May 2012 10:50:23 +0400	[thread overview]
Message-ID: <1337151031-5178-6-git-send-email-alex.bluesman.smirnov@gmail.com> (raw)
In-Reply-To: <1337151031-5178-1-git-send-email-alex.bluesman.smirnov@gmail.com>

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>
---
 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 12a7ee4..d104c88 100644
--- a/include/net/ieee802154_netdev.h
+++ b/include/net/ieee802154_netdev.h
@@ -1,7 +1,7 @@
 /*
  * 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
  * it under the terms of the GNU General Public License version 2
@@ -21,6 +21,7 @@
  * Maxim Gorbachyov <maxim.gorbachev@siemens.com>
  * Maxim Osipov <maxim.osipov@siemens.com>
  * Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
+ * Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
  */
 
 #ifndef IEEE802154_NETDEVICE_H
@@ -112,12 +113,26 @@ struct ieee802154_mlme_ops {
 	u8 (*get_bsn)(const struct net_device *dev);
 };
 
-static inline struct ieee802154_mlme_ops *ieee802154_mlme_ops(
-		const struct net_device *dev)
+/* The IEEE 802.15.4 standard defines 2 type of the devices:
+ * - 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;
 }
 
-#endif
-
+static inline struct ieee802154_reduced_mlme_ops *
+ieee802154_reduced_mlme_ops(const struct net_device *dev)
+{
+	return dev->ml_priv;
+}
 
+#endif
-- 
1.7.2.3

  parent reply	other threads:[~2012-05-16  6:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-16  6:50 [PATCH net-next v5 0/13] basic ieee802.15.4 mac support Alexander Smirnov
2012-05-16  6:50 ` [PATCH net-next v5 01/13] mac802154: basic ieee802.15.4 device structures Alexander Smirnov
2012-05-16  6:50 ` [PATCH net-next v5 02/13] mac802154: allocation of ieee802154 device Alexander Smirnov
2012-05-16  6:50 ` [PATCH net-next v5 03/13] mac802154: RX data path Alexander Smirnov
2012-05-16  6:50 ` [PATCH net-next v5 04/13] mac802154: TX " Alexander Smirnov
2012-05-16  6:50 ` Alexander Smirnov [this message]
2012-05-16  6:50 ` [PATCH net-next v5 06/13] mac802154: slave interfaces declaration Alexander Smirnov
2012-05-16  6:50 ` [PATCH net-next v5 07/13] mac802154: basic MAC commands interface support Alexander Smirnov
2012-05-16  6:50 ` [PATCH net-next v5 08/13] mac802154: basic mib support Alexander Smirnov
2012-05-16  6:50 ` [PATCH net-next v5 09/13] ieee802154: interface type to be added Alexander Smirnov
2012-05-16  6:50 ` [PATCH net-next v5 10/13] mac802154: slaves management support Alexander Smirnov
2012-05-16  6:50 ` [PATCH net-next v5 11/13] mac802154: monitor device support Alexander Smirnov
2012-05-16  6:50 ` [PATCH net-next v5 12/13] drivers/ieee802154: IEEE 802.15.4 loopback driver Alexander Smirnov
2012-05-16  6:50 ` [PATCH net-next v5 13/13] Documentation/networking/ieee802154: update MAC chapter Alexander Smirnov
2012-05-16 19:34 ` [PATCH net-next v5 0/13] basic ieee802.15.4 mac support David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1337151031-5178-6-git-send-email-alex.bluesman.smirnov@gmail.com \
    --to=alex.bluesman.smirnov@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dbaryshkov@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.