Skip to contentSkip to conversation

6lowpan: header cleanup

PATCH In review Alexander Aring 3 participants 4 messages Mar 5, 2014 – Mar 6, 2014 1 message not in the archive

Subsystems (6)
lore
Share & tools
lore

Alexander Aring

author maintainer
#0 lore raw

cover 6lowpan: header cleanup

Hi,

this patch series fix a missing include of 6LoWPAN header and move it into the include/net directory. Since we did some code sharing with bluetooth 6LoWPAN the header turns into a generic header for 6LoWPAN. Instead to use a relative path in bluetooth 6LoWPAN we can now use include <net/6lowpan.h>.

- Alex

Alexander Aring (2):
6lowpan: add missing include of net/ipv6.h
6lowpan: move 6lowpan header to include/net

 {net/ieee802154 => include/net}/6lowpan.h | 2 ++
 net/bluetooth/6lowpan.c                   | 2 +-
 net/ieee802154/6lowpan_iphc.c             | 3 +--
 net/ieee802154/6lowpan_rtnl.c             | 2 +-
 net/ieee802154/reassembly.c               | 2 +-
 5 files changed, 6 insertions(+), 5 deletions(-)
 rename {net/ieee802154 => include/net}/6lowpan.h (99%)
Signature · 1 line
1.9.0
author maintainer
#1 lore raw

PATCH 1/2 6lowpan: add missing include of net/ipv6.h

The 6lowpan.h file contains some static inline function which use internal ipv6 api structs. Add a include of ipv6.h to be sure that it's known before.

---
 net/ieee802154/6lowpan.h | 2 ++
 1 file changed, 2 insertions(+)
net/ieee802154/6lowpan.h +2 -0
index 0dccf62..f7d372b 100644
@@ -53,6 +53,8 @@
 #ifndef __6LOWPAN_H__
 #define __6LOWPAN_H__
 
+#include <net/ipv6.h>
+
 #define UIP_802154_SHORTADDR_LEN	2  /* compressed ipv6 address length */
 #define UIP_IPH_LEN			40 /* ipv6 fixed header size */
 #define UIP_PROTO_UDP			17 /* ipv6 next header value for UDP */
Signature · 1 line
1.9.0

A message that is not in the archive (sent off-list or not yet received): 1394026145-18981-1-git-send-email-alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#3 lore raw

PATCH 2/2 6lowpan: move 6lowpan header to include/net

This header is used by bluetooth and ieee802154 branch. This patch move this header to the include/net directory to avoid a use of a relative path in include.

---
 {net/ieee802154 => include/net}/6lowpan.h | 0
 net/bluetooth/6lowpan.c                   | 2 +-
 net/ieee802154/6lowpan_iphc.c             | 3 +--
 net/ieee802154/6lowpan_rtnl.c             | 2 +-
 net/ieee802154/reassembly.c               | 2 +-
 5 files changed, 4 insertions(+), 5 deletions(-)
 rename {net/ieee802154 => include/net}/6lowpan.h (100%)
include/net/6lowpan.h renamed from net/ieee802154/6lowpan.h +0 -0
similarity index 100%
rename from net/ieee802154/6lowpan.h
rename to include/net/6lowpan.h
net/bluetooth/6lowpan.c +1 -1
index adb3ea0..73492b9 100644
@@ -27,7 +27,7 @@
 
 #include "6lowpan.h"
 
-#include "../ieee802154/6lowpan.h" /* for the compression support */
+#include <net/6lowpan.h> /* for the compression support */
 
 #define IFACE_NAME_TEMPLATE "bt%d"
 #define EUI64_ADDR_LEN 8
net/ieee802154/6lowpan_iphc.c +1 -2
index 860aa2d..211b568 100644
@@ -54,11 +54,10 @@
 #include <linux/if_arp.h>
 #include <linux/module.h>
 #include <linux/netdevice.h>
+#include <net/6lowpan.h>
 #include <net/ipv6.h>
 #include <net/af_ieee802154.h>
 
-#include "6lowpan.h"
-
 /*
  * Uncompress address function for source and
  * destination address(non-multicast).
net/ieee802154/6lowpan_rtnl.c +1 -1
index e472618..1bbab89 100644
@@ -52,10 +52,10 @@
 #include <net/af_ieee802154.h>
 #include <net/ieee802154.h>
 #include <net/ieee802154_netdev.h>
+#include <net/6lowpan.h>
 #include <net/ipv6.h>
 
 #include "reassembly.h"
-#include "6lowpan.h"
 
 static LIST_HEAD(lowpan_devices);
 
net/ieee802154/reassembly.c +1 -1
index 4511fc2..1cc2336 100644
@@ -24,10 +24,10 @@
 #include <linux/export.h>
 
 #include <net/ieee802154_netdev.h>
+#include <net/6lowpan.h>
 #include <net/ipv6.h>
 #include <net/inet_frag.h>
 
-#include "6lowpan.h"
 #include "reassembly.h"
 
 static struct inet_frags lowpan_frags;
Signature · 1 line
1.9.0
maintainer
#4 lore raw
In reply to Alexander Aring

From: Alexander Aring <[email protected]>
Date: Wed, 5 Mar 2014 14:29:03 +0100

Quoted 5 lines

this patch series fix a missing include of 6LoWPAN header and move it into the include/net directory. Since we did some code sharing with bluetooth 6LoWPAN the header turns into a generic header for 6LoWPAN. Instead to use a relative path in bluetooth 6LoWPAN we can now use include <net/6lowpan.h>.

Series applied, thanks Alex.