Bluetooth: Fix returning proper command status for start_discovery
authorJohan Hedberg <johan.hedberg@intel.com>
Thu, 10 Jan 2013 12:54:09 +0000 (14:54 +0200)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Thu, 10 Jan 2013 18:28:40 +0000 (16:28 -0200)
commit04106755763f558886a631338d12546345bae6e9
treecb0923f753bd03d6a63b6f59ae38d1d250b2cc0b
parenta7e80f25ae2296d78163d75d753c796270464000
Bluetooth: Fix returning proper command status for start_discovery

Management commands should whenever possible fail with proper command
status or command complete events. This patch fixes the
mgmt_start_discovery command to do this for the failure cases where an
incorrect parameter value was passed to it ("not supported" if the
parameter value was valid but the controller doesn't support it and
"invalid params" if it isn't valid at all).

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