Bluetooth: Move BR/EDR default events behind its features
Subsystems (2)
Marcel Holtmann
maintainerPATCH 2/4 Bluetooth: Move BR/EDR default events behind its features
There are some BR/EDR default events for Bluetooth 1.2 or later controllers that are not conditional on their features being present.
--- net/bluetooth/hci_core.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
net/bluetooth/hci_core.c +8 -4
@@ -531,10 +531,6 @@ static void hci_setup_event_mask(struct hci_request *req)if (lmp_bredr_capable (hdev)) { events[4 ] |=0x01 ;/* Flow Specification Complete */ - events[4 ] |=0x02 ;/* Inquiry Result with RSSI */ - events[4 ] |=0x04 ;/* Read Remote Extended Features Complete */ - events[5 ] |=0x08 ;/* Synchronous Connection Complete */ - events[5 ] |=0x10 ;/* Synchronous Connection Changed */ }else {/* Use a different default for LE-only devices */ memset (events,0 ,sizeof (events));
@@ -555,6 +551,14 @@ static void hci_setup_event_mask(struct hci_request *req)if (lmp_inq_rssi_capable (hdev)) events[4 ] |=0x02 ;/* Inquiry Result with RSSI */ +if (lmp_ext_feat_capable (hdev)) + events[4 ] |=0x04 ;/* Read Remote Extended Features Complete */ + +if (lmp_esco_capable (hdev)) { + events[5 ] |=0x08 ;/* Synchronous Connection Complete */ + events[5 ] |=0x10 ;/* Synchronous Connection Changed */ + } +if (lmp_sniffsubr_capable (hdev)) events[5 ] |=0x20 ;/* Sniff Subrating */
Signature · 1 line
2.4.3
Hi Marcel,
Quoted 7 lines · Marcel Holtmann
There are some BR/EDR default events for Bluetooth 1.2 or later controllers that are not conditional on their features being present.
Signed-off-by Marcel Holtmann <[email protected]>--- net/bluetooth/hci_core.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
I realize I already applied this one, but:
net/bluetooth/hci_core.c static void hci_setup_event_mask(struct hci_request *req) · line 560
Quoted 4 lines
net/bluetooth/hci_core.c +4
-0+if (lmp_esco_capable (hdev)) { + events[5 ] |=0x08 ;/* Synchronous Connection Complete */ + events[5 ] |=0x10 ;/* Synchronous Connection Changed */ + }
Synchronous Connection Complete is relevant also for non-ESCO controllers, isn't it?
Johan
Marcel Holtmann
maintainerHi Johan,
Quoted 10 lines
Quoted 7 lines
There are some BR/EDR default events for Bluetooth 1.2 or later controllers that are not conditional on their features being present.
Signed-off-by Marcel Holtmann <[email protected]>---
net/bluetooth/hci_core.c| 12 ++++++++----1 file changed, 8 insertions(+), 4 deletions(-)I realize I already applied this one, but:
Quoted 7 lines
net/bluetooth/hci_core.c static void hci_setup_event_mask(struct hci_request *req) · line 560
Quoted 4 lines
net/bluetooth/hci_core.c +4
-0+if (lmp_esco_capable (hdev)) { + events[5 ] |=0x08 ;/* Synchronous Connection Complete */ + events[5 ] |=0x10 ;/* Synchronous Connection Changed */ + }Synchronous Connection Complete is relevant also for non-ESCO controllers, isn't it?
that is true, but if you look at hci_conn.c and sco.c, then you see we use the same logic there to decide if we use Add SCO or Setup Sync Connection. So this just brings that in sync.
Regards
Marcel
Hi Marcel,
Quoted 20 lines · Marcel Holtmann
Hi Johan,
Quoted 10 lines
Quoted 7 lines
There are some BR/EDR default events for Bluetooth 1.2 or later controllers that are not conditional on their features being present.
Signed-off-by Marcel Holtmann <[email protected]>---
net/bluetooth/hci_core.c| 12 ++++++++----1 file changed, 8 insertions(+), 4 deletions(-)I realize I already applied this one, but:
Quoted 7 lines
net/bluetooth/hci_core.c static void hci_setup_event_mask(struct hci_request *req) · line 560
Quoted 4 lines
net/bluetooth/hci_core.c +4
-0+if (lmp_esco_capable (hdev)) { + events[5 ] |=0x08 ;/* Synchronous Connection Complete */ + events[5 ] |=0x10 ;/* Synchronous Connection Changed */ + }Synchronous Connection Complete is relevant also for non-ESCO controllers, isn't it?
Quoted 3 lines
that is true, but if you look at
hci_conn.candsco.c, then you see we use the same logic there to decide if we use Add SCO or Setup Sync Connection. So this just brings that in sync.
Understood, it took some time for me to figure out from the core spec exactly under which conditions Conn Complete or Sync Conn Complete will happen.
Johan