Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4b71bba4 authored by Marcel Holtmann's avatar Marcel Holtmann Committed by Johan Hedberg
Browse files

Bluetooth: Enabled LE Direct Advertising Report event if supported



When the controller supports the Extended Scanner Filter Policies, it
supports the LE Direct Advertising Report event. However by default
that event is blocked by the LE event mask. It is required to enable
it during controller setup.

Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
parent 32c9d43f
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -343,6 +343,7 @@ enum {
#define HCI_LE_ENCRYPTION		0x01
#define HCI_LE_ENCRYPTION		0x01
#define HCI_LE_CONN_PARAM_REQ_PROC	0x02
#define HCI_LE_CONN_PARAM_REQ_PROC	0x02
#define HCI_LE_PING			0x10
#define HCI_LE_PING			0x10
#define HCI_LE_EXT_SCAN_POLICY		0x80


/* Connection modes */
/* Connection modes */
#define HCI_CM_ACTIVE	0x0000
#define HCI_CM_ACTIVE	0x0000
+8 −0
Original line number Original line Diff line number Diff line
@@ -1735,6 +1735,14 @@ static void hci_init3_req(struct hci_request *req, unsigned long opt)
						 * Parameter Request
						 * Parameter Request
						 */
						 */


		/* If the controller supports Extended Scanner Filter
		 * Policies, enable the correspondig event.
		 */
		if (hdev->le_features[0] & HCI_LE_EXT_SCAN_POLICY)
			events[1] |= 0x04;	/* LE Direct Advertising
						 * Report
						 */

		hci_req_add(req, HCI_OP_LE_SET_EVENT_MASK, sizeof(events),
		hci_req_add(req, HCI_OP_LE_SET_EVENT_MASK, sizeof(events),
			    events);
			    events);