diff options
author | David S. Miller <davem@davemloft.net> | 2012-09-28 14:40:49 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-09-28 14:40:49 -0400 |
commit | 6a06e5e1bb217be077e1f8ee2745b4c5b1aa02db (patch) | |
tree | 8faea23112a11f52524eb413f71b7b02712d8b53 /net/bluetooth | |
parent | d9f72f359e00a45a6cd7cc2d5121b04b9dc927e1 (diff) | |
parent | 6672d90fe779dc0dfffe027c3ede12609df091c2 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/team/team.c
drivers/net/usb/qmi_wwan.c
net/batman-adv/bat_iv_ogm.c
net/ipv4/fib_frontend.c
net/ipv4/route.c
net/l2tp/l2tp_netlink.c
The team, fib_frontend, route, and l2tp_netlink conflicts were simply
overlapping changes.
qmi_wwan and bat_iv_ogm were of the "use HEAD" variety.
With help from Antonio Quartulli.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/bnep/sock.c | 4 | ||||
-rw-r--r-- | net/bluetooth/cmtp/sock.c | 4 | ||||
-rw-r--r-- | net/bluetooth/hci_core.c | 2 | ||||
-rw-r--r-- | net/bluetooth/hci_sock.c | 16 | ||||
-rw-r--r-- | net/bluetooth/hidp/sock.c | 4 | ||||
-rw-r--r-- | net/bluetooth/l2cap_core.c | 2 | ||||
-rw-r--r-- | net/bluetooth/mgmt.c | 16 |
7 files changed, 33 insertions, 15 deletions
diff --git a/net/bluetooth/bnep/sock.c b/net/bluetooth/bnep/sock.c index 5b6cc0bf4dec..e7154a58465f 100644 --- a/net/bluetooth/bnep/sock.c +++ b/net/bluetooth/bnep/sock.c | |||
@@ -64,7 +64,7 @@ static int bnep_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long | |||
64 | switch (cmd) { | 64 | switch (cmd) { |
65 | case BNEPCONNADD: | 65 | case BNEPCONNADD: |
66 | if (!capable(CAP_NET_ADMIN)) | 66 | if (!capable(CAP_NET_ADMIN)) |
67 | return -EACCES; | 67 | return -EPERM; |
68 | 68 | ||
69 | if (copy_from_user(&ca, argp, sizeof(ca))) | 69 | if (copy_from_user(&ca, argp, sizeof(ca))) |
70 | return -EFAULT; | 70 | return -EFAULT; |
@@ -90,7 +90,7 @@ static int bnep_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long | |||
90 | 90 | ||
91 | case BNEPCONNDEL: | 91 | case BNEPCONNDEL: |
92 | if (!capable(CAP_NET_ADMIN)) | 92 | if (!capable(CAP_NET_ADMIN)) |
93 | return -EACCES; | 93 | return -EPERM; |
94 | 94 | ||
95 | if (copy_from_user(&cd, argp, sizeof(cd))) | 95 | if (copy_from_user(&cd, argp, sizeof(cd))) |
96 | return -EFAULT; | 96 | return -EFAULT; |
diff --git a/net/bluetooth/cmtp/sock.c b/net/bluetooth/cmtp/sock.c index d5cacef52748..aacb802d1ee4 100644 --- a/net/bluetooth/cmtp/sock.c +++ b/net/bluetooth/cmtp/sock.c | |||
@@ -78,7 +78,7 @@ static int cmtp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long | |||
78 | switch (cmd) { | 78 | switch (cmd) { |
79 | case CMTPCONNADD: | 79 | case CMTPCONNADD: |
80 | if (!capable(CAP_NET_ADMIN)) | 80 | if (!capable(CAP_NET_ADMIN)) |
81 | return -EACCES; | 81 | return -EPERM; |
82 | 82 | ||
83 | if (copy_from_user(&ca, argp, sizeof(ca))) | 83 | if (copy_from_user(&ca, argp, sizeof(ca))) |
84 | return -EFAULT; | 84 | return -EFAULT; |
@@ -103,7 +103,7 @@ static int cmtp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long | |||
103 | 103 | ||
104 | case CMTPCONNDEL: | 104 | case CMTPCONNDEL: |
105 | if (!capable(CAP_NET_ADMIN)) | 105 | if (!capable(CAP_NET_ADMIN)) |
106 | return -EACCES; | 106 | return -EPERM; |
107 | 107 | ||
108 | if (copy_from_user(&cd, argp, sizeof(cd))) | 108 | if (copy_from_user(&cd, argp, sizeof(cd))) |
109 | return -EFAULT; | 109 | return -EFAULT; |
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index fa974a19d365..8806869ad4d6 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -735,6 +735,8 @@ static int hci_dev_do_close(struct hci_dev *hdev) | |||
735 | 735 | ||
736 | cancel_work_sync(&hdev->le_scan); | 736 | cancel_work_sync(&hdev->le_scan); |
737 | 737 | ||
738 | cancel_delayed_work(&hdev->power_off); | ||
739 | |||
738 | hci_req_cancel(hdev, ENODEV); | 740 | hci_req_cancel(hdev, ENODEV); |
739 | hci_req_lock(hdev); | 741 | hci_req_lock(hdev); |
740 | 742 | ||
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c index bb64331db3b7..07f073935811 100644 --- a/net/bluetooth/hci_sock.c +++ b/net/bluetooth/hci_sock.c | |||
@@ -490,7 +490,7 @@ static int hci_sock_bound_ioctl(struct sock *sk, unsigned int cmd, | |||
490 | switch (cmd) { | 490 | switch (cmd) { |
491 | case HCISETRAW: | 491 | case HCISETRAW: |
492 | if (!capable(CAP_NET_ADMIN)) | 492 | if (!capable(CAP_NET_ADMIN)) |
493 | return -EACCES; | 493 | return -EPERM; |
494 | 494 | ||
495 | if (test_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks)) | 495 | if (test_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks)) |
496 | return -EPERM; | 496 | return -EPERM; |
@@ -510,12 +510,12 @@ static int hci_sock_bound_ioctl(struct sock *sk, unsigned int cmd, | |||
510 | 510 | ||
511 | case HCIBLOCKADDR: | 511 | case HCIBLOCKADDR: |
512 | if (!capable(CAP_NET_ADMIN)) | 512 | if (!capable(CAP_NET_ADMIN)) |
513 | return -EACCES; | 513 | return -EPERM; |
514 | return hci_sock_blacklist_add(hdev, (void __user *) arg); | 514 | return hci_sock_blacklist_add(hdev, (void __user *) arg); |
515 | 515 | ||
516 | case HCIUNBLOCKADDR: | 516 | case HCIUNBLOCKADDR: |
517 | if (!capable(CAP_NET_ADMIN)) | 517 | if (!capable(CAP_NET_ADMIN)) |
518 | return -EACCES; | 518 | return -EPERM; |
519 | return hci_sock_blacklist_del(hdev, (void __user *) arg); | 519 | return hci_sock_blacklist_del(hdev, (void __user *) arg); |
520 | 520 | ||
521 | default: | 521 | default: |
@@ -546,22 +546,22 @@ static int hci_sock_ioctl(struct socket *sock, unsigned int cmd, | |||
546 | 546 | ||
547 | case HCIDEVUP: | 547 | case HCIDEVUP: |
548 | if (!capable(CAP_NET_ADMIN)) | 548 | if (!capable(CAP_NET_ADMIN)) |
549 | return -EACCES; | 549 | return -EPERM; |
550 | return hci_dev_open(arg); | 550 | return hci_dev_open(arg); |
551 | 551 | ||
552 | case HCIDEVDOWN: | 552 | case HCIDEVDOWN: |
553 | if (!capable(CAP_NET_ADMIN)) | 553 | if (!capable(CAP_NET_ADMIN)) |
554 | return -EACCES; | 554 | return -EPERM; |
555 | return hci_dev_close(arg); | 555 | return hci_dev_close(arg); |
556 | 556 | ||
557 | case HCIDEVRESET: | 557 | case HCIDEVRESET: |
558 | if (!capable(CAP_NET_ADMIN)) | 558 | if (!capable(CAP_NET_ADMIN)) |
559 | return -EACCES; | 559 | return -EPERM; |
560 | return hci_dev_reset(arg); | 560 | return hci_dev_reset(arg); |
561 | 561 | ||
562 | case HCIDEVRESTAT: | 562 | case HCIDEVRESTAT: |
563 | if (!capable(CAP_NET_ADMIN)) | 563 | if (!capable(CAP_NET_ADMIN)) |
564 | return -EACCES; | 564 | return -EPERM; |
565 | return hci_dev_reset_stat(arg); | 565 | return hci_dev_reset_stat(arg); |
566 | 566 | ||
567 | case HCISETSCAN: | 567 | case HCISETSCAN: |
@@ -573,7 +573,7 @@ static int hci_sock_ioctl(struct socket *sock, unsigned int cmd, | |||
573 | case HCISETACLMTU: | 573 | case HCISETACLMTU: |
574 | case HCISETSCOMTU: | 574 | case HCISETSCOMTU: |
575 | if (!capable(CAP_NET_ADMIN)) | 575 | if (!capable(CAP_NET_ADMIN)) |
576 | return -EACCES; | 576 | return -EPERM; |
577 | return hci_dev_cmd(cmd, argp); | 577 | return hci_dev_cmd(cmd, argp); |
578 | 578 | ||
579 | case HCIINQUIRY: | 579 | case HCIINQUIRY: |
diff --git a/net/bluetooth/hidp/sock.c b/net/bluetooth/hidp/sock.c index eca3889371c4..82a829d90b0f 100644 --- a/net/bluetooth/hidp/sock.c +++ b/net/bluetooth/hidp/sock.c | |||
@@ -62,7 +62,7 @@ static int hidp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long | |||
62 | switch (cmd) { | 62 | switch (cmd) { |
63 | case HIDPCONNADD: | 63 | case HIDPCONNADD: |
64 | if (!capable(CAP_NET_ADMIN)) | 64 | if (!capable(CAP_NET_ADMIN)) |
65 | return -EACCES; | 65 | return -EPERM; |
66 | 66 | ||
67 | if (copy_from_user(&ca, argp, sizeof(ca))) | 67 | if (copy_from_user(&ca, argp, sizeof(ca))) |
68 | return -EFAULT; | 68 | return -EFAULT; |
@@ -97,7 +97,7 @@ static int hidp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long | |||
97 | 97 | ||
98 | case HIDPCONNDEL: | 98 | case HIDPCONNDEL: |
99 | if (!capable(CAP_NET_ADMIN)) | 99 | if (!capable(CAP_NET_ADMIN)) |
100 | return -EACCES; | 100 | return -EPERM; |
101 | 101 | ||
102 | if (copy_from_user(&cd, argp, sizeof(cd))) | 102 | if (copy_from_user(&cd, argp, sizeof(cd))) |
103 | return -EFAULT; | 103 | return -EFAULT; |
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index e0abaf3cb6a5..bda526edfb9e 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
@@ -1025,7 +1025,7 @@ static void l2cap_send_disconn_req(struct l2cap_conn *conn, struct l2cap_chan *c | |||
1025 | if (!conn) | 1025 | if (!conn) |
1026 | return; | 1026 | return; |
1027 | 1027 | ||
1028 | if (chan->mode == L2CAP_MODE_ERTM) { | 1028 | if (chan->mode == L2CAP_MODE_ERTM && chan->state == BT_CONNECTED) { |
1029 | __clear_retrans_timer(chan); | 1029 | __clear_retrans_timer(chan); |
1030 | __clear_monitor_timer(chan); | 1030 | __clear_monitor_timer(chan); |
1031 | __clear_ack_timer(chan); | 1031 | __clear_ack_timer(chan); |
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index a3329cbd3e4d..e3296319606b 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -2891,6 +2891,22 @@ int mgmt_powered(struct hci_dev *hdev, u8 powered) | |||
2891 | if (scan) | 2891 | if (scan) |
2892 | hci_send_cmd(hdev, HCI_OP_WRITE_SCAN_ENABLE, 1, &scan); | 2892 | hci_send_cmd(hdev, HCI_OP_WRITE_SCAN_ENABLE, 1, &scan); |
2893 | 2893 | ||
2894 | if (test_bit(HCI_SSP_ENABLED, &hdev->dev_flags)) { | ||
2895 | u8 ssp = 1; | ||
2896 | |||
2897 | hci_send_cmd(hdev, HCI_OP_WRITE_SSP_MODE, 1, &ssp); | ||
2898 | } | ||
2899 | |||
2900 | if (test_bit(HCI_LE_ENABLED, &hdev->dev_flags)) { | ||
2901 | struct hci_cp_write_le_host_supported cp; | ||
2902 | |||
2903 | cp.le = 1; | ||
2904 | cp.simul = !!(hdev->features[6] & LMP_SIMUL_LE_BR); | ||
2905 | |||
2906 | hci_send_cmd(hdev, HCI_OP_WRITE_LE_HOST_SUPPORTED, | ||
2907 | sizeof(cp), &cp); | ||
2908 | } | ||
2909 | |||
2894 | update_class(hdev); | 2910 | update_class(hdev); |
2895 | update_name(hdev, hdev->dev_name); | 2911 | update_name(hdev, hdev->dev_name); |
2896 | update_eir(hdev); | 2912 | update_eir(hdev); |