All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Aring <aar@pengutronix.de>
To: linux-wpan@vger.kernel.org
Cc: kernel@pengutronix.de, jukka.rissanen@linux.intel.com,
	Alexander Aring <aar@pengutronix.de>
Subject: [PATCH bluetooth-next 10/11] 6lowpan: add lowpan_is_ll function
Date: Mon, 11 Apr 2016 11:04:23 +0200	[thread overview]
Message-ID: <1460365464-12435-11-git-send-email-aar@pengutronix.de> (raw)
In-Reply-To: <1460365464-12435-1-git-send-email-aar@pengutronix.de>

This patch adds the lowpan_is_ll function, which can be used to make a
special 6lowpan linklayer handling for a specific 6lowpan linklayer
type.

Signed-off-by: Alexander Aring <aar@pengutronix.de>
---
 net/6lowpan/6lowpan_i.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/net/6lowpan/6lowpan_i.h b/net/6lowpan/6lowpan_i.h
index d16bb4b..97ecc27 100644
--- a/net/6lowpan/6lowpan_i.h
+++ b/net/6lowpan/6lowpan_i.h
@@ -3,6 +3,15 @@
 
 #include <linux/netdevice.h>
 
+#include <net/6lowpan.h>
+
+/* caller need to be sure it's dev->type is ARPHRD_6LOWPAN */
+static inline bool lowpan_is_ll(const struct net_device *dev,
+				enum lowpan_lltypes lltype)
+{
+	return lowpan_dev(dev)->lltype == lltype;
+}
+
 #ifdef CONFIG_6LOWPAN_DEBUGFS
 int lowpan_dev_debugfs_init(struct net_device *dev);
 void lowpan_dev_debugfs_exit(struct net_device *dev);
-- 
2.8.0


  parent reply	other threads:[~2016-04-11  9:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-11  9:04 [PATCH bluetooth-next 00/11] 6lowpan: prepare for 6lowpan ndisc implementation Alexander Aring
2016-04-11  9:04 ` [PATCH bluetooth-next 01/11] ieee802154: cleanups for ieee802154.h Alexander Aring
2016-04-11  9:04 ` [PATCH bluetooth-next 02/11] ieee802154: add short address helpers Alexander Aring
2016-04-11  9:04 ` [PATCH bluetooth-next 03/11] nl802154: avoid address change while running lowpan Alexander Aring
2016-04-11  9:04 ` [PATCH bluetooth-next 04/11] ieee802154: 6lowpan: fix short addr hash Alexander Aring
2016-04-11  9:04 ` [PATCH bluetooth-next 05/11] 6lowpan: change naming for lowpan private data Alexander Aring
2016-04-11 16:54   ` Stefan Schmidt
2016-04-11  9:04 ` [PATCH bluetooth-next 06/11] 6lowpan: move lowpan_802154_dev to 6lowpan Alexander Aring
2016-04-11  9:04 ` [PATCH bluetooth-next 07/11] 6lowpan: iphc: rename add lowpan prefix Alexander Aring
2016-04-11  9:04 ` [PATCH bluetooth-next 08/11] 6lowpan: iphc: remove unnecessary zero data Alexander Aring
2016-04-11  9:04 ` [PATCH bluetooth-next 09/11] 6lowpan: move eui64 uncompress function Alexander Aring
2016-04-11 16:54   ` Stefan Schmidt
2016-04-11  9:04 ` Alexander Aring [this message]
2016-04-11 16:55   ` [PATCH bluetooth-next 10/11] 6lowpan: add lowpan_is_ll function Stefan Schmidt
2016-04-11  9:04 ` [PATCH bluetooth-next 11/11] 6lowpan: move mac802154 header Alexander Aring
2016-04-11 16:55   ` Stefan Schmidt
2016-04-12 11:16 ` [PATCH bluetooth-next 00/11] 6lowpan: prepare for 6lowpan ndisc implementation Jukka Rissanen
2016-04-13  8:42 ` Marcel Holtmann

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=1460365464-12435-11-git-send-email-aar@pengutronix.de \
    --to=aar@pengutronix.de \
    --cc=jukka.rissanen@linux.intel.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-wpan@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.