From aac33d6b2e0c3c7b021478feb320afd8c812bda9 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 18 Nov 2003 11:36:20 +0000 Subject: Add decoding of Bluetooth 1.2 features --- include/hci.h | 17 +++++++++++++++ src/hci.c | 68 +++++++++++++++++++++++++++++++++++++++++------------------ 2 files changed, 65 insertions(+), 20 deletions(-) diff --git a/include/hci.h b/include/hci.h index 89ef19b6..fee39c20 100644 --- a/include/hci.h +++ b/include/hci.h @@ -200,6 +200,23 @@ enum { #define LMP_PSCHEME 0x02 #define LMP_PCONTROL 0x04 #define LMP_TRSP_SCO 0x08 +#define LMP_BCAST_ENC 0x80 + +#define LMP_ENH_ISCAN 0x08 +#define LMP_ILACE_ISCAN 0x10 +#define LMP_ILACE_PSCAN 0x20 +#define LMP_RSSI_INQ 0x40 +#define LMP_ESCO 0x80 + +#define LMP_EV4 0x01 +#define LMP_EV5 0x02 +#define LMP_AFH_CAP_SLV 0x08 +#define LMP_AFH_CLS_SLV 0x10 + +#define LMP_AFH_CAP_MST 0x08 +#define LMP_AFH_CLS_MST 0x10 + +#define LMP_EXT_FEAT 0x80 /* Link policies */ #define HCI_LP_RSWITCH 0x0001 diff --git a/src/hci.c b/src/hci.c index 818c04e5..61bdd1a6 100644 --- a/src/hci.c +++ b/src/hci.c @@ -295,32 +295,60 @@ int lmp_strtover(char *str, unsigned int *ver) /* LMP features mapping */ hci_map lmp_features_map[][9] = { { /* byte 0 */ - { "<3-slot packets>", LMP_3SLOT }, - { "<5-slot packets>", LMP_5SLOT }, - { "", LMP_ENCRYPT }, - { "", LMP_SOFFSET }, - { "", LMP_TACCURACY}, - { "", LMP_RSWITCH }, - { "", LMP_HOLD }, - { "", LMP_SNIFF }, + { "<3-slot packets>", LMP_3SLOT }, + { "<5-slot packets>", LMP_5SLOT }, + { "", LMP_ENCRYPT }, + { "", LMP_SOFFSET }, + { "", LMP_TACCURACY }, + { "", LMP_RSWITCH }, + { "", LMP_HOLD }, + { "", LMP_SNIFF }, { NULL } }, { /* byte 1 */ - { "", LMP_PARK }, - { "", LMP_RSSI }, - { "", LMP_QUALITY }, - { "", LMP_SCO }, - { "", LMP_HV2 }, - { "", LMP_HV3 }, - { "", LMP_ULAW }, - { "", LMP_ALAW }, + { "", LMP_PARK }, + { "", LMP_RSSI }, + { "", LMP_QUALITY }, + { "", LMP_SCO }, + { "", LMP_HV2 }, + { "", LMP_HV3 }, + { "", LMP_ULAW }, + { "", LMP_ALAW }, { NULL } }, { /* byte 2 */ - { "", LMP_CVSD }, - { "", LMP_PSCHEME }, - { "", LMP_PCONTROL }, - { "", LMP_TRSP_SCO }, + { "", LMP_CVSD }, + { "", LMP_PSCHEME }, + { "", LMP_PCONTROL }, + { "", LMP_TRSP_SCO }, + { "",LMP_BCAST_ENC }, + { NULL } + }, + { /* byte 3 */ + { "", LMP_ENH_ISCAN }, + { "", LMP_ILACE_ISCAN }, + { "", LMP_ILACE_PSCAN }, + { "",LMP_RSSI_INQ }, + { "", LMP_ESCO }, + { NULL } + }, + { /* byte 4 */ + { "", LMP_EV4 }, + { "", LMP_EV5 }, + { "", LMP_AFH_CAP_SLV }, + { "", LMP_AFH_CLS_SLV }, + { NULL } + }, + { /* byte 5 */ + { "", LMP_AFH_CAP_MST }, + { "",LMP_AFH_CLS_MST }, + { NULL } + }, + { /* byte 6 */ + { NULL } + }, + { /* byte 7 */ + { "",LMP_EXT_FEAT }, { NULL } }, {{ NULL }} -- cgit