diff options
author | David S. Miller | 2017-09-03 21:27:55 -0700 |
---|---|---|
committer | David S. Miller | 2017-09-03 21:27:55 -0700 |
commit | 45865dabb14cee3be334c1376d69e959a62af561 (patch) | |
tree | 8393f518846dd2470aa28b24e6c54c90f6104bd6 /net | |
parent | f98ce38927d53e84960fbc5f7789d5ad6126b076 (diff) | |
parent | 65bce46298d064dff9db1282e17bb26602715819 (diff) |
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
Johan Hedberg says:
====================
pull request: bluetooth-next 2017-09-03
Here's one last bluetooth-next pull request for the 4.14 kernel:
- NULL pointer fix in ca8210 802.15.4 driver
- A few "const" fixes
- New Kconfig option for disabling legacy interfaces
Please let me know if there are any issues pulling. Thanks.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/Kconfig | 10 | ||||
-rw-r--r-- | net/bluetooth/hci_sock.c | 6 | ||||
-rw-r--r-- | net/bluetooth/hci_sysfs.c | 4 | ||||
-rw-r--r-- | net/bluetooth/lib.c | 6 | ||||
-rw-r--r-- | net/ieee802154/6lowpan/core.c | 2 |
5 files changed, 22 insertions, 6 deletions
diff --git a/net/bluetooth/Kconfig b/net/bluetooth/Kconfig index db82a40875e8..c18115d22f00 100644 --- a/net/bluetooth/Kconfig +++ b/net/bluetooth/Kconfig @@ -126,4 +126,14 @@ config BT_DEBUGFS Provide extensive information about internal Bluetooth states in debugfs. +config BT_LEGACY_IOCTL + bool "Enable legacy ioctl interfaces" + depends on BT && BT_BREDR + default y + help + Enable support for legacy ioctl interfaces. This is only needed + for old and deprecated applications using direct ioctl calls for + controller management. Since Linux 3.4 all configuration and + setup is done via mgmt interface and this is no longer needed. + source "drivers/bluetooth/Kconfig" diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c index 65d734c165bd..0bad296fe0af 100644 --- a/net/bluetooth/hci_sock.c +++ b/net/bluetooth/hci_sock.c @@ -878,6 +878,7 @@ static int hci_sock_release(struct socket *sock) return 0; } +#ifdef CONFIG_BT_LEGACY_IOCTL static int hci_sock_blacklist_add(struct hci_dev *hdev, void __user *arg) { bdaddr_t bdaddr; @@ -1049,6 +1050,7 @@ done: release_sock(sk); return err; } +#endif static int hci_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_len) @@ -1969,7 +1971,11 @@ static const struct proto_ops hci_sock_ops = { .getname = hci_sock_getname, .sendmsg = hci_sock_sendmsg, .recvmsg = hci_sock_recvmsg, +#ifdef CONFIG_BT_LEGACY_IOCTL .ioctl = hci_sock_ioctl, +#else + .ioctl = sock_no_ioctl, +#endif .poll = datagram_poll, .listen = sock_no_listen, .shutdown = sock_no_shutdown, diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c index ca7a35ebaefb..aa300f3a0d51 100644 --- a/net/bluetooth/hci_sysfs.c +++ b/net/bluetooth/hci_sysfs.c @@ -13,7 +13,7 @@ static void bt_link_release(struct device *dev) kfree(conn); } -static struct device_type bt_link = { +static const struct device_type bt_link = { .name = "link", .release = bt_link_release, }; @@ -86,7 +86,7 @@ static void bt_host_release(struct device *dev) module_put(THIS_MODULE); } -static struct device_type bt_host = { +static const struct device_type bt_host = { .name = "host", .release = bt_host_release, }; diff --git a/net/bluetooth/lib.c b/net/bluetooth/lib.c index aa4cf64e32a6..63e65d9b4b24 100644 --- a/net/bluetooth/lib.c +++ b/net/bluetooth/lib.c @@ -30,10 +30,10 @@ #include <net/bluetooth/bluetooth.h> -void baswap(bdaddr_t *dst, bdaddr_t *src) +void baswap(bdaddr_t *dst, const bdaddr_t *src) { - unsigned char *d = (unsigned char *) dst; - unsigned char *s = (unsigned char *) src; + const unsigned char *s = (const unsigned char *)src; + unsigned char *d = (unsigned char *)dst; unsigned int i; for (i = 0; i < 6; i++) diff --git a/net/ieee802154/6lowpan/core.c b/net/ieee802154/6lowpan/core.c index de2661cd0328..974765b7d92a 100644 --- a/net/ieee802154/6lowpan/core.c +++ b/net/ieee802154/6lowpan/core.c @@ -54,7 +54,7 @@ static int open_count; -static struct header_ops lowpan_header_ops = { +static const struct header_ops lowpan_header_ops = { .create = lowpan_header_create, }; |