From patchwork Fri Jul 11 08:24:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Aring X-Patchwork-Id: 369059 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id C5E161400D6 for ; Fri, 11 Jul 2014 18:25:35 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752733AbaGKIZS (ORCPT ); Fri, 11 Jul 2014 04:25:18 -0400 Received: from mail-we0-f179.google.com ([74.125.82.179]:47285 "EHLO mail-we0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751875AbaGKIZL (ORCPT ); Fri, 11 Jul 2014 04:25:11 -0400 Received: by mail-we0-f179.google.com with SMTP id p10so407270wes.24 for ; Fri, 11 Jul 2014 01:25:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Qso3mPfEM6cT9Xv5t/AvzLNlvT+hbCEaB8rtQBfhE80=; b=BuQlE8WRdFU0LBroCrW3nFZJmVz968jBzIymBBM9Olu/ck6xmJtco7sck2JiOaOE6F aFW0QqQaqlSezi7KQobVJFUpc3JwNj2K0x+CCQ05q6HL14ptNEP5AlryNUvLpCRsZcL/ YZzFFJy+EDYvAX3o4nuXX3FxLgJKQ9W2Y3EqH5gGrFoCT4Up6WsGW/CVnGjLs3ARZ/g2 6bJUdjjtRTD8HWdnF0NwKc8Z/Ud5Py7XzX1eNZgjU241YF8pu4HCHRaOQGIwoH4UHtqk L/rQUTANufXEq3mO//dlP+S1zGeBLeW1dkQ5QyO6PIe2oRmNfVvEtZ8qTiWYwNbHTdI1 d+cw== X-Received: by 10.194.189.50 with SMTP id gf18mr64435751wjc.13.1405067104556; Fri, 11 Jul 2014 01:25:04 -0700 (PDT) Received: from localhost.localdomain (p4FD38887.dip0.t-ipconnect.de. [79.211.136.135]) by mx.google.com with ESMTPSA id cj8sm3668961wjb.5.2014.07.11.01.25.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 11 Jul 2014 01:25:03 -0700 (PDT) From: Alexander Aring To: netdev@vger.kernel.org Cc: marcel@holtmann.org, jukka.rissanen@linux.intel.com, linux-zigbee-devel@lists.sourceforge.net, linux-bluetooth@vger.kernel.org, Alexander Aring Subject: [PATCH net-next 1/2] 6lowpan: introduce new net/6lowpan directory Date: Fri, 11 Jul 2014 10:24:18 +0200 Message-Id: <1405067059-18782-2-git-send-email-alex.aring@gmail.com> X-Mailer: git-send-email 2.0.1 In-Reply-To: <1405067059-18782-1-git-send-email-alex.aring@gmail.com> References: <1405067059-18782-1-git-send-email-alex.aring@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This patch moves generic code which is used by bluetooth and ieee802154 6lowpan to a new net/6lowpan directory. This directory contains generic 6LoWPAN code which is shared between bluetooth and ieee802154 MAC-Layer. This is the IPHC - "IPv6 Header Compression" format at the moment. Which is described by RFC 6282 [0]. The BLTE 6LoWPAN draft describes that the IPHC is the same format like IEEE 802.15.4, see [1]. Futuremore we can put more code into this directory which is shared between BLTE and IEEE 802.15.4 6LoWPAN like RFC 6775 or the routing protocol RPL RFC 6550. To avoid naming conflicts I renamed 6lowpan-y to ieee802154_6lowpan-y in net/ieee802154/Makefile. [0] http://tools.ietf.org/html/rfc6282 [1] http://tools.ietf.org/html/draft-ietf-6lowpan-btle-12#section-3.2 [2] http://tools.ietf.org/html/rfc6775 [3] http://tools.ietf.org/html/rfc6550 Signed-off-by: Alexander Aring --- net/6lowpan/Kconfig | 6 ++++++ net/6lowpan/Makefile | 3 +++ net/{ieee802154/6lowpan_iphc.c => 6lowpan/iphc.c} | 0 net/Kconfig | 1 + net/Makefile | 3 ++- net/bluetooth/Kconfig | 3 +-- net/ieee802154/Kconfig | 9 +-------- net/ieee802154/Makefile | 5 ++--- 8 files changed, 16 insertions(+), 14 deletions(-) create mode 100644 net/6lowpan/Kconfig create mode 100644 net/6lowpan/Makefile rename net/{ieee802154/6lowpan_iphc.c => 6lowpan/iphc.c} (100%) diff --git a/net/6lowpan/Kconfig b/net/6lowpan/Kconfig new file mode 100644 index 0000000..028a5c6 --- /dev/null +++ b/net/6lowpan/Kconfig @@ -0,0 +1,6 @@ +config 6LOWPAN + bool "6LoWPAN Support" + depends on IPV6 + ---help--- + This enables IPv6 over Low power Wireless Personal Area Network - + "6LoWPAN" which is supported by IEEE 802.15.4 or Bluetooth stacks. diff --git a/net/6lowpan/Makefile b/net/6lowpan/Makefile new file mode 100644 index 0000000..415886b --- /dev/null +++ b/net/6lowpan/Makefile @@ -0,0 +1,3 @@ +obj-$(CONFIG_6LOWPAN) := 6lowpan.o + +6lowpan-y := iphc.o diff --git a/net/ieee802154/6lowpan_iphc.c b/net/6lowpan/iphc.c similarity index 100% rename from net/ieee802154/6lowpan_iphc.c rename to net/6lowpan/iphc.c diff --git a/net/Kconfig b/net/Kconfig index d92afe4..4051fdf 100644 --- a/net/Kconfig +++ b/net/Kconfig @@ -214,6 +214,7 @@ source "drivers/net/appletalk/Kconfig" source "net/x25/Kconfig" source "net/lapb/Kconfig" source "net/phonet/Kconfig" +source "net/6lowpan/Kconfig" source "net/ieee802154/Kconfig" source "net/mac802154/Kconfig" source "net/sched/Kconfig" diff --git a/net/Makefile b/net/Makefile index cbbbe6d..7ed1970 100644 --- a/net/Makefile +++ b/net/Makefile @@ -57,7 +57,8 @@ obj-$(CONFIG_CAIF) += caif/ ifneq ($(CONFIG_DCB),) obj-y += dcb/ endif -obj-y += ieee802154/ +obj-$(CONFIG_6LOWPAN) += 6lowpan/ +obj-$(CONFIG_IEEE802154) += ieee802154/ obj-$(CONFIG_MAC802154) += mac802154/ ifeq ($(CONFIG_NET),y) diff --git a/net/bluetooth/Kconfig b/net/bluetooth/Kconfig index 06ec144..a54777d 100644 --- a/net/bluetooth/Kconfig +++ b/net/bluetooth/Kconfig @@ -6,7 +6,6 @@ menuconfig BT tristate "Bluetooth subsystem support" depends on NET && !S390 depends on RFKILL || !RFKILL - select 6LOWPAN_IPHC if BT_6LOWPAN select CRC16 select CRYPTO select CRYPTO_BLKCIPHER @@ -42,7 +41,7 @@ menuconfig BT config BT_6LOWPAN bool "Bluetooth 6LoWPAN support" - depends on BT && IPV6 + depends on BT && 6LOWPAN help IPv6 compression over Bluetooth. diff --git a/net/ieee802154/Kconfig b/net/ieee802154/Kconfig index 8af1330..c0d4154 100644 --- a/net/ieee802154/Kconfig +++ b/net/ieee802154/Kconfig @@ -12,13 +12,6 @@ config IEEE802154 config IEEE802154_6LOWPAN tristate "6lowpan support over IEEE 802.15.4" - depends on IEEE802154 && IPV6 - select 6LOWPAN_IPHC + depends on IEEE802154 && 6LOWPAN ---help--- IPv6 compression over IEEE 802.15.4. - -config 6LOWPAN_IPHC - tristate - ---help--- - 6lowpan compression code which is shared between IEEE 802.15.4 and Bluetooth - stacks. diff --git a/net/ieee802154/Makefile b/net/ieee802154/Makefile index bf1b514..3914b1e 100644 --- a/net/ieee802154/Makefile +++ b/net/ieee802154/Makefile @@ -1,8 +1,7 @@ obj-$(CONFIG_IEEE802154) += ieee802154.o af_802154.o -obj-$(CONFIG_IEEE802154_6LOWPAN) += 6lowpan.o -obj-$(CONFIG_6LOWPAN_IPHC) += 6lowpan_iphc.o +obj-$(CONFIG_IEEE802154_6LOWPAN) += ieee802154_6lowpan.o -6lowpan-y := 6lowpan_rtnl.o reassembly.o +ieee802154_6lowpan-y := 6lowpan_rtnl.o reassembly.o ieee802154-y := netlink.o nl-mac.o nl-phy.o nl_policy.o wpan-class.o \ header_ops.o af_802154-y := af_ieee802154.o raw.o dgram.o