Bluetooth: Fix busy condition testing for EIR and class updates
authorJohan Hedberg <johan.hedberg@intel.com>
Fri, 15 Mar 2013 22:06:54 +0000 (17:06 -0500)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Mon, 18 Mar 2013 17:02:00 +0000 (14:02 -0300)
commit0cab9c80ffc5006bf0f6922d805a7540e4949877
treeb4bdd16acdf3ee8b9f2d56e36084f2536ecb2114
parent229ab39caf8c1321527e408725c1350f7c9aaa84
Bluetooth: Fix busy condition testing for EIR and class updates

The add/remove_uuid and set_dev_class mgmt commands can trigger both EIR
and class HCI commands, so testing just for a pending class command is
enough. The simplest way to monitor conflicts that should trigger "busy"
error returns is to check for any pending mgmt command that can trigger
these HCI commands. This patch adds a helper function for this
(pending_eir_or_class) and uses it instead of the old HCI_PENDING_CLASS
flag to test for busy conditions.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
net/bluetooth/mgmt.c