aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dmitry_eremin@mentor.com>2014-01-14 17:50:40 -0500
committerDavid S. Miller <davem@davemloft.net>2014-01-15 18:36:38 -0500
commita53d34c3465b8a840f7400932ae1b0a9f9ed6bef (patch)
treea2e70d5846b547411c18782bcef884eae784d9dc /net
parent89fc8632dd7d3402b0320551da207e44f5ce5a3e (diff)
net: move 6lowpan compression code to separate module
IEEE 802.15.4 and Bluetooth networking stacks share 6lowpan compression code. Instead of introducing Makefile/Kconfig hacks, build this code as a separate module referenced from both ieee802154 and bluetooth modules. This fixes the following build error observed in some kernel configurations: net/built-in.o: In function `header_create': 6lowpan.c:(.text+0x166149): undefined reference to `lowpan_header_compress' net/built-in.o: In function `bt_6lowpan_recv': (.text+0x166b3c): undefined reference to `lowpan_process_data' Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/Makefile2
-rw-r--r--net/bluetooth/Kconfig1
-rw-r--r--net/ieee802154/Kconfig7
-rw-r--r--net/ieee802154/Makefile3
4 files changed, 11 insertions, 2 deletions
diff --git a/net/Makefile b/net/Makefile
index 8fa2f91517f1..cbbbe6d657ca 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -57,7 +57,7 @@ obj-$(CONFIG_CAIF) += caif/
57ifneq ($(CONFIG_DCB),) 57ifneq ($(CONFIG_DCB),)
58obj-y += dcb/ 58obj-y += dcb/
59endif 59endif
60obj-$(CONFIG_IEEE802154) += ieee802154/ 60obj-y += ieee802154/
61obj-$(CONFIG_MAC802154) += mac802154/ 61obj-$(CONFIG_MAC802154) += mac802154/
62 62
63ifeq ($(CONFIG_NET),y) 63ifeq ($(CONFIG_NET),y)
diff --git a/net/bluetooth/Kconfig b/net/bluetooth/Kconfig
index d3f3f7b1d32c..985b56070d26 100644
--- a/net/bluetooth/Kconfig
+++ b/net/bluetooth/Kconfig
@@ -12,6 +12,7 @@ menuconfig BT
12 select CRYPTO_AES 12 select CRYPTO_AES
13 select CRYPTO_ECB 13 select CRYPTO_ECB
14 select CRYPTO_SHA256 14 select CRYPTO_SHA256
15 select 6LOWPAN_IPHC
15 help 16 help
16 Bluetooth is low-cost, low-power, short-range wireless technology. 17 Bluetooth is low-cost, low-power, short-range wireless technology.
17 It was designed as a replacement for cables and other short-range 18 It was designed as a replacement for cables and other short-range
diff --git a/net/ieee802154/Kconfig b/net/ieee802154/Kconfig
index b2e06df0076c..9c9879d5ea64 100644
--- a/net/ieee802154/Kconfig
+++ b/net/ieee802154/Kconfig
@@ -13,5 +13,12 @@ config IEEE802154
13config IEEE802154_6LOWPAN 13config IEEE802154_6LOWPAN
14 tristate "6lowpan support over IEEE 802.15.4" 14 tristate "6lowpan support over IEEE 802.15.4"
15 depends on IEEE802154 && IPV6 15 depends on IEEE802154 && IPV6
16 select 6LOWPAN_IPHC
16 ---help--- 17 ---help---
17 IPv6 compression over IEEE 802.15.4. 18 IPv6 compression over IEEE 802.15.4.
19
20config 6LOWPAN_IPHC
21 tristate
22 ---help---
23 6lowpan compression code which is shared between IEEE 802.15.4 and Bluetooth
24 stacks.
diff --git a/net/ieee802154/Makefile b/net/ieee802154/Makefile
index 951a83ee8af4..e8f05885ced6 100644
--- a/net/ieee802154/Makefile
+++ b/net/ieee802154/Makefile
@@ -1,5 +1,6 @@
1obj-$(CONFIG_IEEE802154) += ieee802154.o af_802154.o 1obj-$(CONFIG_IEEE802154) += ieee802154.o af_802154.o
2obj-$(CONFIG_IEEE802154_6LOWPAN) += 6lowpan.o 6lowpan_iphc.o 2obj-$(CONFIG_IEEE802154_6LOWPAN) += 6lowpan.o
3obj-$(CONFIG_6LOWPAN_IPHC) += 6lowpan_iphc.o
3 4
4ieee802154-y := netlink.o nl-mac.o nl-phy.o nl_policy.o wpan-class.o 5ieee802154-y := netlink.o nl-mac.o nl-phy.o nl_policy.o wpan-class.o
5af_802154-y := af_ieee802154.o raw.o dgram.o 6af_802154-y := af_ieee802154.o raw.o dgram.o