• Johan Hedberg's avatar
    Bluetooth: Fix check for direct advertising · 0b1db38c
    Johan Hedberg authored
    These days we allow simultaneous LE scanning and advertising. Checking
    for whether advertising is enabled or not is therefore not a reliable
    way to determine whether directed advertising was used to trigger the
    connection creation. The appropriate place to check (instead of the hdev
    context) is the connection role that's stored in the hci_conn. This
    patch fixes such a check in le_conn_timeout() which could otherwise lead
    to incorrect HCI commands being sent.
    Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
    Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
    Cc: stable@vger.kernel.org # 3.16.x
    0b1db38c
hci_conn.c 34.5 KB