]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Create hci_cancel_inquiry()
authorAndre Guedes <andre.guedes@openbossa.org>
Fri, 4 Nov 2011 17:16:52 +0000 (14:16 -0300)
committerGustavo F. Padovan <padovan@profusion.mobi>
Tue, 8 Nov 2011 14:54:08 +0000 (12:54 -0200)
commitdddb556f910e43a6c4b69ebee008b50a54edc33a
tree8e8e6846b835041937c9f242403c868003478981
parente51d3d9aaf9a2e648d16677a5e05721ed8dae057
Bluetooth: Create hci_cancel_inquiry()

This patch adds a function to hci_core to cancel an ongoing inquiry.

According to the Bluetooth spec, the inquiry cancel command should
only be issued after the inquiry command has been issued, a command
status event has been received for the inquiry command, and before
the inquiry complete event occurs.

As HCI_INQUIRY flag is only set just after an inquiry command status
event occurs and it is cleared just after an inquiry complete event
occurs, the inquiry cancel command should be issued only if HCI_INQUIRY
flag is set.

Additionally, cancel inquiry related code from stop_discovery() were
replaced by a hci_cancel_inquiry() call.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
include/net/bluetooth/hci_core.h
net/bluetooth/hci_core.c
net/bluetooth/mgmt.c