Просмотр исходного кода

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>
Dmitry Eremin-Solenikov 11 лет назад
Родитель
Сommit
a53d34c346
4 измененных файлов с 11 добавлено и 2 удалено
  1. 1 1
      net/Makefile
  2. 1 0
      net/bluetooth/Kconfig
  3. 7 0
      net/ieee802154/Kconfig
  4. 2 1
      net/ieee802154/Makefile

+ 1 - 1
net/Makefile

@@ -57,7 +57,7 @@ obj-$(CONFIG_CAIF)		+= caif/
 ifneq ($(CONFIG_DCB),)
 ifneq ($(CONFIG_DCB),)
 obj-y				+= dcb/
 obj-y				+= dcb/
 endif
 endif
-obj-$(CONFIG_IEEE802154)	+= ieee802154/
+obj-y				+= ieee802154/
 obj-$(CONFIG_MAC802154)		+= mac802154/
 obj-$(CONFIG_MAC802154)		+= mac802154/
 
 
 ifeq ($(CONFIG_NET),y)
 ifeq ($(CONFIG_NET),y)

+ 1 - 0
net/bluetooth/Kconfig

@@ -12,6 +12,7 @@ menuconfig BT
 	select CRYPTO_AES
 	select CRYPTO_AES
 	select CRYPTO_ECB
 	select CRYPTO_ECB
 	select CRYPTO_SHA256
 	select CRYPTO_SHA256
+	select 6LOWPAN_IPHC
 	help
 	help
 	  Bluetooth is low-cost, low-power, short-range wireless technology.
 	  Bluetooth is low-cost, low-power, short-range wireless technology.
 	  It was designed as a replacement for cables and other short-range
 	  It was designed as a replacement for cables and other short-range

+ 7 - 0
net/ieee802154/Kconfig

@@ -13,5 +13,12 @@ config IEEE802154
 config IEEE802154_6LOWPAN
 config IEEE802154_6LOWPAN
 	tristate "6lowpan support over IEEE 802.15.4"
 	tristate "6lowpan support over IEEE 802.15.4"
 	depends on IEEE802154 && IPV6
 	depends on IEEE802154 && IPV6
+	select 6LOWPAN_IPHC
 	---help---
 	---help---
 	IPv6 compression over IEEE 802.15.4.
 	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.

+ 2 - 1
net/ieee802154/Makefile

@@ -1,5 +1,6 @@
 obj-$(CONFIG_IEEE802154) += ieee802154.o af_802154.o
 obj-$(CONFIG_IEEE802154) += ieee802154.o af_802154.o
-obj-$(CONFIG_IEEE802154_6LOWPAN) += 6lowpan.o 6lowpan_iphc.o
+obj-$(CONFIG_IEEE802154_6LOWPAN) += 6lowpan.o
+obj-$(CONFIG_6LOWPAN_IPHC) += 6lowpan_iphc.o
 
 
 ieee802154-y := netlink.o nl-mac.o nl-phy.o nl_policy.o wpan-class.o
 ieee802154-y := netlink.o nl-mac.o nl-phy.o nl_policy.o wpan-class.o
 af_802154-y := af_ieee802154.o raw.o dgram.o
 af_802154-y := af_ieee802154.o raw.o dgram.o