[Bluetooth] Update class of device value whenever possible
[deliverable/linux.git] / net / bluetooth / hci_event.c
index bf3fbf9817b4324b2df9eccc562037128ea414d0..e47676128bb529ac0430b8e3ade04df012fd464f 100644 (file)
@@ -796,10 +796,14 @@ static inline void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *sk
 
        if (mask & HCI_LM_ACCEPT) {
                /* Connection accepted */
+               struct inquiry_entry *ie;
                struct hci_conn *conn;
 
                hci_dev_lock(hdev);
 
+               if ((ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr)))
+                       memcpy(ie->data.dev_class, ev->dev_class, 3);
+
                conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr);
                if (!conn) {
                        if (!(conn = hci_conn_add(hdev, ev->link_type, &ev->bdaddr))) {
This page took 0.023833 seconds and 5 git commands to generate.