Add missing feature descriptions to hci_features2str().

The list of possible features in hccontrol/features2str() is incomplete.
Refer to "Bluetooth Core Specification 5.2 Vol. 2 Part C. 3.3 Feature Mask Definition".

Submitted by:	Marc Veldman <marc@bumblingdork.com>
PR:		245354
MFC after:	1 week
Sponsored by:	Mellanox Technologies
This commit is contained in:
Hans Petter Selasky 2020-04-18 08:29:16 +00:00
parent fac24ad7f0
commit 6f80a2c88e
4 changed files with 54 additions and 4 deletions

View File

@ -78,7 +78,7 @@ hci_read_local_supported_features(int s, int argc, char **argv)
{
ng_hci_read_local_features_rp rp;
int n;
char buffer[1024];
char buffer[2048];
n = sizeof(rp);
if (hci_simple_request(s, NG_HCI_OPCODE(NG_HCI_OGF_INFO,

View File

@ -612,7 +612,7 @@ hci_read_remote_supported_features(int s, int argc, char **argv)
char b[512];
ng_hci_read_remote_features_cp cp;
ng_hci_event_pkt_t *e = (ng_hci_event_pkt_t *) b;
char buffer[1024];
char buffer[2048];
/* parse command parameters */
switch (argc) {

View File

@ -153,7 +153,7 @@ hci_read_node_features(int s, int argc, char **argv)
{
struct ng_btsocket_hci_raw_node_features r;
int n;
char buffer[1024];
char buffer[2048];
memset(&r, 0, sizeof(r));
if (ioctl(s, SIOC_HCI_RAW_NODE_GET_FEATURES, &r, sizeof(r)) < 0)

View File

@ -289,7 +289,57 @@ hci_features2str(uint8_t *features, char *buffer, int size)
/* 4 */ "<Flow control lag (bit0)> ",
/* 5 */ "<Flow control lag (bit1)> ",
/* 6 */ "<Flow control lag (bit2)> ",
/* 7 */ "<Unknown2.7> "
/* 7 */ "<Broadcast Encryption> "
},
{ /* byte 3 */
/* 0 */ "<Unknown 3.0> ",
/* 1 */ "<EDR ACL 2 Mb/s> ",
/* 2 */ "<EDR ACL 3 Mb/s> ",
/* 3 */ "<Enhanced inquiry scan> ",
/* 4 */ "<Interlaced inquiry scan> ",
/* 5 */ "<Interlaced page scan> ",
/* 6 */ "<RSSI with inquiry results> ",
/* 7 */ "<Extended SCO link (EV3 packets)> "
},
{ /* byte 4 */
/* 0 */ "<EV4 packets> ",
/* 1 */ "<EV5 packets> ",
/* 2 */ "<Unknown 4.2> ",
/* 3 */ "<AFH capable slave> ",
/* 4 */ "<AFH classification slave> ",
/* 5 */ "<BR/EDR Not Supported> ",
/* 6 */ "<LE Supported (Controller)> ",
/* 7 */ "<3-Slot EDR ACL packets> "
},
{ /* byte 5 */
/* 0 */ "<5-Slot EDR ACL packets> ",
/* 1 */ "<Sniff subrating> ",
/* 2 */ "<Pause encryption> ",
/* 3 */ "<AFH capable master> ",
/* 4 */ "<AFH classification master> ",
/* 5 */ "<EDR eSCO 2 Mb/s mode> ",
/* 6 */ "<EDR eSCO 3 Mb/s mode> ",
/* 7 */ "<3-Slot EDR eSCO packets> "
},
{ /* byte 6 */
/* 0 */ "<Enhanced Inquiry Response> ",
/* 1 */ "<Simultaneous LE and BR/EDR (Controller)> ",
/* 2 */ "<Unknown 6.2> ",
/* 3 */ "<Secure Simple Pairing (Controller Support)> ",
/* 4 */ "<Encapsulated PDU> ",
/* 5 */ "<Erroneous Data Reporting> ",
/* 6 */ "<Non-flushable Packed Boundary Flag> ",
/* 7 */ "<Unknown 6.7> "
},
{ /* byte 7 */
/* 0 */ "<HCI_Link_Supervision_Timeout_Changed event> ",
/* 1 */ "<Variable Inquiry TX Power Level> ",
/* 2 */ "<Enhanced Power Control> ",
/* 3 */ "<Unknown 7.3> ",
/* 4 */ "<Unknown 7.4> ",
/* 5 */ "<Unknown 7.5> ",
/* 6 */ "<Unknown 7.6> ",
/* 7 */ "<Extended features> "
}};
if (buffer != NULL && size > 0) {