1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
$NetBSD: patch-am,v 1.3 2012/02/15 09:30:23 plunky Exp $
--- lib/hci.c.orig 2011-12-22 00:18:58.000000000 +0000
+++ lib/hci.c
@@ -71,6 +71,7 @@ static char *hci_bit2str(hci_map *m, uns
return str;
}
+#if 0
static int hci_str2bit(hci_map *map, char *str, unsigned int *val)
{
char *t, *ptr;
@@ -94,6 +95,7 @@ static int hci_str2bit(hci_map *map, cha
return set;
}
+#endif
static char *hci_uint2str(hci_map *m, unsigned int val)
{
@@ -114,6 +116,7 @@ static char *hci_uint2str(hci_map *m, un
return str;
}
+#if 0
static int hci_str2uint(hci_map *map, char *str, unsigned int *val)
{
char *t, *ptr;
@@ -213,6 +216,7 @@ char *hci_dflagstostr(uint32_t flags)
}
return str;
}
+#endif
/* HCI packet type mapping */
static hci_map pkt_type_map[] = {
@@ -234,6 +238,7 @@ static hci_map pkt_type_map[] = {
{ NULL }
};
+#if 0
static hci_map sco_ptype_map[] = {
{ "HV1", 0x0001 },
{ "HV2", 0x0002 },
@@ -247,12 +252,15 @@ static hci_map sco_ptype_map[] = {
{ "3-EV5", HCI_3EV5 },
{ NULL }
};
+#endif
char *hci_ptypetostr(unsigned int ptype)
{
+ ptype ^= (HCI_2DH1|HCI_2DH3|HCI_2DH5|HCI_3DH1|HCI_3DH3|HCI_3DH5);
return hci_bit2str(pkt_type_map, ptype);
}
+#if 0
int hci_strtoptype(char *str, unsigned int *val)
{
return hci_str2bit(pkt_type_map, str, val);
@@ -267,6 +275,7 @@ int hci_strtoscoptype(char *str, unsigne
{
return hci_str2bit(sco_ptype_map, str, val);
}
+#endif
/* Link policy mapping */
static hci_map link_policy_map[] = {
@@ -283,6 +292,7 @@ char *hci_lptostr(unsigned int lp)
return hci_bit2str(link_policy_map, lp);
}
+#if 0
int hci_strtolp(char *str, unsigned int *val)
{
return hci_str2bit(link_policy_map, str, val);
@@ -639,6 +649,7 @@ char *hci_commandstostr(uint8_t *command
return str;
}
+#endif
/* Version mapping */
static hci_map ver_map[] = {
@@ -657,16 +668,19 @@ char *hci_vertostr(unsigned int ver)
return hci_uint2str(ver_map, ver);
}
+#if 0
int hci_strtover(char *str, unsigned int *ver)
{
return hci_str2uint(ver_map, str, ver);
}
+#endif
char *lmp_vertostr(unsigned int ver)
{
return hci_uint2str(ver_map, ver);
}
+#if 0
int lmp_strtover(char *str, unsigned int *ver)
{
return hci_str2uint(ver_map, str, ver);
@@ -2911,3 +2925,4 @@ int hci_le_conn_update(int dd, uint16_t
return 0;
}
+#endif
|