]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Fix check for direct advertising
authorJohan Hedberg <johan.hedberg@intel.com>
Tue, 28 Oct 2014 21:23:27 +0000 (22:23 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 28 Oct 2014 21:48:56 +0000 (22:48 +0100)
commitf6802a8803cdae759c7302dcd5aea18985675c59
treea75be64acc44c0dc2928d3dbbb7eebd988987995
parente14e6688463ef688dc32981fc375c9cf8d0c1dd5
Bluetooth: Fix check for direct advertising

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: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: stable@vger.kernel.org # 3.16.x
net/bluetooth/hci_conn.c