File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2658,6 +2658,9 @@ static int btintel_setup_combined(struct hci_dev *hdev)
26582658 set_bit (HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED ,
26592659 & hdev -> quirks );
26602660
2661+ /* These variants don't seem to support LE Coded PHY */
2662+ set_bit (HCI_QUIRK_BROKEN_LE_CODED , & hdev -> quirks );
2663+
26612664 /* Setup MSFT Extension support */
26622665 btintel_set_msft_opcode (hdev , ver .hw_variant );
26632666
@@ -2729,6 +2732,9 @@ static int btintel_setup_combined(struct hci_dev *hdev)
27292732 */
27302733 set_bit (HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED , & hdev -> quirks );
27312734
2735+ /* These variants don't seem to support LE Coded PHY */
2736+ set_bit (HCI_QUIRK_BROKEN_LE_CODED , & hdev -> quirks );
2737+
27322738 /* Set Valid LE States quirk */
27332739 set_bit (HCI_QUIRK_VALID_LE_STATES , & hdev -> quirks );
27342740
Original file line number Diff line number Diff line change @@ -309,6 +309,16 @@ enum {
309309 * to support it.
310310 */
311311 HCI_QUIRK_BROKEN_SET_RPA_TIMEOUT ,
312+
313+ /*
314+ * When this quirk is set, LE Coded PHY shall not be used. This is
315+ * required for some Intel controllers which erroneously claim to
316+ * support it but it causes problems with extended scanning.
317+ *
318+ * This quirk can be set before hci_register_dev is called or
319+ * during the hdev->setup vendor callback.
320+ */
321+ HCI_QUIRK_BROKEN_LE_CODED ,
312322};
313323
314324/* HCI device flags */
Original file line number Diff line number Diff line change @@ -1713,7 +1713,9 @@ void hci_conn_del_sysfs(struct hci_conn *conn);
17131713#define scan_2m (dev ) (((dev)->le_tx_def_phys & HCI_LE_SET_PHY_2M) || \
17141714 ((dev)->le_rx_def_phys & HCI_LE_SET_PHY_2M))
17151715
1716- #define le_coded_capable (dev ) (((dev)->le_features[1] & HCI_LE_PHY_CODED))
1716+ #define le_coded_capable (dev ) (((dev)->le_features[1] & HCI_LE_PHY_CODED) && \
1717+ !test_bit(HCI_QUIRK_BROKEN_LE_CODED, \
1718+ &(dev)->quirks))
17171719
17181720#define scan_coded (dev ) (((dev)->le_tx_def_phys & HCI_LE_SET_PHY_CODED) || \
17191721 ((dev)->le_rx_def_phys & HCI_LE_SET_PHY_CODED))
Original file line number Diff line number Diff line change @@ -4684,7 +4684,10 @@ static const struct {
46844684 "advertised, but not supported." ),
46854685 HCI_QUIRK_BROKEN (SET_RPA_TIMEOUT ,
46864686 "HCI LE Set Random Private Address Timeout command is "
4687- "advertised, but not supported." )
4687+ "advertised, but not supported." ),
4688+ HCI_QUIRK_BROKEN (LE_CODED ,
4689+ "HCI LE Coded PHY feature bit is set, "
4690+ "but its usage is not supported." )
46884691};
46894692
46904693/* This function handles hdev setup stage:
You can’t perform that action at this time.
0 commit comments