Skip to content

Commit

Permalink
Bluetooth: Move BR/EDR default events behind its features
Browse files Browse the repository at this point in the history
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]>
Signed-off-by: Johan Hedberg <[email protected]>
  • Loading branch information
holtmann committed Nov 19, 2015
1 parent d37b4c0 commit 70f56aa
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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 */

Expand Down

0 comments on commit 70f56aa

Please sign in to comment.