Hi Andre, > The Bluetooth 4.1 introduces a new LE meta event called "LE Remote > Connection Parameter Request" event. In order to the controller sends > this event to host, we should enable it during controller initialization. > > Therefore, this patch enables that event in case the controller supports > Bluetooth 4.1 or upper version. > > Signed-off-by: Andre Guedes <andre.guedes@xxxxxxxxxxxxx> > --- > include/net/bluetooth/bluetooth.h | 1 + > net/bluetooth/hci_core.c | 7 +++++++ > 2 files changed, 8 insertions(+) > > diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h > index 373000d..85dbc03 100644 > --- a/include/net/bluetooth/bluetooth.h > +++ b/include/net/bluetooth/bluetooth.h > @@ -38,6 +38,7 @@ > #define BLUETOOTH_VER_1_1 1 > #define BLUETOOTH_VER_1_2 2 > #define BLUETOOTH_VER_2_0 3 > +#define BLUETOOTH_VER_4_1 7 > > /* Reserv for core and drivers use */ > #define BT_SKB_RESERVE 8 > diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c > index 9852449..a8b9d70 100644 > --- a/net/bluetooth/hci_core.c > +++ b/net/bluetooth/hci_core.c > @@ -1461,6 +1461,13 @@ static void hci_setup_event_mask(struct hci_request *req) > if (lmp_le_capable(hdev)) { > memset(events, 0, sizeof(events)); > events[0] = 0x1f; > + > + /* If Bluetooth 4.1 or upper version, enable LE Remote > + * Connection Parameter Request Event. > + */ > + if (hdev->hci_ver >= BLUETOOTH_VER_4_1) > + events[0] = events[0] | 0x20; > + we only fall back to Bluetooth version check in case we can not feature masks to determine if something is supported or not. Use the LE features mask to figure out if we support this or not. Regards Marcel -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html