From: Marcel Holtmann <marcel@holtmann.org>
To: Ulisses Furquim <ulisses@profusion.mobi>
Cc: linux-bluetooth@vger.kernel.org, padovan@profusion.mobi
Subject: Re: [PATCH 1/2] Bluetooth: Always compile SCO and L2CAP in Bluetooth Core
Date: Tue, 20 Dec 2011 17:56:19 -0800 [thread overview]
Message-ID: <1324432579.1965.140.camel@aeonflux> (raw)
In-Reply-To: <1324430302-3002-1-git-send-email-ulisses@profusion.mobi>
Hi Ulisses,
> The handling of SCO audio links and the L2CAP protocol are essential to
> any system with Bluetooth thus are always compiled in from now on.
>
> Signed-off-by: Ulisses Furquim <ulisses@profusion.mobi>
> ---
> include/net/bluetooth/bluetooth.h | 22 ----------------------
> net/bluetooth/Kconfig | 36 ++++++++----------------------------
> net/bluetooth/Makefile | 4 +---
> net/bluetooth/bnep/Kconfig | 2 +-
> net/bluetooth/cmtp/Kconfig | 2 +-
> net/bluetooth/hidp/Kconfig | 2 +-
> net/bluetooth/rfcomm/Kconfig | 2 +-
> 7 files changed, 13 insertions(+), 57 deletions(-)
>
> diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
> index 980e59f..abaad6e 100644
> --- a/include/net/bluetooth/bluetooth.h
> +++ b/include/net/bluetooth/bluetooth.h
> @@ -250,32 +250,10 @@ extern void bt_sysfs_cleanup(void);
>
> extern struct dentry *bt_debugfs;
>
> -#ifdef CONFIG_BT_L2CAP
> int l2cap_init(void);
> void l2cap_exit(void);
> -#else
> -static inline int l2cap_init(void)
> -{
> - return 0;
> -}
> -
> -static inline void l2cap_exit(void)
> -{
> -}
> -#endif
>
> -#ifdef CONFIG_BT_SCO
> int sco_init(void);
> void sco_exit(void);
> -#else
> -static inline int sco_init(void)
> -{
> - return 0;
> -}
> -
> -static inline void sco_exit(void)
> -{
> -}
> -#endif
>
> #endif /* __BLUETOOTH_H */
> diff --git a/net/bluetooth/Kconfig b/net/bluetooth/Kconfig
> index bfb3dc0..0d3f0aa 100644
> --- a/net/bluetooth/Kconfig
> +++ b/net/bluetooth/Kconfig
> @@ -6,7 +6,11 @@ menuconfig BT
> tristate "Bluetooth subsystem support"
> depends on NET && !S390
> depends on RFKILL || !RFKILL
> + select CRC16
> select CRYPTO
> + select CRYPTO_BLKCIPHER
> + select CRYPTO_AES
> + select CRYPTO_ECB
> help
> Bluetooth is low-cost, low-power, short-range wireless technology.
> It was designed as a replacement for cables and other short-range
> @@ -15,10 +19,11 @@ menuconfig BT
> Bluetooth can be found at <http://www.bluetooth.com/>.
>
> Linux Bluetooth subsystem consist of several layers:
> - Bluetooth Core (HCI device and connection manager, scheduler)
> + Bluetooth Core
> + HCI device and connection manager, scheduler
> + SCO audio links
> + L2CAP (Logical Link Control and Adaptation Protocol)
I would mention SMP here as well. Especially since it was mentioned in
the L2CAP section that you remove later on.
> HCI Device drivers (Interface to the hardware)
> - SCO Module (SCO audio links)
> - L2CAP Module (Logical Link Control and Adaptation Protocol)
> RFCOMM Module (RFCOMM Protocol)
> BNEP Module (Bluetooth Network Encapsulation Protocol)
> CMTP Module (CAPI Message Transport Protocol)
> @@ -33,31 +38,6 @@ menuconfig BT
> to Bluetooth kernel modules are provided in the BlueZ packages. For
> more information, see <http://www.bluez.org/>.
>
> -if BT != n
> -
> -config BT_L2CAP
> - bool "L2CAP protocol support"
> - select CRC16
> - select CRYPTO
> - select CRYPTO_BLKCIPHER
> - select CRYPTO_AES
> - select CRYPTO_ECB
> - help
> - L2CAP (Logical Link Control and Adaptation Protocol) provides
> - connection oriented and connection-less data transport. L2CAP
> - support is required for most Bluetooth applications.
> -
> - Also included is support for SMP (Security Manager Protocol) which
> - is the security layer on top of LE (Low Energy) links.
> -
> -config BT_SCO
> - bool "SCO links support"
> - help
> - SCO link provides voice transport over Bluetooth. SCO support is
> - required for voice applications like Headset and Audio.
> -
> -endif
> -
> source "net/bluetooth/rfcomm/Kconfig"
>
> source "net/bluetooth/bnep/Kconfig"
> diff --git a/net/bluetooth/Makefile b/net/bluetooth/Makefile
> index 9b67f3d..297718a 100644
> --- a/net/bluetooth/Makefile
> +++ b/net/bluetooth/Makefile
> @@ -8,6 +8,4 @@ obj-$(CONFIG_BT_BNEP) += bnep/
> obj-$(CONFIG_BT_CMTP) += cmtp/
> obj-$(CONFIG_BT_HIDP) += hidp/
>
> -bluetooth-y := af_bluetooth.o hci_core.o hci_conn.o hci_event.o mgmt.o hci_sock.o hci_sysfs.o lib.o
> -bluetooth-$(CONFIG_BT_L2CAP) += l2cap_core.o l2cap_sock.o smp.o
> -bluetooth-$(CONFIG_BT_SCO) += sco.o
> +bluetooth-y := af_bluetooth.o hci_core.o hci_conn.o hci_event.o mgmt.o hci_sock.o hci_sysfs.o l2cap_core.o l2cap_sock.o smp.o sco.o lib.o
Please break this down into two lines an honor the same width limitation
we impose on the code.
> diff --git a/net/bluetooth/bnep/Kconfig b/net/bluetooth/bnep/Kconfig
> index 35158b0..71791fc 100644
> --- a/net/bluetooth/bnep/Kconfig
> +++ b/net/bluetooth/bnep/Kconfig
> @@ -1,6 +1,6 @@
> config BT_BNEP
> tristate "BNEP protocol support"
> - depends on BT && BT_L2CAP
> + depends on BT
> select CRC32
> help
> BNEP (Bluetooth Network Encapsulation Protocol) is Ethernet
> diff --git a/net/bluetooth/cmtp/Kconfig b/net/bluetooth/cmtp/Kconfig
> index d6b0382..94cbf42 100644
> --- a/net/bluetooth/cmtp/Kconfig
> +++ b/net/bluetooth/cmtp/Kconfig
> @@ -1,6 +1,6 @@
> config BT_CMTP
> tristate "CMTP protocol support"
> - depends on BT && BT_L2CAP && ISDN_CAPI
> + depends on BT && ISDN_CAPI
> help
> CMTP (CAPI Message Transport Protocol) is a transport layer
> for CAPI messages. CMTP is required for the Bluetooth Common
> diff --git a/net/bluetooth/hidp/Kconfig b/net/bluetooth/hidp/Kconfig
> index 86a9154..4deaca7 100644
> --- a/net/bluetooth/hidp/Kconfig
> +++ b/net/bluetooth/hidp/Kconfig
> @@ -1,6 +1,6 @@
> config BT_HIDP
> tristate "HIDP protocol support"
> - depends on BT && BT_L2CAP && INPUT && HID_SUPPORT
> + depends on BT && INPUT && HID_SUPPORT
> select HID
> help
> HIDP (Human Interface Device Protocol) is a transport layer
> diff --git a/net/bluetooth/rfcomm/Kconfig b/net/bluetooth/rfcomm/Kconfig
> index 405a0e6..22e718b 100644
> --- a/net/bluetooth/rfcomm/Kconfig
> +++ b/net/bluetooth/rfcomm/Kconfig
> @@ -1,6 +1,6 @@
> config BT_RFCOMM
> tristate "RFCOMM protocol support"
> - depends on BT && BT_L2CAP
> + depends on BT
> help
> RFCOMM provides connection oriented stream transport. RFCOMM
> support is required for Dialup Networking, OBEX and other Bluetooth
Once these two are fixed, this looks good.
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Regards
Marcel
prev parent reply other threads:[~2011-12-21 1:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-21 1:18 [PATCH 1/2] Bluetooth: Always compile SCO and L2CAP in Bluetooth Core Ulisses Furquim
2011-12-21 1:18 ` [PATCH 2/2] Bluetooth: Make HCI call directly into SCO and L2CAP event functions Ulisses Furquim
2011-12-21 2:10 ` Marcel Holtmann
2011-12-21 1:56 ` Marcel Holtmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1324432579.1965.140.camel@aeonflux \
--to=marcel@holtmann.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=padovan@profusion.mobi \
--cc=ulisses@profusion.mobi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox