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>
This commit is contained in:
commit
eb46e2215f
@ -242,7 +242,8 @@ static void hci_cc_read_local_name(struct hci_dev *hdev, struct sk_buff *skb)
|
|||||||
if (rp->status)
|
if (rp->status)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (test_bit(HCI_SETUP, &hdev->dev_flags))
|
if (test_bit(HCI_SETUP, &hdev->dev_flags) ||
|
||||||
|
test_bit(HCI_CONFIG, &hdev->dev_flags))
|
||||||
memcpy(hdev->dev_name, rp->name, HCI_MAX_NAME_LENGTH);
|
memcpy(hdev->dev_name, rp->name, HCI_MAX_NAME_LENGTH);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -509,7 +510,8 @@ static void hci_cc_read_local_version(struct hci_dev *hdev, struct sk_buff *skb)
|
|||||||
if (rp->status)
|
if (rp->status)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (test_bit(HCI_SETUP, &hdev->dev_flags)) {
|
if (test_bit(HCI_SETUP, &hdev->dev_flags) ||
|
||||||
|
test_bit(HCI_CONFIG, &hdev->dev_flags)) {
|
||||||
hdev->hci_ver = rp->hci_ver;
|
hdev->hci_ver = rp->hci_ver;
|
||||||
hdev->hci_rev = __le16_to_cpu(rp->hci_rev);
|
hdev->hci_rev = __le16_to_cpu(rp->hci_rev);
|
||||||
hdev->lmp_ver = rp->lmp_ver;
|
hdev->lmp_ver = rp->lmp_ver;
|
||||||
@ -528,7 +530,8 @@ static void hci_cc_read_local_commands(struct hci_dev *hdev,
|
|||||||
if (rp->status)
|
if (rp->status)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (test_bit(HCI_SETUP, &hdev->dev_flags))
|
if (test_bit(HCI_SETUP, &hdev->dev_flags) ||
|
||||||
|
test_bit(HCI_CONFIG, &hdev->dev_flags))
|
||||||
memcpy(hdev->commands, rp->commands, sizeof(hdev->commands));
|
memcpy(hdev->commands, rp->commands, sizeof(hdev->commands));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2194,7 +2197,12 @@ static void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *skb)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!test_bit(HCI_CONNECTABLE, &hdev->dev_flags) &&
|
/* Require HCI_CONNECTABLE or a whitelist entry to accept the
|
||||||
|
* connection. These features are only touched through mgmt so
|
||||||
|
* only do the checks if HCI_MGMT is set.
|
||||||
|
*/
|
||||||
|
if (test_bit(HCI_MGMT, &hdev->dev_flags) &&
|
||||||
|
!test_bit(HCI_CONNECTABLE, &hdev->dev_flags) &&
|
||||||
!hci_bdaddr_list_lookup(&hdev->whitelist, &ev->bdaddr,
|
!hci_bdaddr_list_lookup(&hdev->whitelist, &ev->bdaddr,
|
||||||
BDADDR_BREDR)) {
|
BDADDR_BREDR)) {
|
||||||
hci_reject_conn(hdev, &ev->bdaddr);
|
hci_reject_conn(hdev, &ev->bdaddr);
|
||||||
|
Loading…
Reference in New Issue
Block a user