ieee802154: kconfig entries and socket handling
Subsystems (2)
Alexander Aring
maintainercover ieee802154: kconfig entries and socket handling
Hi,
this patch series contains some cleanups to put all related socket handling functionality into one file. Also updates the Kconfig menu entries to preparing a movement out of "Networking Options".
The last series contains patches to create an af802154 subdirectory. I removed this way and but all things of af802154 (socket handling) into one file. After this series I will send the still the 6lowpan changes to put it into a 6lowpan subdirectory.
- Alex
Alexander Aring (6):
ieee802154: handle socket functionality as module
ieee802154: socket: change module name
ieee802154: socket: put handling into one file
ieee802154: socket: fix checkpatch issue
ieee802154: rename af_ieee802154.c to socket.c
ieee802154: handle config as menuconfig
net/ieee802154/Kconfig | 16 +- net/ieee802154/Makefile | 5 +- net/ieee802154/af802154.h | 33 -- net/ieee802154/af_ieee802154.c | 369 ------------- net/ieee802154/dgram.c | 549 -------------------- net/ieee802154/raw.c | 270 ---------- net/ieee802154/socket.c | 1125 ++++++++++++++++++++++++++++++++++++++++ 7 files changed, 1142 insertions(+), 1225 deletions(-) delete mode 100644 net/ieee802154/af802154.h delete mode 100644 net/ieee802154/af_ieee802154.c delete mode 100644 net/ieee802154/dgram.c delete mode 100644 net/ieee802154/raw.c create mode 100644 net/ieee802154/socket.c
Signature · 1 line
2.2.0
Alexander Aring
maintainerPATCH 1/6 ieee802154: handle socket functionality as module
This patch makes the ieee802154 socket handling as module. Currently this is part of ieee802154 module. It pointed out that ieee802154 module has also two module_init/module_exit functions. One inside of core.c and the other in af_ieee802154.c. This patch will also solve this issue by handle the af_802154 as separate module.
--- net/ieee802154/Kconfig | 9 +++++++++ net/ieee802154/Makefile | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-)
net/ieee802154/Kconfig +9 -0
@@ -10,6 +10,15 @@ config IEEE802154 Say Y here to compile LR-WPAN support into the kernel or say M to compile it as modules. +config IEEE802154_SOCKET + tristate "IEEE 802.15.4 socket interface" + depends on IEEE802154 + default y + ---help--- + Socket interface for IEEE 802.15.4. Contains DGRAM sockets interface + for 802.15.4 dataframes. Also RAW socket interface to build MAC + header from userspace. + config IEEE802154_6LOWPAN tristate "6lowpan support over IEEE 802.15.4" depends on IEEE802154 && 6LOWPAN
net/ieee802154/Makefile +2 -1
@@ -1,4 +1,5 @@ -obj-$(CONFIG_IEEE802154) += ieee802154.o af_802154.o +obj-$(CONFIG_IEEE802154) += ieee802154.o +obj-$(CONFIG_IEEE802154_SOCKET) += af_802154.o obj-$(CONFIG_IEEE802154_6LOWPAN) += ieee802154_6lowpan.o ieee802154_6lowpan-y := 6lowpan_rtnl.o reassembly.o
Signature · 1 line
2.2.0
Alexander Aring
maintainerPATCH 2/6 ieee802154: socket: change module name
In reply to Alexander AringThis patch changes the module name of af_802154 to ieee802154_socket. Just for keeping the name convention according to the 6LoWPAN module ieee802154_6lowpan.
--- net/ieee802154/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/ieee802154/Makefile +2 -2
@@ -1,10 +1,10 @@ obj-$(CONFIG_IEEE802154) += ieee802154.o -obj-$(CONFIG_IEEE802154_SOCKET) += af_802154.o +obj-$(CONFIG_IEEE802154_SOCKET) += ieee802154_socket.o 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 +ieee802154_socket-y := af_ieee802154.o raw.o dgram.o ccflags-y += -D__CHECK_ENDIAN__
Signature · 1 line
2.2.0
Alexander Aring
maintainerPATCH 3/6 ieee802154: socket: put handling into one file
In reply to Alexander AringThis patch puts all related socket handling into one file. This is just a cleanup to do all socket handling stuff inside of one implementation file.
--- net/ieee802154/Makefile | 2 +- net/ieee802154/af802154.h | 33 -- net/ieee802154/af_ieee802154.c | 762 ++++++++++++++++++++++++++++++++++++++++- net/ieee802154/dgram.c | 549 ----------------------------- net/ieee802154/raw.c | 270 --------------- 5 files changed, 760 insertions(+), 856 deletions(-) delete mode 100644 net/ieee802154/af802154.h delete mode 100644 net/ieee802154/dgram.c delete mode 100644 net/ieee802154/raw.c
net/ieee802154/Makefile +1 -1
@@ -5,6 +5,6 @@ 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 -ieee802154_socket-y := af_ieee802154.o raw.o dgram.o +ieee802154_socket-y := af_ieee802154.o ccflags-y += -D__CHECK_ENDIAN__
net/ieee802154/af802154.h deleted +0 -33
@@ -1,33 +0,0 @@ -/* -* Internal interfaces for ieee 802.15.4 address family. -* -* Copyright 2007, 2008, 2009 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 -* as published by the Free Software Foundation. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* Written by: -* Sergey Lapin <[email protected]> -* Dmitry Eremin-Solenikov <[email protected]> -*/ - -#ifndef AF802154_H -#define AF802154_H - -struct sk_buff ; -struct net_device ; -struct ieee802154_addr ; -extern struct proto ieee802154_raw_prot; -extern struct proto ieee802154_dgram_prot; -void ieee802154_raw_deliver (struct net_device *dev,struct sk_buff *skb); -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
net/ieee802154/af_ieee802154.c +759 -3
781 lines not on this page · raw message
net/ieee802154/dgram.c deleted +0 -549
549 lines not on this page · raw message
net/ieee802154/raw.c deleted +0 -270
270 lines not on this page · raw message
Signature · 1 line
2.2.0
Alexander Aring
maintainerPATCH 4/6 ieee802154: socket: fix checkpatch issue
In reply to Alexander AringThis patch solves the following checkpatch issue:
CHECK: Comparison to NULL could be written "skb"
+ if (skb != NULL) {
--- net/ieee802154/af_ieee802154.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ieee802154/af_ieee802154.c +1 -1
@@ -560,7 +560,7 @@ static int dgram_ioctl(struct sock *sk, int cmd, unsigned long arg) amount =0 ;spin_lock_bh (&sk->sk_receive_queue.lock); skb =skb_peek (&sk->sk_receive_queue); -if (skb !=NULL ) { +if (skb) {/* We will only return the amount * of this packet since that is all * that will be read.
Signature · 1 line
2.2.0
Alexander Aring
maintainerPATCH 5/6 ieee802154: rename af_ieee802154.c to socket.c
In reply to Alexander AringThis patch renames the "af_ieee802154.c" to "socket.c". This is just a cleanup to have a short name for it which describes the implementationm stuff more human understandable.
---
net/ieee802154/Makefile | 2 +-
net/ieee802154/{af_ieee802154.c => socket.c} | 0
2 files changed, 1 insertion(+), 1 deletion(-)
rename net/ieee802154/{af_ieee802154.c => socket.c} (100%)net/ieee802154/Makefile +1 -1
@@ -5,6 +5,6 @@ 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 -ieee802154_socket-y := af_ieee802154.o +ieee802154_socket-y := socket.o ccflags-y += -D__CHECK_ENDIAN__
net/ieee802154/socket.c renamed from net/ieee802154/af_ieee802154.c +0 -0
Signature · 1 line
2.2.0
Alexander Aring
maintainerPATCH 6/6 ieee802154: handle config as menuconfig
In reply to Alexander AringThis patch handles the IEEE802154 Kconfig entry as menuconfig. Furthermore we move this entry out of "Network Options" and put it into "Networking" where the other networking subsystems are. This requires a menuconfig entry like all other networking subsystems.
--- net/ieee802154/Kconfig | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
net/ieee802154/Kconfig +6 -3
@@ -1,4 +1,4 @@ -config IEEE802154 +menuconfig IEEE802154 tristate "IEEE Std 802.15.4 Low-Rate Wireless Personal Area Networks support" ---help--- IEEE Std 802.15.4 defines a low data rate, low power and low
@@ -10,9 +10,10 @@ config IEEE802154 Say Y here to compile LR-WPAN support into the kernel or say M to compile it as modules. +if IEEE802154 + config IEEE802154_SOCKET tristate "IEEE 802.15.4 socket interface" - depends on IEEE802154 default y ---help--- Socket interface for IEEE 802.15.4. Contains DGRAM sockets interface
@@ -21,6 +22,8 @@ config IEEE802154_SOCKET config IEEE802154_6LOWPAN tristate "6lowpan support over IEEE 802.15.4" - depends on IEEE802154 && 6LOWPAN + depends on 6LOWPAN ---help--- IPv6 compression over IEEE 802.15.4. + +endif
Signature · 1 line
2.2.0
Hi Alex,
Quoted 27 lines
this patch series contains some cleanups to put all related socket handling functionality into one file. Also updates the
Kconfigmenu entries to preparing a movement out of "Networking Options".The last series contains patches to create an
af802154subdirectory. I removed this way and but all things ofaf802154(socket handling) into one file. After this series I will send the still the 6lowpan changes to put it into a 6lowpan subdirectory.- Alex
Alexander Aring (6):
ieee802154: handle socket functionality as module
ieee802154: socket: change module name
ieee802154: socket: put handling into one file
ieee802154: socket: fix checkpatch issue
ieee802154: renameaf_ieee802154.ctosocket.c
ieee802154: handle config as menuconfignet/ieee802154/Kconfig | 16 +- net/ieee802154/Makefile | 5 +- net/ieee802154/af802154.h | 33 -- net/ieee802154/af_ieee802154.c | 369 ------------- net/ieee802154/dgram.c | 549 -------------------- net/ieee802154/raw.c | 270 ---------- net/ieee802154/socket.c | 1125 ++++++++++++++++++++++++++++++++++++++++ 7 files changed, 1142 insertions(+), 1225 deletions(-)
Quoted 5 lines
delete mode 100644
net/ieee802154/af802154.h
delete mode 100644net/ieee802154/af_ieee802154.c
delete mode 100644net/ieee802154/dgram.c
delete mode 100644net/ieee802154/raw.c
create mode 100644net/ieee802154/socket.c
all 6 patches have been applied to bluetooth-next tree.
Regards
Marcel