]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Fix changing advertising setting while LE is connected
authorJohan Hedberg <johan.hedberg@intel.com>
Tue, 8 Oct 2013 13:52:18 +0000 (15:52 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 8 Oct 2013 14:49:02 +0000 (07:49 -0700)
commita32fc8d1dbfbb5f9fe35741378c13a52585561b5
treedbd3e917a45a681bad3063b94af43672fad3709d
parent518a2b598c385e6fcb79c4e4729fb701ddeeb794
Bluetooth: Fix changing advertising setting while LE is connected

We only (re)enable advertising when LE is disconnected. Trying to enable
advertising using mgmt_set_advertising while connected should simply
change the flag but not do anything else (until the connection gets
dropped). This patch fixes this by making an LE connection lookup to
determine whether there are any connected devices or not.

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