Hi Johan, > This patch adds a rpa_timeout debugfs entry which can be used to set the > RPA regeneration timeout to something else than the default 15 minutes. > > Signed-off-by: Johan Hedberg <johan.hedberg@xxxxxxxxx> > --- > net/bluetooth/hci_core.c | 27 +++++++++++++++++++++++++++ > 1 file changed, 27 insertions(+) > > diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c > index eeeeda7e6b70..ecd147e51f45 100644 > --- a/net/bluetooth/hci_core.c > +++ b/net/bluetooth/hci_core.c > @@ -492,6 +492,31 @@ static int idle_timeout_get(void *data, u64 *val) > DEFINE_SIMPLE_ATTRIBUTE(idle_timeout_fops, idle_timeout_get, > idle_timeout_set, "%llu\n"); > > +static int rpa_timeout_set(void *data, u64 val) > +{ > + struct hci_dev *hdev = data; > + if we are doing this in seconds, we might want to set some limits here. Don’t know which make sense, but something like at least 30 seconds and not more than 24 hours. > + hci_dev_lock(hdev); > + hdev->rpa_timeout = val; > + hci_dev_unlock(hdev); > + > + return 0; > +} 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