Bluetooth: A2MP: Process A2MP Discover Request

Adds helper functions to count HCI devs and process A2MP Discover
Request, code makes sure that first controller in the list is
BREDR one. Trace is shown below:

...
> ACL data: handle 11 flags 0x02 dlen 16
    A2MP: Discover req: mtu/mps 670 mask: 0x0000
< ACL data: handle 11 flags 0x00 dlen 22
    A2MP: Discover rsp: mtu/mps 670 mask: 0x0000
      Controller list:
        id 0 type 0 (BR-EDR) status 0x01 (Bluetooth only)
        id 1 type 1 (802.11 AMP) status 0x01 (Bluetooth only)
...

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
This commit is contained in:
Andrei Emeltchenko
2012-05-29 13:59:09 +03:00
committed by Johan Hedberg
parent 21dbd2ce35
commit 8598d064cb
4 changed files with 103 additions and 0 deletions

View File

@ -59,6 +59,9 @@
#define HCI_BREDR 0x00
#define HCI_AMP 0x01
/* First BR/EDR Controller shall have ID = 0 */
#define HCI_BREDR_ID 0
/* HCI device quirks */
enum {
HCI_QUIRK_RESET_ON_CLOSE,