]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb521e46ca09226919a99b989bc9af43a2c00b4df
tree931e70405bffdea9beeb87a6cad68747980469b3
parent41acd8bd57162797b5effab71df5daaf02cf9f40
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