Skip to content

Commit

Permalink
Bluetooth: Enable LE Channel Selection Algorithm event
Browse files Browse the repository at this point in the history
If the Channel Selection Algorithm #2 feature is supported, then enable
the new LE Channel Selection Algorithm event.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
  • Loading branch information
holtmann committed May 18, 2017
1 parent 1220487 commit 9756d33
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/net/bluetooth/hci.h
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ enum {
#define HCI_LE_PING 0x10
#define HCI_LE_DATA_LEN_EXT 0x20
#define HCI_LE_EXT_SCAN_POLICY 0x80
#define HCI_LE_CHAN_SEL_ALG2 0x40

/* Connection modes */
#define HCI_CM_ACTIVE 0x0000
Expand Down
8 changes: 8 additions & 0 deletions net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,14 @@ static int hci_init3_req(struct hci_request *req, unsigned long opt)
* Report
*/

/* If the controller supports Channel Selection Algorithm #2
* feature, enable the corresponding event.
*/
if (hdev->le_features[1] & HCI_LE_CHAN_SEL_ALG2)
events[2] |= 0x08; /* LE Channel Selection
* Algorithm
*/

/* If the controller supports the LE Set Scan Enable command,
* enable the corresponding advertising report event.
*/
Expand Down

0 comments on commit 9756d33

Please sign in to comment.