diff options
-rw-r--r-- | net/bluetooth/hci_event.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index cfdada38369b..0c393fbae6e9 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -3864,23 +3864,25 @@ static void hci_le_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb) | |||
3864 | &conn->init_addr, | 3864 | &conn->init_addr, |
3865 | &conn->init_addr_type); | 3865 | &conn->init_addr_type); |
3866 | } | 3866 | } |
3867 | } else { | ||
3868 | /* Set the responder (our side) address type based on | ||
3869 | * the advertising address type. | ||
3870 | */ | ||
3871 | conn->resp_addr_type = hdev->adv_addr_type; | ||
3872 | if (hdev->adv_addr_type == ADDR_LE_DEV_RANDOM) | ||
3873 | bacpy(&conn->resp_addr, &hdev->random_addr); | ||
3874 | else | ||
3875 | bacpy(&conn->resp_addr, &hdev->bdaddr); | ||
3876 | |||
3877 | conn->init_addr_type = ev->bdaddr_type; | ||
3878 | bacpy(&conn->init_addr, &ev->bdaddr); | ||
3879 | } | 3867 | } |
3880 | } else { | 3868 | } else { |
3881 | cancel_delayed_work(&conn->le_conn_timeout); | 3869 | cancel_delayed_work(&conn->le_conn_timeout); |
3882 | } | 3870 | } |
3883 | 3871 | ||
3872 | if (!conn->out) { | ||
3873 | /* Set the responder (our side) address type based on | ||
3874 | * the advertising address type. | ||
3875 | */ | ||
3876 | conn->resp_addr_type = hdev->adv_addr_type; | ||
3877 | if (hdev->adv_addr_type == ADDR_LE_DEV_RANDOM) | ||
3878 | bacpy(&conn->resp_addr, &hdev->random_addr); | ||
3879 | else | ||
3880 | bacpy(&conn->resp_addr, &hdev->bdaddr); | ||
3881 | |||
3882 | conn->init_addr_type = ev->bdaddr_type; | ||
3883 | bacpy(&conn->init_addr, &ev->bdaddr); | ||
3884 | } | ||
3885 | |||
3884 | /* Lookup the identity address from the stored connection | 3886 | /* Lookup the identity address from the stored connection |
3885 | * address and address type. | 3887 | * address and address type. |
3886 | * | 3888 | * |