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)
commita736abc1ac09b824387fb75b2aa7887c6e3ed68a
tree8f2a6db8d601faec39c850882ec709d39175f653
parent845472e8d50c898c73b4f69f4edad5249b13d6a9
Bluetooth: Fix invalid response for 'Start Discovery' command

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