summaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-09-06 17:45:08 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-09-06 17:45:08 -0400
commitaae3dbb4776e7916b6cd442d00159bea27a695c1 (patch)
treed074c5d783a81e7e2e084b1eba77f57459da7e37 /net/bluetooth
parentec3604c7a5aae8953545b0d05495357009a960e5 (diff)
parent66bed8465a808400eb14562510e26c8818082cb8 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller: 1) Support ipv6 checksum offload in sunvnet driver, from Shannon Nelson. 2) Move to RB-tree instead of custom AVL code in inetpeer, from Eric Dumazet. 3) Allow generic XDP to work on virtual devices, from John Fastabend. 4) Add bpf device maps and XDP_REDIRECT, which can be used to build arbitrary switching frameworks using XDP. From John Fastabend. 5) Remove UFO offloads from the tree, gave us little other than bugs. 6) Remove the IPSEC flow cache, from Florian Westphal. 7) Support ipv6 route offload in mlxsw driver. 8) Support VF representors in bnxt_en, from Sathya Perla. 9) Add support for forward error correction modes to ethtool, from Vidya Sagar Ravipati. 10) Add time filter for packet scheduler action dumping, from Jamal Hadi Salim. 11) Extend the zerocopy sendmsg() used by virtio and tap to regular sockets via MSG_ZEROCOPY. From Willem de Bruijn. 12) Significantly rework value tracking in the BPF verifier, from Edward Cree. 13) Add new jump instructions to eBPF, from Daniel Borkmann. 14) Rework rtnetlink plumbing so that operations can be run without taking the RTNL semaphore. From Florian Westphal. 15) Support XDP in tap driver, from Jason Wang. 16) Add 32-bit eBPF JIT for ARM, from Shubham Bansal. 17) Add Huawei hinic ethernet driver. 18) Allow to report MD5 keys in TCP inet_diag dumps, from Ivan Delalande. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1780 commits) i40e: point wb_desc at the nvm_wb_desc during i40e_read_nvm_aq i40e: avoid NVM acquire deadlock during NVM update drivers: net: xgene: Remove return statement from void function drivers: net: xgene: Configure tx/rx delay for ACPI drivers: net: xgene: Read tx/rx delay for ACPI rocker: fix kcalloc parameter order rds: Fix non-atomic operation on shared flag variable net: sched: don't use GFP_KERNEL under spin lock vhost_net: correctly check tx avail during rx busy polling net: mdio-mux: add mdio_mux parameter to mdio_mux_init() rxrpc: Make service connection lookup always check for retry net: stmmac: Delete dead code for MDIO registration gianfar: Fix Tx flow control deactivation cxgb4: Ignore MPS_TX_INT_CAUSE[Bubble] for T6 cxgb4: Fix pause frame count in t4_get_port_stats cxgb4: fix memory leak tun: rename generic_xdp to skb_xdp tun: reserve extra headroom only when XDP is set net: dsa: bcm_sf2: Configure IMP port TC2QOS mapping net: dsa: bcm_sf2: Advertise number of egress queues ...
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/6lowpan.c9
-rw-r--r--net/bluetooth/Kconfig22
-rw-r--r--net/bluetooth/hci_sock.c6
-rw-r--r--net/bluetooth/hci_sysfs.c4
-rw-r--r--net/bluetooth/lib.c6
-rw-r--r--net/bluetooth/selftest.c2
6 files changed, 35 insertions, 14 deletions
diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c
index ab3b654b05cc..4e2576fc0c59 100644
--- a/net/bluetooth/6lowpan.c
+++ b/net/bluetooth/6lowpan.c
@@ -273,9 +273,6 @@ static int iphc_decompress(struct sk_buff *skb, struct net_device *netdev,
273 struct lowpan_peer *peer) 273 struct lowpan_peer *peer)
274{ 274{
275 const u8 *saddr; 275 const u8 *saddr;
276 struct lowpan_btle_dev *dev;
277
278 dev = lowpan_btle_dev(netdev);
279 276
280 saddr = peer->lladdr; 277 saddr = peer->lladdr;
281 278
@@ -618,12 +615,8 @@ static void ifup(struct net_device *netdev)
618 615
619static void ifdown(struct net_device *netdev) 616static void ifdown(struct net_device *netdev)
620{ 617{
621 int err;
622
623 rtnl_lock(); 618 rtnl_lock();
624 err = dev_close(netdev); 619 dev_close(netdev);
625 if (err < 0)
626 BT_INFO("iface %s cannot be closed (%d)", netdev->name, err);
627 rtnl_unlock(); 620 rtnl_unlock();
628} 621}
629 622
diff --git a/net/bluetooth/Kconfig b/net/bluetooth/Kconfig
index 68f951b3e85a..c18115d22f00 100644
--- a/net/bluetooth/Kconfig
+++ b/net/bluetooth/Kconfig
@@ -45,6 +45,11 @@ config BT_BREDR
45 bool "Bluetooth Classic (BR/EDR) features" 45 bool "Bluetooth Classic (BR/EDR) features"
46 depends on BT 46 depends on BT
47 default y 47 default y
48 help
49 Bluetooth Classic includes support for Basic Rate (BR)
50 available with Bluetooth version 1.0b or later and support
51 for Enhanced Data Rate (EDR) available with Bluetooth
52 version 2.0 or later.
48 53
49source "net/bluetooth/rfcomm/Kconfig" 54source "net/bluetooth/rfcomm/Kconfig"
50 55
@@ -58,11 +63,18 @@ config BT_HS
58 bool "Bluetooth High Speed (HS) features" 63 bool "Bluetooth High Speed (HS) features"
59 depends on BT_BREDR 64 depends on BT_BREDR
60 default y 65 default y
66 help
67 Bluetooth High Speed includes support for off-loading
68 Bluetooth connections via 802.11 (wifi) physical layer
69 available with Bluetooth version 3.0 or later.
61 70
62config BT_LE 71config BT_LE
63 bool "Bluetooth Low Energy (LE) features" 72 bool "Bluetooth Low Energy (LE) features"
64 depends on BT 73 depends on BT
65 default y 74 default y
75 help
76 Bluetooth Low Energy includes support low-energy physical
77 layer available with Bluetooth version 4.0 or later.
66 78
67config BT_6LOWPAN 79config BT_6LOWPAN
68 tristate "Bluetooth 6LoWPAN support" 80 tristate "Bluetooth 6LoWPAN support"
@@ -114,4 +126,14 @@ config BT_DEBUGFS
114 Provide extensive information about internal Bluetooth states 126 Provide extensive information about internal Bluetooth states
115 in debugfs. 127 in debugfs.
116 128
129config 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
117source "drivers/bluetooth/Kconfig" 139source "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)
878 return 0; 878 return 0;
879} 879}
880 880
881#ifdef CONFIG_BT_LEGACY_IOCTL
881static int hci_sock_blacklist_add(struct hci_dev *hdev, void __user *arg) 882static int hci_sock_blacklist_add(struct hci_dev *hdev, void __user *arg)
882{ 883{
883 bdaddr_t bdaddr; 884 bdaddr_t bdaddr;
@@ -1049,6 +1050,7 @@ done:
1049 release_sock(sk); 1050 release_sock(sk);
1050 return err; 1051 return err;
1051} 1052}
1053#endif
1052 1054
1053static int hci_sock_bind(struct socket *sock, struct sockaddr *addr, 1055static int hci_sock_bind(struct socket *sock, struct sockaddr *addr,
1054 int addr_len) 1056 int addr_len)
@@ -1969,7 +1971,11 @@ static const struct proto_ops hci_sock_ops = {
1969 .getname = hci_sock_getname, 1971 .getname = hci_sock_getname,
1970 .sendmsg = hci_sock_sendmsg, 1972 .sendmsg = hci_sock_sendmsg,
1971 .recvmsg = hci_sock_recvmsg, 1973 .recvmsg = hci_sock_recvmsg,
1974#ifdef CONFIG_BT_LEGACY_IOCTL
1972 .ioctl = hci_sock_ioctl, 1975 .ioctl = hci_sock_ioctl,
1976#else
1977 .ioctl = sock_no_ioctl,
1978#endif
1973 .poll = datagram_poll, 1979 .poll = datagram_poll,
1974 .listen = sock_no_listen, 1980 .listen = sock_no_listen,
1975 .shutdown = sock_no_shutdown, 1981 .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)
13 kfree(conn); 13 kfree(conn);
14} 14}
15 15
16static struct device_type bt_link = { 16static const struct device_type bt_link = {
17 .name = "link", 17 .name = "link",
18 .release = bt_link_release, 18 .release = bt_link_release,
19}; 19};
@@ -86,7 +86,7 @@ static void bt_host_release(struct device *dev)
86 module_put(THIS_MODULE); 86 module_put(THIS_MODULE);
87} 87}
88 88
89static struct device_type bt_host = { 89static const struct device_type bt_host = {
90 .name = "host", 90 .name = "host",
91 .release = bt_host_release, 91 .release = bt_host_release,
92}; 92};
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 @@
30 30
31#include <net/bluetooth/bluetooth.h> 31#include <net/bluetooth/bluetooth.h>
32 32
33void baswap(bdaddr_t *dst, bdaddr_t *src) 33void baswap(bdaddr_t *dst, const bdaddr_t *src)
34{ 34{
35 unsigned char *d = (unsigned char *) dst; 35 const unsigned char *s = (const unsigned char *)src;
36 unsigned char *s = (unsigned char *) src; 36 unsigned char *d = (unsigned char *)dst;
37 unsigned int i; 37 unsigned int i;
38 38
39 for (i = 0; i < 6; i++) 39 for (i = 0; i < 6; i++)
diff --git a/net/bluetooth/selftest.c b/net/bluetooth/selftest.c
index ee92c925ecc5..34a1227f4391 100644
--- a/net/bluetooth/selftest.c
+++ b/net/bluetooth/selftest.c
@@ -164,7 +164,7 @@ static int __init test_ecdh_sample(const u8 priv_a[32], const u8 priv_b[32],
164 ret = -EINVAL; 164 ret = -EINVAL;
165 165
166out: 166out:
167 kfree(dhkey_a); 167 kfree(tmp);
168 return ret; 168 return ret;
169} 169}
170 170