ieee802154: structural directory changes
Subsystems (2)
Alexander Aring
maintainercover ieee802154: structural directory changes
This patch series contains structural changes according the ieee802154 directory. The current situation is that this directory contains stuff about ieee802154 6lowpan, ieee802154 address family and netlink interface. This patch series introduce now sub directories for 6lowpan and af802154 implementation to getting a better overview about these implementations. The ieee802154 directory contains stuff for nl802154, netlink and sysfs only.
Alexander Aring (5):
ieee802154: create af802154 sub-directory
ieee802154: af802154: rename internal header
ieee802154: af802154: rename af_ieee802154 to core
ieee802154: create 6lowpan sub-directory
ieee802154: 6lowpan: rename internal header
net/ieee802154/{reassembly.h => 6lowpan/6lowpan_i.h} | 6 +++---
net/ieee802154/{ => 6lowpan}/6lowpan_rtnl.c | 2 +-
net/ieee802154/6lowpan/Makefile | 3 +++
net/ieee802154/{ => 6lowpan}/reassembly.c | 2 +-
net/ieee802154/Makefile | 6 ++----
net/ieee802154/af802154/Makefile | 3 +++
net/ieee802154/{af802154.h => af802154/af802154_i.h} | 6 +++---
net/ieee802154/{af_ieee802154.c => af802154/core.c} | 2 +-
net/ieee802154/{ => af802154}/dgram.c | 2 +-
net/ieee802154/{ => af802154}/raw.c | 2 +-
10 files changed, 19 insertions(+), 15 deletions(-)
rename net/ieee802154/{reassembly.h => 6lowpan/6lowpan_i.h} (85%)
rename net/ieee802154/{ => 6lowpan}/6lowpan_rtnl.c (99%)
create mode 100644 net/ieee802154/6lowpan/Makefile
rename net/ieee802154/{ => 6lowpan}/reassembly.c (99%)
create mode 100644 net/ieee802154/af802154/Makefile
rename net/ieee802154/{af802154.h => af802154/af802154_i.h} (93%)
rename net/ieee802154/{af_ieee802154.c => af802154/core.c} (99%)
rename net/ieee802154/{ => af802154}/dgram.c (99%)
rename net/ieee802154/{ => af802154}/raw.c (99%)Signature · 1 line
2.2.0
Alexander Aring
maintainerPATCH 1/5 ieee802154: create af802154 sub-directory
This patch creates an af802154 sub-directory inside ieee802154. Additional we move all af802154 relevant files into this sub-directory instead of placeing the address family files inside ieee802154.
---
net/ieee802154/Makefile | 3 +--
net/ieee802154/af802154/Makefile | 3 +++
net/ieee802154/{ => af802154}/af802154.h | 0
net/ieee802154/{ => af802154}/af_ieee802154.c | 0
net/ieee802154/{ => af802154}/dgram.c | 0
net/ieee802154/{ => af802154}/raw.c | 0
6 files changed, 4 insertions(+), 2 deletions(-)
create mode 100644 net/ieee802154/af802154/Makefile
rename net/ieee802154/{ => af802154}/af802154.h (100%)
rename net/ieee802154/{ => af802154}/af_ieee802154.c (100%)
rename net/ieee802154/{ => af802154}/dgram.c (100%)
rename net/ieee802154/{ => af802154}/raw.c (100%)net/ieee802154/Makefile +1 -2
@@ -1,9 +1,8 @@ -obj-$(CONFIG_IEEE802154) += ieee802154.o af_802154.o +obj-$(CONFIG_IEEE802154) += ieee802154.o af802154/ obj-$(CONFIG_IEEE802154_6LOWPAN) += ieee802154_6lowpan.o ieee802154_6lowpan-y := 6lowpan_rtnl.o reassembly.o ieee802154-y := netlink.o nl-mac.o nl-phy.o nl_policy.o core.o \ header_ops.o sysfs.o nl802154.o -af_802154-y := af_ieee802154.o raw.o dgram.o ccflags-y += -D__CHECK_ENDIAN__
net/ieee802154/af802154/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +obj-y += af_802154.o + +af_802154-y := af_ieee802154.o raw.o dgram.o
net/ieee802154/af802154/af802154.h renamed from net/ieee802154/af802154.h +0 -0
net/ieee802154/af802154/af_ieee802154.c renamed from net/ieee802154/af_ieee802154.c +0 -0
net/ieee802154/af802154/dgram.c renamed from net/ieee802154/dgram.c +0 -0
net/ieee802154/af802154/raw.c renamed from net/ieee802154/raw.c +0 -0
Signature · 1 line
2.2.0
Alexander Aring
maintainerPATCH 2/5 ieee802154: af802154: rename internal header
In reply to Alexander AringThis patch renames the internal header for af802154. This naming convention is like ieee802154_i.h in mac802154 and avoids naming confusing with the global af802154 header.
---
net/ieee802154/af802154/{af802154.h => af802154_i.h} | 6 +++---
net/ieee802154/af802154/af_ieee802154.c | 2 +-
net/ieee802154/af802154/dgram.c | 2 +-
net/ieee802154/af802154/raw.c | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
rename net/ieee802154/af802154/{af802154.h => af802154_i.h} (93%)net/ieee802154/af802154/af802154_i.h renamed from net/ieee802154/af802154/af802154.h +3 -3
@@ -17,8 +17,8 @@* Dmitry Eremin-Solenikov <[email protected]> */ -#ifndef AF802154_H -#define AF802154_H +#ifndef AF802154_I_H +#define AF802154_I_H struct sk_buff ;struct net_device ;
@@ -30,4 +30,4 @@ int ieee802154_dgram_deliver(struct net_device *dev, struct sk_buff *skb);struct net_device *ieee802154_get_dev (struct net *net,const struct ieee802154_addr *addr); -#endif +#endif /* AF802154_I_H */
net/ieee802154/af802154/af_ieee802154.c +1 -1
@@ -34,7 +34,7 @@#include <net/af_ieee802154.h> #include <net/ieee802154_netdev.h> -#include "af802154.h" +#include "af802154_i.h" /* Utility function for families */ struct net_device*
net/ieee802154/af802154/dgram.c +1 -1
@@ -30,7 +30,7 @@#include <asm/ioctls.h> -#include "af802154.h" +#include "af802154_i.h" static HLIST_HEAD (dgram_head);static DEFINE_RWLOCK (dgram_lock);
net/ieee802154/af802154/raw.c +1 -1
@@ -26,7 +26,7 @@#include <net/af_ieee802154.h> #include <net/ieee802154_netdev.h> -#include "af802154.h" +#include "af802154_i.h" static HLIST_HEAD (raw_head);static DEFINE_RWLOCK (raw_lock);
Signature · 1 line
2.2.0
Alexander Aring
maintainerPATCH 3/5 ieee802154: af802154: rename af_ieee802154 to core
In reply to Alexander AringThis patch renames the af_ieee802154 file to core. This file contains some core af802154 functionality which is used by raw and dgram socket implementation.
---
net/ieee802154/af802154/Makefile | 2 +-
net/ieee802154/af802154/{af_ieee802154.c => core.c} | 0
2 files changed, 1 insertion(+), 1 deletion(-)
rename net/ieee802154/af802154/{af_ieee802154.c => core.c} (100%)net/ieee802154/af802154/Makefile +1 -1
@@ -1,3 +1,3 @@ obj-y += af_802154.o -af_802154-y := af_ieee802154.o raw.o dgram.o +af_802154-y := core.o raw.o dgram.o
net/ieee802154/af802154/core.c renamed from net/ieee802154/af802154/af_ieee802154.c +0 -0
Signature · 1 line
2.2.0
Alexander Aring
maintainerPATCH 4/5 ieee802154: create 6lowpan sub-directory
In reply to Alexander AringThis patch creates an 6lowpan sub-directory inside ieee802154. Additional we move all ieee802154 6lowpan relevant files into this sub-directory instead of placeing the 6lowpan related files inside ieee802154.
---
net/ieee802154/{ => 6lowpan}/6lowpan_rtnl.c | 0
net/ieee802154/6lowpan/Makefile | 3 +++
net/ieee802154/{ => 6lowpan}/reassembly.c | 0
net/ieee802154/{ => 6lowpan}/reassembly.h | 0
net/ieee802154/Makefile | 3 +--
5 files changed, 4 insertions(+), 2 deletions(-)
rename net/ieee802154/{ => 6lowpan}/6lowpan_rtnl.c (100%)
create mode 100644 net/ieee802154/6lowpan/Makefile
rename net/ieee802154/{ => 6lowpan}/reassembly.c (100%)
rename net/ieee802154/{ => 6lowpan}/reassembly.h (100%)net/ieee802154/6lowpan/6lowpan_rtnl.c renamed from net/ieee802154/6lowpan_rtnl.c +0 -0
net/ieee802154/6lowpan/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +obj-y += ieee802154_6lowpan.o + +ieee802154_6lowpan-y := 6lowpan_rtnl.o reassembly.o
net/ieee802154/6lowpan/reassembly.c renamed from net/ieee802154/reassembly.c +0 -0
net/ieee802154/6lowpan/reassembly.h renamed from net/ieee802154/reassembly.h +0 -0
net/ieee802154/Makefile +1 -2
@@ -1,7 +1,6 @@ obj-$(CONFIG_IEEE802154) += ieee802154.o af802154/ -obj-$(CONFIG_IEEE802154_6LOWPAN) += ieee802154_6lowpan.o +obj-$(CONFIG_IEEE802154_6LOWPAN) += 6lowpan/ -ieee802154_6lowpan-y := 6lowpan_rtnl.o reassembly.o ieee802154-y := netlink.o nl-mac.o nl-phy.o nl_policy.o core.o \ header_ops.o sysfs.o nl802154.o
Signature · 1 line
2.2.0
Alexander Aring
maintainerPATCH 5/5 ieee802154: 6lowpan: rename internal header
In reply to Alexander AringThis patch renames the internal header for af802154. This naming convention is like ieee802154_i.h in mac802154 and avoids naming confusing with the global af802154 header. Furthermore this header contains more ieee802154 specific definitions.
---
net/ieee802154/6lowpan/{reassembly.h => 6lowpan_i.h} | 6 +++---
net/ieee802154/6lowpan/6lowpan_rtnl.c | 2 +-
net/ieee802154/6lowpan/reassembly.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
rename net/ieee802154/6lowpan/{reassembly.h => 6lowpan_i.h} (85%)net/ieee802154/6lowpan/6lowpan_i.h renamed from net/ieee802154/6lowpan/reassembly.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef __IEEE802154_6LOWPAN_REASSEMBLY_H__ -#define __IEEE802154_6LOWPAN_REASSEMBLY_H__ +#ifndef __IEEE802154_6LOWPAN_I_H__ +#define __IEEE802154_6LOWPAN_I_H__#include <net/inet_frag.h>
@@ -38,4 +38,4 @@ int lowpan_frag_rcv(struct sk_buff *skb, const u8 frag_type);void lowpan_net_frag_exit (void );int lowpan_net_frag_init (void ); -#endif /* __IEEE802154_6LOWPAN_REASSEMBLY_H__ */ +#endif /* __IEEE802154_6LOWPAN_I_H__ */
net/ieee802154/6lowpan/6lowpan_rtnl.c +1 -1
@@ -55,7 +55,7 @@#include <net/6lowpan.h> #include <net/ipv6.h> -#include "reassembly.h" +#include "6lowpan_i.h" static LIST_HEAD (lowpan_devices);static int lowpan_open_count;
net/ieee802154/6lowpan/reassembly.c +1 -1
@@ -28,7 +28,7 @@#include <net/ipv6.h> #include <net/inet_frag.h> -#include "reassembly.h" +#include "6lowpan_i.h" static const char lowpan_frags_cache_name[] ="lowpan-frags" ;
Signature · 1 line
2.2.0
Hi Alex,
Quoted 26 lines
This patch series contains structural changes according the ieee802154 directory. The current situation is that this directory contains stuff about ieee802154 6lowpan, ieee802154 address family and netlink interface. This patch series introduce now sub directories for 6lowpan and
af802154implementation to getting a better overview about these implementations. The ieee802154 directory contains stuff for nl802154, netlink and sysfs only.Alexander Aring (5):
ieee802154: createaf802154sub-directory
ieee802154:af802154: rename internal header
ieee802154:af802154: renameaf_ieee802154to core
ieee802154: create 6lowpan sub-directory
ieee802154: 6lowpan: rename internal headernet/ieee802154/{reassembly.h => 6lowpan/6lowpan_i.h} | 6 +++--- net/ieee802154/{ => 6lowpan}/6lowpan_rtnl.c | 2 +- net/ieee802154/6lowpan/Makefile | 3 +++ net/ieee802154/{ => 6lowpan}/reassembly.c | 2 +- net/ieee802154/Makefile | 6 ++---- net/ieee802154/af802154/Makefile | 3 +++ net/ieee802154/{af802154.h => af802154/af802154_i.h} | 6 +++--- net/ieee802154/{af_ieee802154.c => af802154/core.c} | 2 +- net/ieee802154/{ => af802154}/dgram.c | 2 +- net/ieee802154/{ => af802154}/raw.c | 2 +- 10 files changed, 19 insertions(+), 15 deletions(-)
Quoted 9 lines
rename
net/ieee802154/{reassembly.h=>6lowpan/6lowpan_i.h} (85%) renamenet/ieee802154/{=>6lowpan}/6lowpan_rtnl.c(99%) create mode 100644net/ieee802154/6lowpan/Makefilerenamenet/ieee802154/{=>6lowpan}/reassembly.c(99%) create mode 100644net/ieee802154/af802154/Makefilerenamenet/ieee802154/{af802154.h=>af802154/af802154_i.h} (93%) renamenet/ieee802154/{af_ieee802154.c=>af802154/core.c} (99%) renamenet/ieee802154/{=>af802154}/dgram.c(99%) renamenet/ieee802154/{=>af802154}/raw.c(99%)
the move of the 6lowpan stuff into net/ieee802154/6lowpan/ I can understand. That should be an optional piece. And I assume for 802.15.4 the 6LoWPAN support is more complex since it has to do segmentation and reassembly.
The net/ieee802154/af802154/ part seems pointless to me. What is this trying to achieve? I see that you can build af_802154.ko as a separate module. Which is something that I have not realized until now. So this is something that is intentional. So having ieee802154.ko and ieee802154_6lowpan.ko by itself without the socket is something that is functional?
If so, I find the naming of af_802154.ko and net/ieee802154/af802154/ rather complicated and convoluted. Would ieee802154_socket.ko net/ieee802154/socket/ not something more logical split in this regard?
Regards
Marcel
Alexander Aring
maintainerHi Marcel,
Quoted 38 lines · Marcel Holtmann
Hi Alex,
Quoted 26 lines
This patch series contains structural changes according the ieee802154 directory. The current situation is that this directory contains stuff about ieee802154 6lowpan, ieee802154 address family and netlink interface. This patch series introduce now sub directories for 6lowpan and
af802154implementation to getting a better overview about these implementations. The ieee802154 directory contains stuff for nl802154, netlink and sysfs only.Alexander Aring (5):
ieee802154: createaf802154sub-directory
ieee802154:af802154: rename internal header
ieee802154:af802154: renameaf_ieee802154to core
ieee802154: create 6lowpan sub-directory
ieee802154: 6lowpan: rename internal headernet/ieee802154/{reassembly.h => 6lowpan/6lowpan_i.h} | 6 +++--- net/ieee802154/{ => 6lowpan}/6lowpan_rtnl.c | 2 +- net/ieee802154/6lowpan/Makefile | 3 +++ net/ieee802154/{ => 6lowpan}/reassembly.c | 2 +- net/ieee802154/Makefile | 6 ++---- net/ieee802154/af802154/Makefile | 3 +++ net/ieee802154/{af802154.h => af802154/af802154_i.h} | 6 +++--- net/ieee802154/{af_ieee802154.c => af802154/core.c} | 2 +- net/ieee802154/{ => af802154}/dgram.c | 2 +- net/ieee802154/{ => af802154}/raw.c | 2 +- 10 files changed, 19 insertions(+), 15 deletions(-)Quoted 9 lines
rename
net/ieee802154/{reassembly.h=>6lowpan/6lowpan_i.h} (85%) renamenet/ieee802154/{=>6lowpan}/6lowpan_rtnl.c(99%) create mode 100644net/ieee802154/6lowpan/Makefilerenamenet/ieee802154/{=>6lowpan}/reassembly.c(99%) create mode 100644net/ieee802154/af802154/Makefilerenamenet/ieee802154/{af802154.h=>af802154/af802154_i.h} (93%) renamenet/ieee802154/{af_ieee802154.c=>af802154/core.c} (99%) renamenet/ieee802154/{=>af802154}/dgram.c(99%) renamenet/ieee802154/{=>af802154}/raw.c(99%)
Quoted 2 lines
the move of the 6lowpan stuff into
net/ieee802154/6lowpan/I can understand. That should be an optional piece. And I assume for 802.15.4 the 6LoWPAN support is more complex since it has to do segmentation and reassembly.
ok.
Quoted 2 lines
The
net/ieee802154/af802154/part seems pointless to me. What is this trying to achieve? I see that you can build af_802154.ko as a separate module. Which is something that I have not realized until now. So this is something that is intentional. So having ieee802154.ko and ieee802154_6lowpan.ko by itself without the socket is something that is functional?
Yes, the address family functionality can be a separate module. ieee802154_6lowpan.ko doesn't depends on the address family functionality.
If only ieee802154.ko would built without address family and ieee802154_6lowpan.ko then it might be used for receiving monitor mode.
I would change that but add a "default y" to the address family module.
Quoted 2 lines
If so, I find the naming of af_802154.ko and
net/ieee802154/af802154/rather complicated and convoluted. Would ieee802154_socket.konet/ieee802154/socket/not something more logical split in this regard?
Don't know, I would keep the naming style to avoid confusing current users. On the other hand, I think there are not many users outside and I like the name socket. Many people knows sockets and doesn't know what a (socket) "address family" is.
I will send a second version of this patch series according these changes.
- Alex