OSDN Git Service

Bluetooth: Fix powering on with privacy and advertising
authorAndrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
Sun, 22 Nov 2015 20:42:21 +0000 (21:42 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 23 Nov 2015 12:57:55 +0000 (13:57 +0100)
commite59a554235b960b3b251772ac1bb743e49d09cee
tree931e70405bffdea9beeb87a6cad68747980469b3
parent568f44f63621e00af9895f09c70aa38025be8813
Bluetooth: Fix powering on with privacy and advertising

In order to enable advertising with privacy enabled, SMP has to be
registered in order to generate new RPA. During power on, it will be
registered at the very end which is the reason why advertising is not
enabled and it's not possible to enable it anymore due to mismatch
between hci_dev settings and actual controller state.

This fixes this problem by moving SMP registration earlier, just after
controller is powered (which is ok, because LE SMP will be already able
to decide on identity address to be used), but before advertising is
enabled.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/mgmt.c