Skip to content

Commit 27bbca4

Browse files
committed
Bluetooth: Enable LE PHY Update Complete event
If either LE Set Default PHY command or LE Set PHY commands is supported, then enable the LE PHY Update Complete event. Signed-off-by: Marcel Holtmann <[email protected]> Signed-off-by: Johan Hedberg <[email protected]>
1 parent 9756d33 commit 27bbca4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

net/bluetooth/hci_core.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,12 @@ static int hci_init3_req(struct hci_request *req, unsigned long opt)
685685
if (hdev->commands[34] & 0x04)
686686
events[1] |= 0x01; /* LE Generate DHKey Complete */
687687

688+
/* If the controller supports the LE Set Default PHY or
689+
* LE Set PHY commands, enable the corresponding event.
690+
*/
691+
if (hdev->commands[35] & (0x20 | 0x40))
692+
events[1] |= 0x08; /* LE PHY Update Complete */
693+
688694
hci_req_add(req, HCI_OP_LE_SET_EVENT_MASK, sizeof(events),
689695
events);
690696

0 commit comments

Comments
 (0)