Hi, > As per the Core Specification 5.0, Volume 2, Part E, Section 7.3.94 > the following code changes implements HCI Write Authenticated Payload Timeout > command for LE Ping feature. > > Signed-off-by: SpoorthiX <spoorthix.k@xxxxxxxxx> > --- > include/net/bluetooth/hci.h | 6 +++ > include/net/bluetooth/mgmt.h | 9 +++++ > net/bluetooth/hci_event.c | 28 ++++++++++++++ > net/bluetooth/mgmt.c | 92 ++++++++++++++++++++++++++++++++++++++++++++ > 4 files changed, 135 insertions(+) > > diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h > index c36dc1e..c2a8080 100644 > --- a/include/net/bluetooth/hci.h > +++ b/include/net/bluetooth/hci.h > @@ -1130,6 +1130,12 @@ struct hci_cp_write_sc_support { > __u8 support; > } __packed; > > +#define HCI_OP_WRITE_AUTH_PAYLOAD_TO 0x0c7c > +struct hci_cp_write_auth_payload_to { > + __u16 conn_handle; > + __u16 timeout; > +} __packed; > + > #define HCI_OP_READ_LOCAL_OOB_EXT_DATA 0x0c7d > struct hci_rp_read_local_oob_ext_data { > __u8 status; > diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h > index 9cee7dd..22c3052 100644 > --- a/include/net/bluetooth/mgmt.h > +++ b/include/net/bluetooth/mgmt.h > @@ -654,6 +654,15 @@ struct mgmt_cp_set_phy_confguration { > } __packed; > #define MGMT_SET_PHY_CONFIGURATION_SIZE 4 > > + > +#define MGMT_OP_WRITE_AUTH_PAYLOAD_TO 0x0046 > +struct mgmt_cp_write_auth_payload_to { > + __le16 conn_handle; > + __le16 auth_to; > +} __packed; > +#define MGMT_OP_WRITE_AUTH_PAYLOAD_TO_SIZE 4 there is no benefit for this kind of pass-through MGMT -> HCI. If you want to provide a default auth timeout that then gets programmed to every connection, fine, but this is of no use. bluetoothd will not track a connection and then change the auth timeout. And even if we would provide an API for that, then it would be done through the L2CAP socket that has an underlying HCI connection. Regards Marcel