Skip to content

Commit 94464a7

Browse files
DanstivVudentz
authored andcommitted
Bluetooth: Add new quirks for ATS2851
This adds quirks for broken extended create connection, and write auth payload timeout. Signed-off-by: Danil Pylaev <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent 4900e04 commit 94464a7

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

include/net/bluetooth/hci.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,20 @@ enum {
300300
*/
301301
HCI_QUIRK_BROKEN_SET_RPA_TIMEOUT,
302302

303+
/*
304+
* When this quirk is set, the HCI_OP_LE_EXT_CREATE_CONN command is
305+
* disabled. This is required for the Actions Semiconductor ATS2851
306+
* based controllers, which erroneously claims to support it.
307+
*/
308+
HCI_QUIRK_BROKEN_EXT_CREATE_CONN,
309+
310+
/*
311+
* When this quirk is set, the command WRITE_AUTH_PAYLOAD_TIMEOUT is
312+
* skipped. This is required for the Actions Semiconductor ATS2851
313+
* based controllers, due to a race condition in pairing process.
314+
*/
315+
HCI_QUIRK_BROKEN_WRITE_AUTH_PAYLOAD_TIMEOUT,
316+
303317
/* When this quirk is set, MSFT extension monitor tracking by
304318
* address filter is supported. Since tracking quantity of each
305319
* pattern is limited, this feature supports tracking multiple

include/net/bluetooth/hci_core.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1871,8 +1871,8 @@ void hci_conn_del_sysfs(struct hci_conn *conn);
18711871
!test_bit(HCI_QUIRK_BROKEN_EXT_SCAN, &(dev)->quirks))
18721872

18731873
/* Use ext create connection if command is supported */
1874-
#define use_ext_conn(dev) ((dev)->commands[37] & 0x80)
1875-
1874+
#define use_ext_conn(dev) (((dev)->commands[37] & 0x80) && \
1875+
!test_bit(HCI_QUIRK_BROKEN_EXT_CREATE_CONN, &(dev)->quirks))
18761876
/* Extended advertising support */
18771877
#define ext_adv_capable(dev) (((dev)->le_features[1] & HCI_LE_EXT_ADV))
18781878

@@ -1885,8 +1885,10 @@ void hci_conn_del_sysfs(struct hci_conn *conn);
18851885
* C24: Mandatory if the LE Controller supports Connection State and either
18861886
* LE Feature (LL Privacy) or LE Feature (Extended Advertising) is supported
18871887
*/
1888-
#define use_enhanced_conn_complete(dev) (ll_privacy_capable(dev) || \
1889-
ext_adv_capable(dev))
1888+
#define use_enhanced_conn_complete(dev) ((ll_privacy_capable(dev) || \
1889+
ext_adv_capable(dev)) && \
1890+
!test_bit(HCI_QUIRK_BROKEN_EXT_CREATE_CONN, \
1891+
&(dev)->quirks))
18901892

18911893
/* Periodic advertising support */
18921894
#define per_adv_capable(dev) (((dev)->le_features[1] & HCI_LE_PERIODIC_ADV))

0 commit comments

Comments
 (0)