• Johan Hedberg's avatar
    Bluetooth: Fix advertising and active scanning co-existence · e8bb6b97
    Johan Hedberg authored
    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: default avatarJohan Hedberg <johan.hedberg@intel.com>
    Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
    e8bb6b97
hci_conn.c 33.5 KB