|
@@ -497,43 +497,6 @@ static void le_setup(struct hci_request *req)
|
|
set_bit(HCI_LE_ENABLED, &hdev->dev_flags);
|
|
set_bit(HCI_LE_ENABLED, &hdev->dev_flags);
|
|
}
|
|
}
|
|
|
|
|
|
-static u8 hci_get_inquiry_mode(struct hci_dev *hdev)
|
|
|
|
-{
|
|
|
|
- if (lmp_ext_inq_capable(hdev))
|
|
|
|
- return 0x02;
|
|
|
|
-
|
|
|
|
- if (lmp_inq_rssi_capable(hdev))
|
|
|
|
- return 0x01;
|
|
|
|
-
|
|
|
|
- if (hdev->manufacturer == 11 && hdev->hci_rev == 0x00 &&
|
|
|
|
- hdev->lmp_subver == 0x0757)
|
|
|
|
- return 0x01;
|
|
|
|
-
|
|
|
|
- if (hdev->manufacturer == 15) {
|
|
|
|
- if (hdev->hci_rev == 0x03 && hdev->lmp_subver == 0x6963)
|
|
|
|
- return 0x01;
|
|
|
|
- if (hdev->hci_rev == 0x09 && hdev->lmp_subver == 0x6963)
|
|
|
|
- return 0x01;
|
|
|
|
- if (hdev->hci_rev == 0x00 && hdev->lmp_subver == 0x6965)
|
|
|
|
- return 0x01;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (hdev->manufacturer == 31 && hdev->hci_rev == 0x2005 &&
|
|
|
|
- hdev->lmp_subver == 0x1805)
|
|
|
|
- return 0x01;
|
|
|
|
-
|
|
|
|
- return 0x00;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-static void hci_setup_inquiry_mode(struct hci_request *req)
|
|
|
|
-{
|
|
|
|
- u8 mode;
|
|
|
|
-
|
|
|
|
- mode = hci_get_inquiry_mode(req->hdev);
|
|
|
|
-
|
|
|
|
- hci_req_add(req, HCI_OP_WRITE_INQUIRY_MODE, 1, &mode);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
static void hci_setup_event_mask(struct hci_request *req)
|
|
static void hci_setup_event_mask(struct hci_request *req)
|
|
{
|
|
{
|
|
struct hci_dev *hdev = req->hdev;
|
|
struct hci_dev *hdev = req->hdev;
|
|
@@ -658,8 +621,17 @@ static void hci_init2_req(struct hci_request *req, unsigned long opt)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- if (lmp_inq_rssi_capable(hdev))
|
|
|
|
- hci_setup_inquiry_mode(req);
|
|
|
|
|
|
+ if (lmp_inq_rssi_capable(hdev)) {
|
|
|
|
+ u8 mode;
|
|
|
|
+
|
|
|
|
+ /* If Extended Inquiry Result events are supported, then
|
|
|
|
+ * they are clearly preferred over Inquiry Result with RSSI
|
|
|
|
+ * events.
|
|
|
|
+ */
|
|
|
|
+ mode = lmp_ext_inq_capable(hdev) ? 0x02 : 0x01;
|
|
|
|
+
|
|
|
|
+ hci_req_add(req, HCI_OP_WRITE_INQUIRY_MODE, 1, &mode);
|
|
|
|
+ }
|
|
|
|
|
|
if (lmp_inq_tx_pwr_capable(hdev))
|
|
if (lmp_inq_tx_pwr_capable(hdev))
|
|
hci_req_add(req, HCI_OP_READ_INQ_RSP_TX_POWER, 0, NULL);
|
|
hci_req_add(req, HCI_OP_READ_INQ_RSP_TX_POWER, 0, NULL);
|