]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Fix advertising and active scanning co-existence
authorJohan Hedberg <johan.hedberg@intel.com>
Tue, 8 Jul 2014 12:07:53 +0000 (15:07 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 8 Jul 2014 12:22:06 +0000 (14:22 +0200)
commitb8e0d33483c208e330c06f4560b0db68e8db9dfe
tree19cd939c436586fc2857a0160dc0e655c1e435e6
parent19723457b122e3a1499979a084f761a12046b377
Bluetooth: Fix advertising and active scanning co-existence

Many controllers allow simultaneous active scanning and advertising
(e.g. Intel and Broadcom) but some do not (e.g. CSR). It's therefore
safest to implement mutual exclusion of these states in the kernel.

This patch ensures that the two states are never entered simultaneously.
Extra precaution needs to be taken for outgoing connection attempts in
slave role (i.e. through directed advertising) in which case the
operation that came first has precedence and the one that comes after
gets a rejection.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_conn.c
net/bluetooth/hci_event.c
net/bluetooth/mgmt.c