Bluetooth: Add timer to force power off
authorJohan Hedberg <johan.hedberg@intel.com>
Fri, 28 Feb 2014 07:33:44 +0000 (09:33 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 28 Feb 2014 07:41:07 +0000 (23:41 -0800)
commita3172b7eb4a2719711187cfca12097d2326e85a7
treefc5191af513e40eac0ba1af3728fe7a0afe120be
parentc9910d0fb4fc2ede468b26d45a1d50c309897770
Bluetooth: Add timer to force power off

If some of the cleanup commands caused by mgmt_set_powered(off) never
complete we should still force the adapter to be powered down. This is
rather easy to do since hdev->power_off is already a delayed work
struct. This patch schedules this delayed work if at least one HCI
command was sent by the cleanup procedure.

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