Bluetooth: Fix invalid response for 'Start Discovery' command
authorSzymon Janc <szymon.janc@tieto.com>
Mon, 3 Nov 2014 13:20:56 +0000 (14:20 +0100)
committerJohan Hedberg <johan.hedberg@intel.com>
Mon, 3 Nov 2014 13:43:05 +0000 (15:43 +0200)
According to Management Interface API 'Start Discovery' command should
generate a Command Complete event on failure. Currently kernel is
sending Command Status on early errors. This results in userspace
ignoring such event due to invalid size.

bluetoothd[28499]: src/adapter.c:trigger_start_discovery()
bluetoothd[28499]: src/adapter.c:cancel_passive_scanning()
bluetoothd[28499]: src/adapter.c:start_discovery_timeout()
bluetoothd[28499]: src/adapter.c:start_discovery_complete() status 0x0a
bluetoothd[28499]: Wrong size of start discovery return parameters

Reported-by: Jukka Taimisto <jtt@codenomicon.com>
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
net/bluetooth/mgmt.c

Simple merge