Bluetooth: Prepare start_discovery
authorAndre Guedes <andre.guedes@openbossa.org>
Fri, 17 Feb 2012 23:39:35 +0000 (20:39 -0300)
committerJohan Hedberg <johan.hedberg@intel.com>
Sun, 19 Feb 2012 10:32:21 +0000 (12:32 +0200)
commitf39799f5047c4827b200acbf33cd0ba076afd7ed
tree91aaf60a5aeb5e0bbac57ec056f71552a695372a
parentea585ab51d3fe2eb2d738c91f83e7c309e76b4fe
Bluetooth: Prepare start_discovery

This patch does some code refactoring in start_discovery function
in order to prepare it for interleaved discovery support.

MGMT_ADDR_* macros were moved to hci_core.h since they are now used
to define discovery type macros.

Discovery type macros were defined according to mgmt-api.txt
specification:

Possible values for the Type parameter are a bit-wise or of the
following bits:

1 BR/EDR
2 LE Public
3 LE Random

By combining these e.g. the following values are possible:

1 BR/EDR
6 LE (public & random)
7 BR/EDR/LE (interleaved discovery)

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
include/net/bluetooth/hci_core.h
include/net/bluetooth/mgmt.h
net/bluetooth/mgmt.c