From: Archie Pusaka <apusaka@google.com>
To: linux-bluetooth <linux-bluetooth@vger.kernel.org>,
Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: CrosBT Upstreaming <chromeos-bluetooth-upstreaming@chromium.org>,
Archie Pusaka <apusaka@chromium.org>
Subject: [Bluez PATCH 06/62] lib: Inclusive language for filtering devices
Date: Fri, 13 Aug 2021 20:17:51 +0800 [thread overview]
Message-ID: <20210813201256.Bluez.6.I65c31fd642c75050d65646aeefe6d96904f93f66@changeid> (raw)
In-Reply-To: <20210813121848.3686029-1-apusaka@google.com>
From: Archie Pusaka <apusaka@chromium.org>
"accept list" is preferred, as reflected in the BT core spec 5.3.
---
lib/hci.c | 36 ++++++++++++++++++------------------
lib/hci.h | 20 ++++++++++----------
lib/hci_lib.h | 8 ++++----
tools/hcitool.c | 8 ++++----
tools/parser/hci.c | 6 +++---
5 files changed, 39 insertions(+), 39 deletions(-)
diff --git a/lib/hci.c b/lib/hci.c
index 3611d3d360..d2753a934d 100644
--- a/lib/hci.c
+++ b/lib/hci.c
@@ -565,11 +565,11 @@ static hci_map commands_map[] = {
{ "LE Set Scan Enable", 211 },
{ "LE Create Connection", 212 },
{ "LE Create Connection Cancel", 213 },
- { "LE Read White List Size", 214 },
- { "LE Clear White List", 215 },
+ { "LE Read Accept List Size", 214 },
+ { "LE Clear Accept List", 215 },
- { "LE Add Device To White List", 216 },
- { "LE Remove Device From White List", 217 },
+ { "LE Add Device To Accept List", 216 },
+ { "LE Remove Device From Accept List", 217 },
{ "LE Connection Update", 218 },
{ "LE Set Host Channel Classification", 219 },
{ "LE Read Channel Map", 220 },
@@ -1322,10 +1322,10 @@ int hci_disconnect(int dd, uint16_t handle, uint8_t reason, int to)
return 0;
}
-int hci_le_add_white_list(int dd, const bdaddr_t *bdaddr, uint8_t type, int to)
+int hci_le_add_accept_list(int dd, const bdaddr_t *bdaddr, uint8_t type, int to)
{
struct hci_request rq;
- le_add_device_to_white_list_cp cp;
+ le_add_device_to_accept_list_cp cp;
uint8_t status;
memset(&cp, 0, sizeof(cp));
@@ -1334,9 +1334,9 @@ int hci_le_add_white_list(int dd, const bdaddr_t *bdaddr, uint8_t type, int to)
memset(&rq, 0, sizeof(rq));
rq.ogf = OGF_LE_CTL;
- rq.ocf = OCF_LE_ADD_DEVICE_TO_WHITE_LIST;
+ rq.ocf = OCF_LE_ADD_DEVICE_TO_ACCEPT_LIST;
rq.cparam = &cp;
- rq.clen = LE_ADD_DEVICE_TO_WHITE_LIST_CP_SIZE;
+ rq.clen = LE_ADD_DEVICE_TO_ACCEPT_LIST_CP_SIZE;
rq.rparam = &status;
rq.rlen = 1;
@@ -1351,10 +1351,10 @@ int hci_le_add_white_list(int dd, const bdaddr_t *bdaddr, uint8_t type, int to)
return 0;
}
-int hci_le_rm_white_list(int dd, const bdaddr_t *bdaddr, uint8_t type, int to)
+int hci_le_rm_accept_list(int dd, const bdaddr_t *bdaddr, uint8_t type, int to)
{
struct hci_request rq;
- le_remove_device_from_white_list_cp cp;
+ le_remove_device_from_accept_list_cp cp;
uint8_t status;
memset(&cp, 0, sizeof(cp));
@@ -1363,9 +1363,9 @@ int hci_le_rm_white_list(int dd, const bdaddr_t *bdaddr, uint8_t type, int to)
memset(&rq, 0, sizeof(rq));
rq.ogf = OGF_LE_CTL;
- rq.ocf = OCF_LE_REMOVE_DEVICE_FROM_WHITE_LIST;
+ rq.ocf = OCF_LE_REMOVE_DEVICE_FROM_ACCEPT_LIST;
rq.cparam = &cp;
- rq.clen = LE_REMOVE_DEVICE_FROM_WHITE_LIST_CP_SIZE;
+ rq.clen = LE_REMOVE_DEVICE_FROM_ACCEPT_LIST_CP_SIZE;
rq.rparam = &status;
rq.rlen = 1;
@@ -1380,18 +1380,18 @@ int hci_le_rm_white_list(int dd, const bdaddr_t *bdaddr, uint8_t type, int to)
return 0;
}
-int hci_le_read_white_list_size(int dd, uint8_t *size, int to)
+int hci_le_read_accept_list_size(int dd, uint8_t *size, int to)
{
struct hci_request rq;
- le_read_white_list_size_rp rp;
+ le_read_accept_list_size_rp rp;
memset(&rp, 0, sizeof(rp));
memset(&rq, 0, sizeof(rq));
rq.ogf = OGF_LE_CTL;
- rq.ocf = OCF_LE_READ_WHITE_LIST_SIZE;
+ rq.ocf = OCF_LE_READ_ACCEPT_LIST_SIZE;
rq.rparam = &rp;
- rq.rlen = LE_READ_WHITE_LIST_SIZE_RP_SIZE;
+ rq.rlen = LE_READ_ACCEPT_LIST_SIZE_RP_SIZE;
if (hci_send_req(dd, &rq, to) < 0)
return -1;
@@ -1407,14 +1407,14 @@ int hci_le_read_white_list_size(int dd, uint8_t *size, int to)
return 0;
}
-int hci_le_clear_white_list(int dd, int to)
+int hci_le_clear_accept_list(int dd, int to)
{
struct hci_request rq;
uint8_t status;
memset(&rq, 0, sizeof(rq));
rq.ogf = OGF_LE_CTL;
- rq.ocf = OCF_LE_CLEAR_WHITE_LIST;
+ rq.ocf = OCF_LE_CLEAR_ACCEPT_LIST;
rq.rparam = &status;
rq.rlen = 1;
diff --git a/lib/hci.h b/lib/hci.h
index 4c039830d5..e31685b644 100644
--- a/lib/hci.h
+++ b/lib/hci.h
@@ -1561,28 +1561,28 @@ typedef struct {
#define OCF_LE_CREATE_CONN_CANCEL 0x000E
-#define OCF_LE_READ_WHITE_LIST_SIZE 0x000F
+#define OCF_LE_READ_ACCEPT_LIST_SIZE 0x000F
typedef struct {
uint8_t status;
uint8_t size;
-} __attribute__ ((packed)) le_read_white_list_size_rp;
-#define LE_READ_WHITE_LIST_SIZE_RP_SIZE 2
+} __attribute__ ((packed)) le_read_accept_list_size_rp;
+#define LE_READ_ACCEPT_LIST_SIZE_RP_SIZE 2
-#define OCF_LE_CLEAR_WHITE_LIST 0x0010
+#define OCF_LE_CLEAR_ACCEPT_LIST 0x0010
-#define OCF_LE_ADD_DEVICE_TO_WHITE_LIST 0x0011
+#define OCF_LE_ADD_DEVICE_TO_ACCEPT_LIST 0x0011
typedef struct {
uint8_t bdaddr_type;
bdaddr_t bdaddr;
-} __attribute__ ((packed)) le_add_device_to_white_list_cp;
-#define LE_ADD_DEVICE_TO_WHITE_LIST_CP_SIZE 7
+} __attribute__ ((packed)) le_add_device_to_accept_list_cp;
+#define LE_ADD_DEVICE_TO_ACCEPT_LIST_CP_SIZE 7
-#define OCF_LE_REMOVE_DEVICE_FROM_WHITE_LIST 0x0012
+#define OCF_LE_REMOVE_DEVICE_FROM_ACCEPT_LIST 0x0012
typedef struct {
uint8_t bdaddr_type;
bdaddr_t bdaddr;
-} __attribute__ ((packed)) le_remove_device_from_white_list_cp;
-#define LE_REMOVE_DEVICE_FROM_WHITE_LIST_CP_SIZE 7
+} __attribute__ ((packed)) le_remove_device_from_accept_list_cp;
+#define LE_REMOVE_DEVICE_FROM_ACCEPT_LIST_CP_SIZE 7
#define OCF_LE_CONN_UPDATE 0x0013
typedef struct {
diff --git a/lib/hci_lib.h b/lib/hci_lib.h
index 6b1a548b55..a0dfed615f 100644
--- a/lib/hci_lib.h
+++ b/lib/hci_lib.h
@@ -117,10 +117,10 @@ int hci_le_create_conn(int dd, uint16_t interval, uint16_t window,
int hci_le_conn_update(int dd, uint16_t handle, uint16_t min_interval,
uint16_t max_interval, uint16_t latency,
uint16_t supervision_timeout, int to);
-int hci_le_add_white_list(int dd, const bdaddr_t *bdaddr, uint8_t type, int to);
-int hci_le_rm_white_list(int dd, const bdaddr_t *bdaddr, uint8_t type, int to);
-int hci_le_read_white_list_size(int dd, uint8_t *size, int to);
-int hci_le_clear_white_list(int dd, int to);
+int hci_le_add_accept_list(int dd, const bdaddr_t *bdaddr, uint8_t type, int to);
+int hci_le_rm_accept_list(int dd, const bdaddr_t *bdaddr, uint8_t type, int to);
+int hci_le_read_accept_list_size(int dd, uint8_t *size, int to);
+int hci_le_clear_accept_list(int dd, int to);
int hci_le_add_resolving_list(int dd, const bdaddr_t *bdaddr, uint8_t type,
uint8_t *peer_irk, uint8_t *local_irk, int to);
int hci_le_rm_resolving_list(int dd, const bdaddr_t *bdaddr, uint8_t type, int to);
diff --git a/tools/hcitool.c b/tools/hcitool.c
index c6a9093733..f7fca5216c 100644
--- a/tools/hcitool.c
+++ b/tools/hcitool.c
@@ -2793,7 +2793,7 @@ static void cmd_lewladd(int dev_id, int argc, char **argv)
str2ba(argv[0], &bdaddr);
- err = hci_le_add_white_list(dd, &bdaddr, bdaddr_type, 1000);
+ err = hci_le_add_accept_list(dd, &bdaddr, bdaddr_type, 1000);
hci_close_dev(dd);
if (err < 0) {
@@ -2839,7 +2839,7 @@ static void cmd_lewlrm(int dev_id, int argc, char **argv)
str2ba(argv[0], &bdaddr);
- err = hci_le_rm_white_list(dd, &bdaddr, LE_PUBLIC_ADDRESS, 1000);
+ err = hci_le_rm_accept_list(dd, &bdaddr, LE_PUBLIC_ADDRESS, 1000);
hci_close_dev(dd);
if (err < 0) {
@@ -2883,7 +2883,7 @@ static void cmd_lewlsz(int dev_id, int argc, char **argv)
exit(1);
}
- err = hci_le_read_white_list_size(dd, &size, 1000);
+ err = hci_le_read_accept_list_size(dd, &size, 1000);
hci_close_dev(dd);
if (err < 0) {
@@ -2928,7 +2928,7 @@ static void cmd_lewlclr(int dev_id, int argc, char **argv)
exit(1);
}
- err = hci_le_clear_white_list(dd, 1000);
+ err = hci_le_clear_accept_list(dd, 1000);
hci_close_dev(dd);
if (err < 0) {
diff --git a/tools/parser/hci.c b/tools/parser/hci.c
index a1253acdf7..02ebcfc442 100644
--- a/tools/parser/hci.c
+++ b/tools/parser/hci.c
@@ -2969,9 +2969,9 @@ static inline void cmd_complete_dump(int level, struct frame *frm)
case OCF_LE_SET_SCAN_PARAMETERS:
case OCF_LE_SET_SCAN_ENABLE:
case OCF_LE_CREATE_CONN:
- case OCF_LE_CLEAR_WHITE_LIST:
- case OCF_LE_ADD_DEVICE_TO_WHITE_LIST:
- case OCF_LE_REMOVE_DEVICE_FROM_WHITE_LIST:
+ case OCF_LE_CLEAR_ACCEPT_LIST:
+ case OCF_LE_ADD_DEVICE_TO_ACCEPT_LIST:
+ case OCF_LE_REMOVE_DEVICE_FROM_ACCEPT_LIST:
case OCF_LE_SET_HOST_CHANNEL_CLASSIFICATION:
case OCF_LE_RECEIVER_TEST:
case OCF_LE_TRANSMITTER_TEST:
--
2.33.0.rc1.237.g0d66db33f3-goog
next prev parent reply other threads:[~2021-08-13 12:19 UTC|newest]
Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-13 12:17 [Bluez PATCH 00/62] Inclusive language changes Archie Pusaka
2021-08-13 12:17 ` [Bluez PATCH 01/62] lib: Inclusive language in HCI commands and events Archie Pusaka
2021-08-13 12:49 ` Inclusive language changes bluez.test.bot
2021-08-13 19:26 ` [Bluez PATCH 01/62] lib: Inclusive language in HCI commands and events Marcel Holtmann
2021-08-13 21:47 ` Luiz Augusto von Dentz
2021-08-16 15:59 ` Marcel Holtmann
2021-08-13 12:17 ` [Bluez PATCH 02/62] lib: Inclusive language in consts and strings Archie Pusaka
2021-08-13 12:17 ` [Bluez PATCH 03/62] tools/hciconfig: Inclusive language update Archie Pusaka
2021-08-13 12:17 ` [Bluez PATCH 04/62] core: Inclusive language for l2cap Archie Pusaka
2021-08-13 12:17 ` [Bluez PATCH 05/62] core: Inclusive language for rfcomm Archie Pusaka
2021-08-13 12:17 ` Archie Pusaka [this message]
2021-08-13 12:17 ` [Bluez PATCH 07/62] lib/mgmt: Inclusive language for LTK Archie Pusaka
2021-08-13 12:17 ` [Bluez PATCH 08/62] doc/mgmt: Inclusive language update Archie Pusaka
2021-08-13 12:17 ` [Bluez PATCH 09/62] btio: Inclusive language changes Archie Pusaka
2021-08-13 12:17 ` [Bluez PATCH 10/62] shared/ad: " Archie Pusaka
2021-08-13 12:17 ` [Bluez PATCH 11/62] shared/hfp: " Archie Pusaka
2021-08-13 12:17 ` [Bluez PATCH 12/62] monitor: Inclusive language in struct member Archie Pusaka
2021-08-13 12:17 ` [Bluez PATCH 13/62] monitor: Inclusive language in SMP related things Archie Pusaka
2021-08-13 12:17 ` [Bluez PATCH 14/62] monitor: Inclusive language in LE states Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 15/62] monitor: Inclusive language in LL feature Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 16/62] monitor: Inclusive language in link key transaction Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 17/62] monitor: Inclusive language in peripheral broadcast Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 18/62] monitor: Inclusive language in peripheral page response timeout Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 19/62] monitor: Inclusive language in consts and strings Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 20/62] monitor: Inclusive language in filtering devices Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 21/62] emulator: Inclusive language in naming Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 22/62] emulator: Inclusive language in strings Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 23/62] emulator: Inclusive language in filtering device Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 24/62] tools: Inclusive language in referring the central address Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 25/62] tools/parser/hci: Inclusive language changes Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 26/62] tools/parser/smp: " Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 27/62] tools/3dsp: " Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 28/62] tools/mgmt-tester: " Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 29/62] tools/bdaddr: " Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 30/62] tools/hciconfig: " Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 31/62] tools/meshctl: " Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 32/62] tools/mgmt-tester: " Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 33/62] tools/parser: Inclusive language in struct member Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 34/62] tools/parser/lmp: Inclusive language changes Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 35/62] tools/parser/avdtp: " Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 36/62] tools/parser/csr: " Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 37/62] tools/btpclientctl: " Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 38/62] tools/l2cap-tester: " Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 39/62] tools/hci-tester: " Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 40/62] tools/btiotest: " Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 41/62] tools/hcitool: Inclusive language changes, central peripheral Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 42/62] tools/hcitool: Inclusive language changes, accept list Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 43/62] tools/l2test: Inclusive language changes Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 44/62] tools/rctest: " Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 45/62] tools/rfcomm: " Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 46/62] plugins/sixaxis: " Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 47/62] profiles/audio: " Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 48/62] profiles/health: " Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 49/62] sdp: " Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 50/62] adapter: Inclusive language for central and peripheral Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 51/62] adapter: Inclusive language for storing LTK Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 52/62] adapter: Inclusive language for device filtering Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 53/62] client: Inclusive language changes Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 54/62] mesh: " Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 55/62] tools/mesh: " Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 56/62] tools/mesh-gatt: " Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 57/62] unit/mesh: " Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 58/62] doc/mesh: " Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 59/62] android: Inclusive language for volume control Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 60/62] android: Inclusive language for describing relation Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 61/62] android: Inclusive language for filtering devices Archie Pusaka
2021-08-13 12:18 ` [Bluez PATCH 62/62] android: Inclusive language in storing LTK Archie Pusaka
2021-08-13 21:42 ` [Bluez PATCH 00/62] Inclusive language changes Luiz Augusto von Dentz
2021-08-14 5:22 ` Archie Pusaka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210813201256.Bluez.6.I65c31fd642c75050d65646aeefe6d96904f93f66@changeid \
--to=apusaka@google.com \
--cc=apusaka@chromium.org \
--cc=chromeos-bluetooth-upstreaming@chromium.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).