Hi Johan, > When we initiate LE connections we need to regenerate the local RPA in > case it has expired. This patch adds the necessary code for doing this > in the hci_create_le_conn function. > > Signed-off-by: Johan Hedberg <johan.hedberg@xxxxxxxxx> > --- > net/bluetooth/hci_conn.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c > index bd66c52eff95..325b42afc61e 100644 > --- a/net/bluetooth/hci_conn.c > +++ b/net/bluetooth/hci_conn.c > @@ -560,6 +560,9 @@ static int hci_create_le_conn(struct hci_conn *conn) > > hci_req_init(&req, hdev); > > + if (test_and_clear_bit(HCI_RPA_EXPIRED, &hdev->dev_flags)) > + hci_update_rpa(&req); > + and if privacy is not enabled, we should make sure the static address is the one that the controller currently knows about. As explained in my other comment, this will make it long term a lot simpler. Maybe you want to introduce a helper for updating the random address. That why we just call it in certain places and it takes care of either writing a new RPA or it makes sure the static is set in case it differs. 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