Bluetooth: Simplify the code for re-arming discoverable timeout
authorMarcel Holtmann <marcel@holtmann.org>
Tue, 15 Oct 2013 15:28:51 +0000 (08:28 -0700)
committerJohan Hedberg <johan.hedberg@intel.com>
Tue, 15 Oct 2013 15:42:12 +0000 (18:42 +0300)
commit36261547c9699c6bc746b1db9508aaeb68faa7c9
tree068ff3c6e29484cd5d3211e2b675e6248d0fdeb5
parentd4462a07de025dec0f5242743f4d687a39b78bd5
Bluetooth: Simplify the code for re-arming discoverable timeout

When only the discoverable timeout gets updated, just cancel the current
timeout, store the new timeout value. If the new timeout is valid, then
arm the discoverable timeout again.

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