diff options
author | David S. Miller <davem@davemloft.net> | 2014-12-26 18:23:37 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-12-26 18:23:37 -0500 |
commit | eb46e2215fc6bdaaf8eda3a6c7c0dd033d171cad (patch) | |
tree | e91bb44a445054634c8f0a65311c0285336d483e /net | |
parent | b63a2a1ff1f7cde479aef091a4b9a9f7238a0657 (diff) | |
parent | 6a8fc95c87110a466ee81675b41170b963f82bdb (diff) |
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth
Johan Hedberg says:
====================
Here's one more bluetooth pull request for 3.19. We've got two fixes:
- Fix for accepting connections with old user space versions of BlueZ
- Fix for Bluetooth controllers that don't have a public address
Both of these are regressions that were introduced in 3.17, so the
appropriate Cc: stable annotations are provided.
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/hci_event.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 39a5c8a01726..3f2e8b830cbd 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -242,7 +242,8 @@ static void hci_cc_read_local_name(struct hci_dev *hdev, struct sk_buff *skb) | |||
242 | if (rp->status) | 242 | if (rp->status) |
243 | return; | 243 | return; |
244 | 244 | ||
245 | if (test_bit(HCI_SETUP, &hdev->dev_flags)) | 245 | if (test_bit(HCI_SETUP, &hdev->dev_flags) || |
246 | test_bit(HCI_CONFIG, &hdev->dev_flags)) | ||
246 | memcpy(hdev->dev_name, rp->name, HCI_MAX_NAME_LENGTH); | 247 | memcpy(hdev->dev_name, rp->name, HCI_MAX_NAME_LENGTH); |
247 | } | 248 | } |
248 | 249 | ||
@@ -509,7 +510,8 @@ static void hci_cc_read_local_version(struct hci_dev *hdev, struct sk_buff *skb) | |||
509 | if (rp->status) | 510 | if (rp->status) |
510 | return; | 511 | return; |
511 | 512 | ||
512 | if (test_bit(HCI_SETUP, &hdev->dev_flags)) { | 513 | if (test_bit(HCI_SETUP, &hdev->dev_flags) || |
514 | test_bit(HCI_CONFIG, &hdev->dev_flags)) { | ||
513 | hdev->hci_ver = rp->hci_ver; | 515 | hdev->hci_ver = rp->hci_ver; |
514 | hdev->hci_rev = __le16_to_cpu(rp->hci_rev); | 516 | hdev->hci_rev = __le16_to_cpu(rp->hci_rev); |
515 | hdev->lmp_ver = rp->lmp_ver; | 517 | hdev->lmp_ver = rp->lmp_ver; |
@@ -528,7 +530,8 @@ static void hci_cc_read_local_commands(struct hci_dev *hdev, | |||
528 | if (rp->status) | 530 | if (rp->status) |
529 | return; | 531 | return; |
530 | 532 | ||
531 | if (test_bit(HCI_SETUP, &hdev->dev_flags)) | 533 | if (test_bit(HCI_SETUP, &hdev->dev_flags) || |
534 | test_bit(HCI_CONFIG, &hdev->dev_flags)) | ||
532 | memcpy(hdev->commands, rp->commands, sizeof(hdev->commands)); | 535 | memcpy(hdev->commands, rp->commands, sizeof(hdev->commands)); |
533 | } | 536 | } |
534 | 537 | ||
@@ -2194,7 +2197,12 @@ static void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *skb) | |||
2194 | return; | 2197 | return; |
2195 | } | 2198 | } |
2196 | 2199 | ||
2197 | if (!test_bit(HCI_CONNECTABLE, &hdev->dev_flags) && | 2200 | /* Require HCI_CONNECTABLE or a whitelist entry to accept the |
2201 | * connection. These features are only touched through mgmt so | ||
2202 | * only do the checks if HCI_MGMT is set. | ||
2203 | */ | ||
2204 | if (test_bit(HCI_MGMT, &hdev->dev_flags) && | ||
2205 | !test_bit(HCI_CONNECTABLE, &hdev->dev_flags) && | ||
2198 | !hci_bdaddr_list_lookup(&hdev->whitelist, &ev->bdaddr, | 2206 | !hci_bdaddr_list_lookup(&hdev->whitelist, &ev->bdaddr, |
2199 | BDADDR_BREDR)) { | 2207 | BDADDR_BREDR)) { |
2200 | hci_reject_conn(hdev, &ev->bdaddr); | 2208 | hci_reject_conn(hdev, &ev->bdaddr); |