diff options
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/hci_event.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index d6da0939216d..b61b4e8e36fd 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -558,6 +558,35 @@ static inline void hci_inquiry_result_with_rssi_evt(struct hci_dev *hdev, struct | |||
558 | hci_dev_unlock(hdev); | 558 | hci_dev_unlock(hdev); |
559 | } | 559 | } |
560 | 560 | ||
561 | /* Extended Inquiry Result */ | ||
562 | static inline void hci_extended_inquiry_result_evt(struct hci_dev *hdev, struct sk_buff *skb) | ||
563 | { | ||
564 | struct inquiry_data data; | ||
565 | struct extended_inquiry_info *info = (struct extended_inquiry_info *) (skb->data + 1); | ||
566 | int num_rsp = *((__u8 *) skb->data); | ||
567 | |||
568 | BT_DBG("%s num_rsp %d", hdev->name, num_rsp); | ||
569 | |||
570 | if (!num_rsp) | ||
571 | return; | ||
572 | |||
573 | hci_dev_lock(hdev); | ||
574 | |||
575 | for (; num_rsp; num_rsp--) { | ||
576 | bacpy(&data.bdaddr, &info->bdaddr); | ||
577 | data.pscan_rep_mode = info->pscan_rep_mode; | ||
578 | data.pscan_period_mode = info->pscan_period_mode; | ||
579 | data.pscan_mode = 0x00; | ||
580 | memcpy(data.dev_class, info->dev_class, 3); | ||
581 | data.clock_offset = info->clock_offset; | ||
582 | data.rssi = info->rssi; | ||
583 | info++; | ||
584 | hci_inquiry_cache_update(hdev, &data); | ||
585 | } | ||
586 | |||
587 | hci_dev_unlock(hdev); | ||
588 | } | ||
589 | |||
561 | /* Connect Request */ | 590 | /* Connect Request */ |
562 | static inline void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *skb) | 591 | static inline void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *skb) |
563 | { | 592 | { |
@@ -940,6 +969,10 @@ void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb) | |||
940 | hci_inquiry_result_with_rssi_evt(hdev, skb); | 969 | hci_inquiry_result_with_rssi_evt(hdev, skb); |
941 | break; | 970 | break; |
942 | 971 | ||
972 | case HCI_EV_EXTENDED_INQUIRY_RESULT: | ||
973 | hci_extended_inquiry_result_evt(hdev, skb); | ||
974 | break; | ||
975 | |||
943 | case HCI_EV_CONN_REQUEST: | 976 | case HCI_EV_CONN_REQUEST: |
944 | hci_conn_request_evt(hdev, skb); | 977 | hci_conn_request_evt(hdev, skb); |
945 | break; | 978 | break; |