diff mbox series

[Bluez,06/62] lib: Inclusive language for filtering devices

Message ID 20210813201256.Bluez.6.I65c31fd642c75050d65646aeefe6d96904f93f66@changeid (mailing list archive)
State Superseded
Headers show
Series Inclusive language changes | expand

Commit Message

Archie Pusaka Aug. 13, 2021, 12:17 p.m. UTC
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 mbox series

Patch

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: