diff options
-rw-r--r-- | include/net/bluetooth/hci_core.h | 4 | ||||
-rw-r--r-- | include/net/bluetooth/mgmt.h | 1 | ||||
-rw-r--r-- | net/bluetooth/hci_event.c | 8 | ||||
-rw-r--r-- | net/bluetooth/mgmt.c | 6 |
4 files changed, 11 insertions, 8 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 720bdc26b7e9..facd7ed32b74 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -980,8 +980,8 @@ int mgmt_write_scan_failed(struct hci_dev *hdev, u8 scan, u8 status); | |||
980 | int mgmt_new_link_key(struct hci_dev *hdev, struct link_key *key, | 980 | int mgmt_new_link_key(struct hci_dev *hdev, struct link_key *key, |
981 | u8 persistent); | 981 | u8 persistent); |
982 | int mgmt_device_connected(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, | 982 | int mgmt_device_connected(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, |
983 | u8 addr_type, u8 *name, u8 name_len, | 983 | u8 addr_type, u32 flags, u8 *name, |
984 | u8 *dev_class); | 984 | u8 name_len, u8 *dev_class); |
985 | int mgmt_device_disconnected(struct hci_dev *hdev, bdaddr_t *bdaddr, | 985 | int mgmt_device_disconnected(struct hci_dev *hdev, bdaddr_t *bdaddr, |
986 | u8 link_type, u8 addr_type); | 986 | u8 link_type, u8 addr_type); |
987 | int mgmt_disconnect_failed(struct hci_dev *hdev, bdaddr_t *bdaddr, | 987 | int mgmt_disconnect_failed(struct hci_dev *hdev, bdaddr_t *bdaddr, |
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h index 09646f5ef36a..7aab53e6b813 100644 --- a/include/net/bluetooth/mgmt.h +++ b/include/net/bluetooth/mgmt.h | |||
@@ -357,6 +357,7 @@ struct mgmt_ev_new_long_term_key { | |||
357 | #define MGMT_EV_DEVICE_CONNECTED 0x000B | 357 | #define MGMT_EV_DEVICE_CONNECTED 0x000B |
358 | struct mgmt_ev_device_connected { | 358 | struct mgmt_ev_device_connected { |
359 | struct mgmt_addr_info addr; | 359 | struct mgmt_addr_info addr; |
360 | __le32 flags; | ||
360 | __le16 eir_len; | 361 | __le16 eir_len; |
361 | __u8 eir[0]; | 362 | __u8 eir[0]; |
362 | } __packed; | 363 | } __packed; |
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 3d1eef0df2a3..fb6543b60dec 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -1368,7 +1368,7 @@ static void hci_check_pending_name(struct hci_dev *hdev, struct hci_conn *conn, | |||
1368 | struct inquiry_entry *e; | 1368 | struct inquiry_entry *e; |
1369 | 1369 | ||
1370 | if (conn && !test_and_set_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) | 1370 | if (conn && !test_and_set_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) |
1371 | mgmt_device_connected(hdev, bdaddr, ACL_LINK, 0x00, | 1371 | mgmt_device_connected(hdev, bdaddr, ACL_LINK, 0x00, 0, |
1372 | name, name_len, conn->dev_class); | 1372 | name, name_len, conn->dev_class); |
1373 | 1373 | ||
1374 | if (discov->state == DISCOVERY_STOPPED) | 1374 | if (discov->state == DISCOVERY_STOPPED) |
@@ -2104,7 +2104,7 @@ static inline void hci_remote_features_evt(struct hci_dev *hdev, struct sk_buff | |||
2104 | hci_send_cmd(hdev, HCI_OP_REMOTE_NAME_REQ, sizeof(cp), &cp); | 2104 | hci_send_cmd(hdev, HCI_OP_REMOTE_NAME_REQ, sizeof(cp), &cp); |
2105 | } else if (!test_and_set_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) | 2105 | } else if (!test_and_set_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) |
2106 | mgmt_device_connected(hdev, &conn->dst, conn->type, | 2106 | mgmt_device_connected(hdev, &conn->dst, conn->type, |
2107 | conn->dst_type, NULL, 0, | 2107 | conn->dst_type, 0, NULL, 0, |
2108 | conn->dev_class); | 2108 | conn->dev_class); |
2109 | 2109 | ||
2110 | if (!hci_outgoing_auth_needed(hdev, conn)) { | 2110 | if (!hci_outgoing_auth_needed(hdev, conn)) { |
@@ -2872,7 +2872,7 @@ static inline void hci_remote_ext_features_evt(struct hci_dev *hdev, struct sk_b | |||
2872 | hci_send_cmd(hdev, HCI_OP_REMOTE_NAME_REQ, sizeof(cp), &cp); | 2872 | hci_send_cmd(hdev, HCI_OP_REMOTE_NAME_REQ, sizeof(cp), &cp); |
2873 | } else if (!test_and_set_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) | 2873 | } else if (!test_and_set_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) |
2874 | mgmt_device_connected(hdev, &conn->dst, conn->type, | 2874 | mgmt_device_connected(hdev, &conn->dst, conn->type, |
2875 | conn->dst_type, NULL, 0, | 2875 | conn->dst_type, 0, NULL, 0, |
2876 | conn->dev_class); | 2876 | conn->dev_class); |
2877 | 2877 | ||
2878 | if (!hci_outgoing_auth_needed(hdev, conn)) { | 2878 | if (!hci_outgoing_auth_needed(hdev, conn)) { |
@@ -3282,7 +3282,7 @@ static inline void hci_le_conn_complete_evt(struct hci_dev *hdev, struct sk_buff | |||
3282 | 3282 | ||
3283 | if (!test_and_set_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) | 3283 | if (!test_and_set_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) |
3284 | mgmt_device_connected(hdev, &ev->bdaddr, conn->type, | 3284 | mgmt_device_connected(hdev, &ev->bdaddr, conn->type, |
3285 | conn->dst_type, NULL, 0, 0); | 3285 | conn->dst_type, 0, NULL, 0, 0); |
3286 | 3286 | ||
3287 | conn->sec_level = BT_SECURITY_LOW; | 3287 | conn->sec_level = BT_SECURITY_LOW; |
3288 | conn->handle = __le16_to_cpu(ev->handle); | 3288 | conn->handle = __le16_to_cpu(ev->handle); |
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 93f2c1348add..79fe57573463 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -3249,8 +3249,8 @@ int mgmt_new_ltk(struct hci_dev *hdev, struct smp_ltk *key, u8 persistent) | |||
3249 | } | 3249 | } |
3250 | 3250 | ||
3251 | int mgmt_device_connected(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, | 3251 | int mgmt_device_connected(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, |
3252 | u8 addr_type, u8 *name, u8 name_len, | 3252 | u8 addr_type, u32 flags, u8 *name, |
3253 | u8 *dev_class) | 3253 | u8 name_len, u8 *dev_class) |
3254 | { | 3254 | { |
3255 | char buf[512]; | 3255 | char buf[512]; |
3256 | struct mgmt_ev_device_connected *ev = (void *) buf; | 3256 | struct mgmt_ev_device_connected *ev = (void *) buf; |
@@ -3259,6 +3259,8 @@ int mgmt_device_connected(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, | |||
3259 | bacpy(&ev->addr.bdaddr, bdaddr); | 3259 | bacpy(&ev->addr.bdaddr, bdaddr); |
3260 | ev->addr.type = link_to_mgmt(link_type, addr_type); | 3260 | ev->addr.type = link_to_mgmt(link_type, addr_type); |
3261 | 3261 | ||
3262 | put_unaligned_le32(flags, &ev->flags); | ||
3263 | |||
3262 | if (name_len > 0) | 3264 | if (name_len > 0) |
3263 | eir_len = eir_append_data(ev->eir, 0, EIR_NAME_COMPLETE, | 3265 | eir_len = eir_append_data(ev->eir, 0, EIR_NAME_COMPLETE, |
3264 | name, name_len); | 3266 | name, name_len); |