Skip to content

Commit f1e91e1

Browse files
Ulisses FurquimGustavo F. Padovan
authored andcommitted
Bluetooth: Always compile SCO and L2CAP in Bluetooth Core
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> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
1 parent f2d64f6 commit f1e91e1

7 files changed

Lines changed: 15 additions & 57 deletions

File tree

‎include/net/bluetooth/bluetooth.h‎

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -250,32 +250,10 @@ extern void bt_sysfs_cleanup(void);
250250

251251
extern struct dentry *bt_debugfs;
252252

253-
#ifdef CONFIG_BT_L2CAP
254253
int l2cap_init(void);
255254
void l2cap_exit(void);
256-
#else
257-
static inline int l2cap_init(void)
258-
{
259-
return 0;
260-
}
261-
262-
static inline void l2cap_exit(void)
263-
{
264-
}
265-
#endif
266255

267-
#ifdef CONFIG_BT_SCO
268256
int sco_init(void);
269257
void sco_exit(void);
270-
#else
271-
static inline int sco_init(void)
272-
{
273-
return 0;
274-
}
275-
276-
static inline void sco_exit(void)
277-
{
278-
}
279-
#endif
280258

281259
#endif /* __BLUETOOTH_H */

‎net/bluetooth/Kconfig‎

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ menuconfig BT
66
tristate "Bluetooth subsystem support"
77
depends on NET && !S390
88
depends on RFKILL || !RFKILL
9+
select CRC16
910
select CRYPTO
11+
select CRYPTO_BLKCIPHER
12+
select CRYPTO_AES
13+
select CRYPTO_ECB
1014
help
1115
Bluetooth is low-cost, low-power, short-range wireless technology.
1216
It was designed as a replacement for cables and other short-range
@@ -15,10 +19,12 @@ menuconfig BT
1519
Bluetooth can be found at <http://www.bluetooth.com/>.
1620

1721
Linux Bluetooth subsystem consist of several layers:
18-
Bluetooth Core (HCI device and connection manager, scheduler)
22+
Bluetooth Core
23+
HCI device and connection manager, scheduler
24+
SCO audio links
25+
L2CAP (Logical Link Control and Adaptation Protocol)
26+
SMP (Security Manager Protocol) on LE (Low Energy) links
1927
HCI Device drivers (Interface to the hardware)
20-
SCO Module (SCO audio links)
21-
L2CAP Module (Logical Link Control and Adaptation Protocol)
2228
RFCOMM Module (RFCOMM Protocol)
2329
BNEP Module (Bluetooth Network Encapsulation Protocol)
2430
CMTP Module (CAPI Message Transport Protocol)
@@ -33,31 +39,6 @@ menuconfig BT
3339
to Bluetooth kernel modules are provided in the BlueZ packages. For
3440
more information, see <http://www.bluez.org/>.
3541

36-
if BT != n
37-
38-
config BT_L2CAP
39-
bool "L2CAP protocol support"
40-
select CRC16
41-
select CRYPTO
42-
select CRYPTO_BLKCIPHER
43-
select CRYPTO_AES
44-
select CRYPTO_ECB
45-
help
46-
L2CAP (Logical Link Control and Adaptation Protocol) provides
47-
connection oriented and connection-less data transport. L2CAP
48-
support is required for most Bluetooth applications.
49-
50-
Also included is support for SMP (Security Manager Protocol) which
51-
is the security layer on top of LE (Low Energy) links.
52-
53-
config BT_SCO
54-
bool "SCO links support"
55-
help
56-
SCO link provides voice transport over Bluetooth. SCO support is
57-
required for voice applications like Headset and Audio.
58-
59-
endif
60-
6142
source "net/bluetooth/rfcomm/Kconfig"
6243

6344
source "net/bluetooth/bnep/Kconfig"

‎net/bluetooth/Makefile‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@ obj-$(CONFIG_BT_BNEP) += bnep/
88
obj-$(CONFIG_BT_CMTP) += cmtp/
99
obj-$(CONFIG_BT_HIDP) += hidp/
1010

11-
bluetooth-y := af_bluetooth.o hci_core.o hci_conn.o hci_event.o mgmt.o hci_sock.o hci_sysfs.o lib.o
12-
bluetooth-$(CONFIG_BT_L2CAP) += l2cap_core.o l2cap_sock.o smp.o
13-
bluetooth-$(CONFIG_BT_SCO) += sco.o
11+
bluetooth-y := af_bluetooth.o hci_core.o hci_conn.o hci_event.o mgmt.o \
12+
hci_sock.o hci_sysfs.o l2cap_core.o l2cap_sock.o smp.o sco.o lib.o

‎net/bluetooth/bnep/Kconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
config BT_BNEP
22
tristate "BNEP protocol support"
3-
depends on BT && BT_L2CAP
3+
depends on BT
44
select CRC32
55
help
66
BNEP (Bluetooth Network Encapsulation Protocol) is Ethernet

‎net/bluetooth/cmtp/Kconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
config BT_CMTP
22
tristate "CMTP protocol support"
3-
depends on BT && BT_L2CAP && ISDN_CAPI
3+
depends on BT && ISDN_CAPI
44
help
55
CMTP (CAPI Message Transport Protocol) is a transport layer
66
for CAPI messages. CMTP is required for the Bluetooth Common

‎net/bluetooth/hidp/Kconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
config BT_HIDP
22
tristate "HIDP protocol support"
3-
depends on BT && BT_L2CAP && INPUT && HID_SUPPORT
3+
depends on BT && INPUT && HID_SUPPORT
44
select HID
55
help
66
HIDP (Human Interface Device Protocol) is a transport layer

‎net/bluetooth/rfcomm/Kconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
config BT_RFCOMM
22
tristate "RFCOMM protocol support"
3-
depends on BT && BT_L2CAP
3+
depends on BT
44
help
55
RFCOMM provides connection oriented stream transport. RFCOMM
66
support is required for Dialup Networking, OBEX and other Bluetooth

0 commit comments

Comments
 (0)