All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL REQUEST] IEEE 802.15.4 stack: generic parts v2
@ 2009-06-05  2:29 ` Dmitry Eremin-Solenikov
  0 siblings, 0 replies; 39+ messages in thread
From: Dmitry Eremin-Solenikov @ 2009-06-05  2:29 UTC (permalink / raw)
  To: linux-kernel; +Cc: netdev, linux-wireless, slapin, davem, Stephen Rothwell

Hello,

This is a second version of pull/merge request for our IEEE 802.15.4 stack.
Major changes from previous post:
 * Several macroses replaced with inline functions to ensure type correctness.
 * Reformat source to (mostly) fit into 80 columns
 * Drop constants 'reservation' declarations from headers
 * Split policy from nl802154.h to separate source file.
 * Add documentation for our netlink protocol.

The following changes since commit 9fa7eb283c5cdc2b0f4a8cfe6387ed82e5e9a3d3:
  Linus Torvalds (1):
        Linux 2.6.30-rc8

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/lumag/lowpan.git for-next

Dmitry Eremin-Solenikov (5):
      Add constants for the ieee 802.15.4 stack
      net: add IEEE 802.15.4 socket family implementation
      net: add NL802154 interface for configuration of 802.15.4 devices
      ieee802154: add documentation about our stack
      ieee802154: add simple HardMAC driver sample

 Documentation/networking/ieee802154.txt |   76 +++++
 MAINTAINERS                             |   12 +
 drivers/Makefile                        |    1 +
 drivers/ieee802154/Kconfig              |   22 ++
 drivers/ieee802154/Makefile             |    3 +
 drivers/ieee802154/fakehard.c           |  270 ++++++++++++++++
 drivers/net/Kconfig                     |    2 +
 include/linux/if_arp.h                  |    2 +
 include/linux/if_ether.h                |    1 +
 include/linux/nl802154.h                |  119 +++++++
 include/linux/socket.h                  |    4 +-
 include/net/ieee802154/af_ieee802154.h  |   60 ++++
 include/net/ieee802154/mac_def.h        |  160 ++++++++++
 include/net/ieee802154/netdevice.h      |  115 +++++++
 include/net/ieee802154/nl802154.h       |   41 +++
 net/Kconfig                             |    1 +
 net/Makefile                            |    1 +
 net/core/dev.c                          |    6 +-
 net/core/sock.c                         |    3 +
 net/ieee802154/Kconfig                  |   12 +
 net/ieee802154/Makefile                 |    5 +
 net/ieee802154/af802154.h               |   36 +++
 net/ieee802154/af_ieee802154.c          |  372 ++++++++++++++++++++++
 net/ieee802154/dgram.c                  |  394 +++++++++++++++++++++++
 net/ieee802154/netlink.c                |  523 +++++++++++++++++++++++++++++++
 net/ieee802154/nl_policy.c              |   65 ++++
 net/ieee802154/raw.c                    |  254 +++++++++++++++
 27 files changed, 2557 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/networking/ieee802154.txt
 create mode 100644 drivers/ieee802154/Kconfig
 create mode 100644 drivers/ieee802154/Makefile
 create mode 100644 drivers/ieee802154/fakehard.c
 create mode 100644 include/linux/nl802154.h
 create mode 100644 include/net/ieee802154/af_ieee802154.h
 create mode 100644 include/net/ieee802154/mac_def.h
 create mode 100644 include/net/ieee802154/netdevice.h
 create mode 100644 include/net/ieee802154/nl802154.h
 create mode 100644 net/ieee802154/Kconfig
 create mode 100644 net/ieee802154/Makefile
 create mode 100644 net/ieee802154/af802154.h
 create mode 100644 net/ieee802154/af_ieee802154.c
 create mode 100644 net/ieee802154/dgram.c
 create mode 100644 net/ieee802154/netlink.c
 create mode 100644 net/ieee802154/nl_policy.c
 create mode 100644 net/ieee802154/raw.c

-- 
With best wishes
Dmitry


^ permalink raw reply	[flat|nested] 39+ messages in thread
* [PATCH 1/5] Add constants for the ieee 802.15.4 stack
  2009-06-07  1:18       ` [PATCH 0/5] IEEE 802.15.4 stack: generic parts v3 Sergey Lapin
@ 2009-06-07  1:18 Sergey Lapin
  2009-06-07  1:18 ` [PATCH 2/5] net: add IEEE 802.15.4 socket family implementation Sergey Lapin
  0 siblings, 1 reply; 39+ messages in thread
From: Sergey Lapin @ 2009-06-07  1:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-wireless, netdev, Dmitry Eremin-Solenikov, David Miller,
	Stephen Rothwell, Sergey Lapin

IEEE 802.15.4 stack requires several constants to be defined/adjusted.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Sergey Lapin <slapin@ossfans.org>
---
 include/linux/if_arp.h   |    2 ++
 include/linux/if_ether.h |    1 +
 include/linux/socket.h   |    4 +++-
 net/core/dev.c           |    6 ++++--
 net/core/sock.c          |    3 +++
 5 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/include/linux/if_arp.h b/include/linux/if_arp.h
index 5ff8980..b554300 100644
--- a/include/linux/if_arp.h
+++ b/include/linux/if_arp.h
@@ -86,6 +86,8 @@
 #define ARPHRD_IEEE80211 801		/* IEEE 802.11			*/
 #define ARPHRD_IEEE80211_PRISM 802	/* IEEE 802.11 + Prism2 header  */
 #define ARPHRD_IEEE80211_RADIOTAP 803	/* IEEE 802.11 + radiotap header */
+#define ARPHRD_IEEE802154	  804
+#define ARPHRD_IEEE802154_PHY	  805
 
 #define ARPHRD_PHONET	820		/* PhoNet media type		*/
 #define ARPHRD_PHONET_PIPE 821		/* PhoNet pipe header		*/
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h
index cfe4fe1..11a60e4 100644
--- a/include/linux/if_ether.h
+++ b/include/linux/if_ether.h
@@ -106,6 +106,7 @@
 #define ETH_P_DSA	0x001B		/* Distributed Switch Arch.	*/
 #define ETH_P_TRAILER	0x001C		/* Trailer switch tagging	*/
 #define ETH_P_PHONET	0x00F5		/* Nokia Phonet frames          */
+#define ETH_P_IEEE802154 0x00F6		/* IEEE802.15.4 frame		*/
 
 /*
  *	This is an Ethernet frame header.
diff --git a/include/linux/socket.h b/include/linux/socket.h
index 421afb4..642d1f1 100644
--- a/include/linux/socket.h
+++ b/include/linux/socket.h
@@ -194,7 +194,8 @@ struct ucred {
 #define AF_RXRPC	33	/* RxRPC sockets 		*/
 #define AF_ISDN		34	/* mISDN sockets 		*/
 #define AF_PHONET	35	/* Phonet sockets		*/
-#define AF_MAX		36	/* For now.. */
+#define AF_IEEE802154	36	/* IEEE802154 sockets		*/
+#define AF_MAX		37	/* For now.. */
 
 /* Protocol families, same as address families. */
 #define PF_UNSPEC	AF_UNSPEC
@@ -233,6 +234,7 @@ struct ucred {
 #define PF_RXRPC	AF_RXRPC
 #define PF_ISDN		AF_ISDN
 #define PF_PHONET	AF_PHONET
+#define PF_IEEE802154	AF_IEEE802154
 #define PF_MAX		AF_MAX
 
 /* Maximum queue length specifiable by listen.  */
diff --git a/net/core/dev.c b/net/core/dev.c
index e2e9e4a..4119dfc 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -268,7 +268,8 @@ static const unsigned short netdev_lock_type[] =
 	 ARPHRD_IRDA, ARPHRD_FCPP, ARPHRD_FCAL, ARPHRD_FCPL,
 	 ARPHRD_FCFABRIC, ARPHRD_IEEE802_TR, ARPHRD_IEEE80211,
 	 ARPHRD_IEEE80211_PRISM, ARPHRD_IEEE80211_RADIOTAP, ARPHRD_PHONET,
-	 ARPHRD_PHONET_PIPE, ARPHRD_VOID, ARPHRD_NONE};
+	 ARPHRD_PHONET_PIPE, ARPHRD_IEEE802154, ARPHRD_IEEE802154_PHY,
+	 ARPHRD_VOID, ARPHRD_NONE};
 
 static const char *netdev_lock_name[] =
 	{"_xmit_NETROM", "_xmit_ETHER", "_xmit_EETHER", "_xmit_AX25",
@@ -285,7 +286,8 @@ static const char *netdev_lock_name[] =
 	 "_xmit_IRDA", "_xmit_FCPP", "_xmit_FCAL", "_xmit_FCPL",
 	 "_xmit_FCFABRIC", "_xmit_IEEE802_TR", "_xmit_IEEE80211",
 	 "_xmit_IEEE80211_PRISM", "_xmit_IEEE80211_RADIOTAP", "_xmit_PHONET",
-	 "_xmit_PHONET_PIPE", "_xmit_VOID", "_xmit_NONE"};
+	 "_xmit_PHONET_PIPE", "_xmit_IEEE802154", "_xmit_IEEE802154_PHY",
+	 "_xmit_VOID", "_xmit_NONE"};
 
 static struct lock_class_key netdev_xmit_lock_key[ARRAY_SIZE(netdev_lock_type)];
 static struct lock_class_key netdev_addr_lock_key[ARRAY_SIZE(netdev_lock_type)];
diff --git a/net/core/sock.c b/net/core/sock.c
index 7dbf3ff..8a1644c 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -155,6 +155,7 @@ static const char *af_family_key_strings[AF_MAX+1] = {
   "sk_lock-27"       , "sk_lock-28"          , "sk_lock-AF_CAN"      ,
   "sk_lock-AF_TIPC"  , "sk_lock-AF_BLUETOOTH", "sk_lock-IUCV"        ,
   "sk_lock-AF_RXRPC" , "sk_lock-AF_ISDN"     , "sk_lock-AF_PHONET"   ,
+  "sk_lock-AF_IEEE802154",
   "sk_lock-AF_MAX"
 };
 static const char *af_family_slock_key_strings[AF_MAX+1] = {
@@ -170,6 +171,7 @@ static const char *af_family_slock_key_strings[AF_MAX+1] = {
   "slock-27"       , "slock-28"          , "slock-AF_CAN"      ,
   "slock-AF_TIPC"  , "slock-AF_BLUETOOTH", "slock-AF_IUCV"     ,
   "slock-AF_RXRPC" , "slock-AF_ISDN"     , "slock-AF_PHONET"   ,
+  "slock-AF_IEEE802154",
   "slock-AF_MAX"
 };
 static const char *af_family_clock_key_strings[AF_MAX+1] = {
@@ -185,6 +187,7 @@ static const char *af_family_clock_key_strings[AF_MAX+1] = {
   "clock-27"       , "clock-28"          , "clock-AF_CAN"      ,
   "clock-AF_TIPC"  , "clock-AF_BLUETOOTH", "clock-AF_IUCV"     ,
   "clock-AF_RXRPC" , "clock-AF_ISDN"     , "clock-AF_PHONET"   ,
+  "clock-AF_IEEE802154",
   "clock-AF_MAX"
 };
 
-- 
1.6.3.1


^ permalink raw reply related	[flat|nested] 39+ messages in thread
* [PATCH 1/5] Add constants for the ieee 802.15.4 stack
  2009-06-08 22:18       ` [PULL REQUEST] IEEE 802.15.4 stack: generic parts v4 Sergey Lapin
@ 2009-06-08 22:18 Sergey Lapin
  2009-06-08 22:18 ` [PATCH 2/5] net: add IEEE 802.15.4 socket family implementation Sergey Lapin
  0 siblings, 1 reply; 39+ messages in thread
From: Sergey Lapin @ 2009-06-08 22:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-wireless, netdev, Dmitry Eremin-Solenikov, David Miller,
	Stephen Rothwell, Sergey Lapin

IEEE 802.15.4 stack requires several constants to be defined/adjusted.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Sergey Lapin <slapin@ossfans.org>
---
 include/linux/if_arp.h   |    2 ++
 include/linux/if_ether.h |    1 +
 include/linux/socket.h   |    4 +++-
 net/core/dev.c           |    6 ++++--
 net/core/sock.c          |    3 +++
 5 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/include/linux/if_arp.h b/include/linux/if_arp.h
index 5ff8980..b554300 100644
--- a/include/linux/if_arp.h
+++ b/include/linux/if_arp.h
@@ -86,6 +86,8 @@
 #define ARPHRD_IEEE80211 801		/* IEEE 802.11			*/
 #define ARPHRD_IEEE80211_PRISM 802	/* IEEE 802.11 + Prism2 header  */
 #define ARPHRD_IEEE80211_RADIOTAP 803	/* IEEE 802.11 + radiotap header */
+#define ARPHRD_IEEE802154	  804
+#define ARPHRD_IEEE802154_PHY	  805
 
 #define ARPHRD_PHONET	820		/* PhoNet media type		*/
 #define ARPHRD_PHONET_PIPE 821		/* PhoNet pipe header		*/
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h
index cfe4fe1..11a60e4 100644
--- a/include/linux/if_ether.h
+++ b/include/linux/if_ether.h
@@ -106,6 +106,7 @@
 #define ETH_P_DSA	0x001B		/* Distributed Switch Arch.	*/
 #define ETH_P_TRAILER	0x001C		/* Trailer switch tagging	*/
 #define ETH_P_PHONET	0x00F5		/* Nokia Phonet frames          */
+#define ETH_P_IEEE802154 0x00F6		/* IEEE802.15.4 frame		*/
 
 /*
  *	This is an Ethernet frame header.
diff --git a/include/linux/socket.h b/include/linux/socket.h
index 421afb4..642d1f1 100644
--- a/include/linux/socket.h
+++ b/include/linux/socket.h
@@ -194,7 +194,8 @@ struct ucred {
 #define AF_RXRPC	33	/* RxRPC sockets 		*/
 #define AF_ISDN		34	/* mISDN sockets 		*/
 #define AF_PHONET	35	/* Phonet sockets		*/
-#define AF_MAX		36	/* For now.. */
+#define AF_IEEE802154	36	/* IEEE802154 sockets		*/
+#define AF_MAX		37	/* For now.. */
 
 /* Protocol families, same as address families. */
 #define PF_UNSPEC	AF_UNSPEC
@@ -233,6 +234,7 @@ struct ucred {
 #define PF_RXRPC	AF_RXRPC
 #define PF_ISDN		AF_ISDN
 #define PF_PHONET	AF_PHONET
+#define PF_IEEE802154	AF_IEEE802154
 #define PF_MAX		AF_MAX
 
 /* Maximum queue length specifiable by listen.  */
diff --git a/net/core/dev.c b/net/core/dev.c
index e2e9e4a..4119dfc 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -268,7 +268,8 @@ static const unsigned short netdev_lock_type[] =
 	 ARPHRD_IRDA, ARPHRD_FCPP, ARPHRD_FCAL, ARPHRD_FCPL,
 	 ARPHRD_FCFABRIC, ARPHRD_IEEE802_TR, ARPHRD_IEEE80211,
 	 ARPHRD_IEEE80211_PRISM, ARPHRD_IEEE80211_RADIOTAP, ARPHRD_PHONET,
-	 ARPHRD_PHONET_PIPE, ARPHRD_VOID, ARPHRD_NONE};
+	 ARPHRD_PHONET_PIPE, ARPHRD_IEEE802154, ARPHRD_IEEE802154_PHY,
+	 ARPHRD_VOID, ARPHRD_NONE};
 
 static const char *netdev_lock_name[] =
 	{"_xmit_NETROM", "_xmit_ETHER", "_xmit_EETHER", "_xmit_AX25",
@@ -285,7 +286,8 @@ static const char *netdev_lock_name[] =
 	 "_xmit_IRDA", "_xmit_FCPP", "_xmit_FCAL", "_xmit_FCPL",
 	 "_xmit_FCFABRIC", "_xmit_IEEE802_TR", "_xmit_IEEE80211",
 	 "_xmit_IEEE80211_PRISM", "_xmit_IEEE80211_RADIOTAP", "_xmit_PHONET",
-	 "_xmit_PHONET_PIPE", "_xmit_VOID", "_xmit_NONE"};
+	 "_xmit_PHONET_PIPE", "_xmit_IEEE802154", "_xmit_IEEE802154_PHY",
+	 "_xmit_VOID", "_xmit_NONE"};
 
 static struct lock_class_key netdev_xmit_lock_key[ARRAY_SIZE(netdev_lock_type)];
 static struct lock_class_key netdev_addr_lock_key[ARRAY_SIZE(netdev_lock_type)];
diff --git a/net/core/sock.c b/net/core/sock.c
index 7dbf3ff..8a1644c 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -155,6 +155,7 @@ static const char *af_family_key_strings[AF_MAX+1] = {
   "sk_lock-27"       , "sk_lock-28"          , "sk_lock-AF_CAN"      ,
   "sk_lock-AF_TIPC"  , "sk_lock-AF_BLUETOOTH", "sk_lock-IUCV"        ,
   "sk_lock-AF_RXRPC" , "sk_lock-AF_ISDN"     , "sk_lock-AF_PHONET"   ,
+  "sk_lock-AF_IEEE802154",
   "sk_lock-AF_MAX"
 };
 static const char *af_family_slock_key_strings[AF_MAX+1] = {
@@ -170,6 +171,7 @@ static const char *af_family_slock_key_strings[AF_MAX+1] = {
   "slock-27"       , "slock-28"          , "slock-AF_CAN"      ,
   "slock-AF_TIPC"  , "slock-AF_BLUETOOTH", "slock-AF_IUCV"     ,
   "slock-AF_RXRPC" , "slock-AF_ISDN"     , "slock-AF_PHONET"   ,
+  "slock-AF_IEEE802154",
   "slock-AF_MAX"
 };
 static const char *af_family_clock_key_strings[AF_MAX+1] = {
@@ -185,6 +187,7 @@ static const char *af_family_clock_key_strings[AF_MAX+1] = {
   "clock-27"       , "clock-28"          , "clock-AF_CAN"      ,
   "clock-AF_TIPC"  , "clock-AF_BLUETOOTH", "clock-AF_IUCV"     ,
   "clock-AF_RXRPC" , "clock-AF_ISDN"     , "clock-AF_PHONET"   ,
+  "clock-AF_IEEE802154",
   "clock-AF_MAX"
 };
 
-- 
1.6.3.1


^ permalink raw reply related	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2009-06-08 22:18 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-05  2:29 [PULL REQUEST] IEEE 802.15.4 stack: generic parts v2 Dmitry Eremin-Solenikov
2009-06-05  2:29 ` Dmitry Eremin-Solenikov
2009-06-05  2:29 ` [PATCH 1/5] Add constants for the ieee 802.15.4 stack Dmitry Eremin-Solenikov
2009-06-05  2:29   ` [PATCH 2/5] net: add IEEE 802.15.4 socket family implementation Dmitry Eremin-Solenikov
2009-06-05  2:29     ` Dmitry Eremin-Solenikov
2009-06-05  2:29     ` [PATCH 3/5] net: add NL802154 interface for configuration of 802.15.4 devices Dmitry Eremin-Solenikov
2009-06-05  2:29       ` [PATCH 4/5] ieee802154: add documentation about our stack Dmitry Eremin-Solenikov
2009-06-05  2:29         ` Dmitry Eremin-Solenikov
2009-06-05  2:29         ` [PATCH 5/5] ieee802154: add simple HardMAC driver sample Dmitry Eremin-Solenikov
2009-06-05  2:29           ` Dmitry Eremin-Solenikov
2009-06-05 13:18         ` [PATCH 4/5] ieee802154: add documentation about our stack Marcel Holtmann
2009-06-05 13:40           ` Dmitry Eremin-Solenikov
2009-06-05 14:25             ` Marcel Holtmann
2009-06-05 16:00               ` Dmitry Eremin-Solenikov
2009-06-05 16:00                 ` Dmitry Eremin-Solenikov
2009-06-06  7:12               ` Maxim Osipov
2009-06-05  6:52       ` [PATCH 3/5] net: add NL802154 interface for configuration of 802.15.4 devices Johannes Berg
2009-06-05  6:52         ` Johannes Berg
2009-06-05  7:15         ` Dmitry Eremin-Solenikov
2009-06-05  7:54           ` David Miller
2009-06-05  9:12             ` Dmitry Eremin-Solenikov
2009-06-05  9:12               ` Dmitry Eremin-Solenikov
2009-06-05  9:46               ` Sergey Lapin
2009-06-05 10:45                 ` Dmitry Eremin-Solenikov
2009-06-05 10:45                   ` Dmitry Eremin-Solenikov
2009-06-05 10:45                   ` Dmitry Eremin-Solenikov
2009-06-05 11:51                   ` Jesper Dangaard Brouer
2009-06-05 11:51                     ` Jesper Dangaard Brouer
2009-06-05 11:51                     ` Jesper Dangaard Brouer
2009-06-05 13:23                   ` Marcel Holtmann
2009-06-05 13:23                     ` Marcel Holtmann
2009-06-05 13:23                     ` Marcel Holtmann
2009-06-05 13:27                     ` Dmitry Eremin-Solenikov
2009-06-05 13:27                       ` Dmitry Eremin-Solenikov
2009-06-06  0:58                   ` David Miller
2009-06-06  7:06                     ` Dmitry Eremin-Solenikov
2009-06-06  7:06                       ` Dmitry Eremin-Solenikov
  -- strict thread matches above, loose matches on Subject: below --
2009-06-07  1:18 [PATCH 1/5] Add constants for the ieee 802.15.4 stack Sergey Lapin
2009-06-07  1:18 ` [PATCH 2/5] net: add IEEE 802.15.4 socket family implementation Sergey Lapin
2009-06-07  1:18   ` [PATCH 3/5] net: add NL802154 interface for configuration of 802.15.4 devices Sergey Lapin
2009-06-07  1:18     ` [PATCH 4/5] ieee802154: add documentation about our stack Sergey Lapin
2009-06-07  1:18       ` [PATCH 0/5] IEEE 802.15.4 stack: generic parts v3 Sergey Lapin
2009-06-07  1:18         ` [PATCH 5/5] ieee802154: add simple HardMAC driver sample Sergey Lapin
2009-06-08 22:18 [PATCH 1/5] Add constants for the ieee 802.15.4 stack Sergey Lapin
2009-06-08 22:18 ` [PATCH 2/5] net: add IEEE 802.15.4 socket family implementation Sergey Lapin
2009-06-08 22:18   ` [PATCH 3/5] net: add NL802154 interface for configuration of 802.15.4 devices Sergey Lapin
2009-06-08 22:18     ` [PATCH 4/5] ieee802154: add documentation about our stack Sergey Lapin
2009-06-08 22:18       ` [PULL REQUEST] IEEE 802.15.4 stack: generic parts v4 Sergey Lapin
2009-06-08 22:18         ` [PATCH 5/5] ieee802154: add simple HardMAC driver sample Sergey Lapin

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.