aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2020-05-18 08:43:05 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2020-05-18 08:43:05 +0000
commitd6d5d1aac041076578e8e5b0f8350a89a0f10759 (patch)
tree4cab054f6997cad0bfb45884dedf54ce388f1d15
parentb6ef66b02713854c82f19ce53ea8089d7933b9ed (diff)
downloadsrc-d6d5d1aac041076578e8e5b0f8350a89a0f10759.tar.gz
src-d6d5d1aac041076578e8e5b0f8350a89a0f10759.zip
MFC r360070:
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 Sponsored by: Mellanox Technologies
Notes
Notes: svn path=/stable/10/; revision=361154
-rw-r--r--usr.sbin/bluetooth/hccontrol/info.c2
-rw-r--r--usr.sbin/bluetooth/hccontrol/link_control.c2
-rw-r--r--usr.sbin/bluetooth/hccontrol/node.c2
-rw-r--r--usr.sbin/bluetooth/hccontrol/util.c52
4 files changed, 54 insertions, 4 deletions
diff --git a/usr.sbin/bluetooth/hccontrol/info.c b/usr.sbin/bluetooth/hccontrol/info.c
index d7bad36bb8de..7f5c90ac56ab 100644
--- a/usr.sbin/bluetooth/hccontrol/info.c
+++ b/usr.sbin/bluetooth/hccontrol/info.c
@@ -75,7 +75,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,
diff --git a/usr.sbin/bluetooth/hccontrol/link_control.c b/usr.sbin/bluetooth/hccontrol/link_control.c
index 536520a71298..2e05494ad12f 100644
--- a/usr.sbin/bluetooth/hccontrol/link_control.c
+++ b/usr.sbin/bluetooth/hccontrol/link_control.c
@@ -609,7 +609,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) {
diff --git a/usr.sbin/bluetooth/hccontrol/node.c b/usr.sbin/bluetooth/hccontrol/node.c
index d5f12d4c24c1..53abb8ac72c3 100644
--- a/usr.sbin/bluetooth/hccontrol/node.c
+++ b/usr.sbin/bluetooth/hccontrol/node.c
@@ -150,7 +150,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)
diff --git a/usr.sbin/bluetooth/hccontrol/util.c b/usr.sbin/bluetooth/hccontrol/util.c
index 4bb5000c087a..c0c64969059d 100644
--- a/usr.sbin/bluetooth/hccontrol/util.c
+++ b/usr.sbin/bluetooth/hccontrol/util.c
@@ -276,7 +276,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) {