Skip to content

Commit 9756d33

Browse files
committed
Bluetooth: Enable LE Channel Selection Algorithm event
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]>
1 parent 1220487 commit 9756d33

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

include/net/bluetooth/hci.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ enum {
399399
#define HCI_LE_PING 0x10
400400
#define HCI_LE_DATA_LEN_EXT 0x20
401401
#define HCI_LE_EXT_SCAN_POLICY 0x80
402+
#define HCI_LE_CHAN_SEL_ALG2 0x40
402403

403404
/* Connection modes */
404405
#define HCI_CM_ACTIVE 0x0000

net/bluetooth/hci_core.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,14 @@ static int hci_init3_req(struct hci_request *req, unsigned long opt)
635635
* Report
636636
*/
637637

638+
/* If the controller supports Channel Selection Algorithm #2
639+
* feature, enable the corresponding event.
640+
*/
641+
if (hdev->le_features[1] & HCI_LE_CHAN_SEL_ALG2)
642+
events[2] |= 0x08; /* LE Channel Selection
643+
* Algorithm
644+
*/
645+
638646
/* If the controller supports the LE Set Scan Enable command,
639647
* enable the corresponding advertising report event.
640648
*/

0 commit comments

Comments
 (0)