Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert "Bluetooth: Add option for disabling legacy ioctl interfaces"

This reverts commit dbbccdc4ced015cdd4051299bd87fbe0254ad351.

It turns out that the "legacy" users aren't so legacy at all, and that
turning off the legacy ioctl will break the current Qt bluetooth stack
for bluetooth LE devices that were released just a couple of months ago.

So it's simply not true that this was a legacy interface that hasn't
been needed and is only limited to old legacy BT devices. Because I
actually read Kconfig help messages, and actively try to turn off
features that I don't need, I turned the option off.

Then I spent _way_ too much time debugging BLE issues until I realized
that it wasn't the Qt and subsurface development that had broken one of
my dive computer BLE downloads, but simply my broken kernel config.

Maybe in a decade it will be true that this is a legacy interface. And
maybe with a better help-text and correct dependencies, this kind of
legacy removal might be acceptable. But as things are right now both
the commit message and the Kconfig help text were misleading, and the
Kconfig option had the wrong dependenencies.

There's no reason to keep that broken Kconfig option in the tree.

Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

-16
-10
net/bluetooth/Kconfig
··· 126 126 Provide extensive information about internal Bluetooth states 127 127 in debugfs. 128 128 129 - config BT_LEGACY_IOCTL 130 - bool "Enable legacy ioctl interfaces" 131 - depends on BT && BT_BREDR 132 - default y 133 - help 134 - Enable support for legacy ioctl interfaces. This is only needed 135 - for old and deprecated applications using direct ioctl calls for 136 - controller management. Since Linux 3.4 all configuration and 137 - setup is done via mgmt interface and this is no longer needed. 138 - 139 129 source "drivers/bluetooth/Kconfig"
-6
net/bluetooth/hci_sock.c
··· 878 878 return 0; 879 879 } 880 880 881 - #ifdef CONFIG_BT_LEGACY_IOCTL 882 881 static int hci_sock_blacklist_add(struct hci_dev *hdev, void __user *arg) 883 882 { 884 883 bdaddr_t bdaddr; ··· 1049 1050 release_sock(sk); 1050 1051 return err; 1051 1052 } 1052 - #endif 1053 1053 1054 1054 static int hci_sock_bind(struct socket *sock, struct sockaddr *addr, 1055 1055 int addr_len) ··· 1969 1971 .getname = hci_sock_getname, 1970 1972 .sendmsg = hci_sock_sendmsg, 1971 1973 .recvmsg = hci_sock_recvmsg, 1972 - #ifdef CONFIG_BT_LEGACY_IOCTL 1973 1974 .ioctl = hci_sock_ioctl, 1974 - #else 1975 - .ioctl = sock_no_ioctl, 1976 - #endif 1977 1975 .poll = datagram_poll, 1978 1976 .listen = sock_no_listen, 1979 1977 .shutdown = sock_no_shutdown,