diff mbox series

[Bluez,02/62] lib: Inclusive language in consts and strings

Message ID 20210813201256.Bluez.2.Ibb7f04e885ef866b1b00a9ba0514b7da85cfe7f6@changeid
State New
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>

"central" and "peripheral" are preferred, as reflected in the BT
core spec 5.3
---

 lib/hci.c | 16 ++++++++--------
 lib/hci.h | 10 +++++-----
 2 files changed, 13 insertions(+), 13 deletions(-)
diff mbox series

Patch

diff --git a/lib/hci.c b/lib/hci.c
index 53af0a1148..3611d3d360 100644
--- a/lib/hci.c
+++ b/lib/hci.c
@@ -288,7 +288,7 @@  int hci_strtolp(char *str, unsigned int *val)
 static hci_map link_mode_map[] = {
 	{ "NONE",	0		},
 	{ "ACCEPT",	HCI_LM_ACCEPT	},
-	{ "MASTER",	HCI_LM_MASTER	},
+	{ "CENTRAL",	HCI_LM_CENTRAL	},
 	{ "AUTH",	HCI_LM_AUTH	},
 	{ "ENCRYPT",	HCI_LM_ENCRYPT	},
 	{ "TRUSTED",	HCI_LM_TRUSTED	},
@@ -304,8 +304,8 @@  char *hci_lmtostr(unsigned int lm)
 		return NULL;
 
 	*str = 0;
-	if (!(lm & HCI_LM_MASTER))
-		strcpy(str, "SLAVE ");
+	if (!(lm & HCI_LM_CENTRAL))
+		strcpy(str, "PERIPHERAL ");
 
 	s = hci_bit2str(link_mode_map, lm);
 	if (!s) {
@@ -345,7 +345,7 @@  static hci_map commands_map[] = {
 
 	{ "Set Connection Encryption",			16  },
 	{ "Change Connection Link Key",			17  },
-	{ "Master Link Key",				18  },
+	{ "Temporary Link Key",				18  },
 	{ "Remote Name Request",			19  },
 	{ "Cancel Remote Name Request",			20  },
 	{ "Read Remote Supported Features",		21  },
@@ -735,8 +735,8 @@  static hci_map lmp_features_map[8][9] = {
 		{ "<EV4 packets>",	LMP_EV4		},	/* Bit 0 */
 		{ "<EV5 packets>",	LMP_EV5		},	/* Bit 1 */
 		{ "<no. 34>",		0x04		},	/* Bit 2 */
-		{ "<AFH cap. slave>",	LMP_AFH_CAP_SLV	},	/* Bit 3 */
-		{ "<AFH class. slave>",	LMP_AFH_CLS_SLV	},	/* Bit 4 */
+		{ "<AFH cap. perip.>",	LMP_AFH_CAP_PRP	},	/* Bit 3 */
+		{ "<AFH class. perip.>",LMP_AFH_CLS_PRP	},	/* Bit 4 */
 		{ "<BR/EDR not supp.>",	LMP_NO_BREDR	},	/* Bit 5 */
 		{ "<LE support>",	LMP_LE		},	/* Bit 6 */
 		{ "<3-slot EDR ACL>",	LMP_EDR_3SLOT	},	/* Bit 7 */
@@ -746,8 +746,8 @@  static hci_map lmp_features_map[8][9] = {
 		{ "<5-slot EDR ACL>",	LMP_EDR_5SLOT	},	/* Bit 0 */
 		{ "<sniff subrating>",	LMP_SNIFF_SUBR	},	/* Bit 1 */
 		{ "<pause encryption>",	LMP_PAUSE_ENC	},	/* Bit 2 */
-		{ "<AFH cap. master>",	LMP_AFH_CAP_MST	},	/* Bit 3 */
-		{ "<AFH class. master>",LMP_AFH_CLS_MST	},	/* Bit 4 */
+		{ "<AFH cap. central>",	LMP_AFH_CAP_CEN	},	/* Bit 3 */
+		{ "<AFH class. cent.>",	LMP_AFH_CLS_CEN	},	/* Bit 4 */
 		{ "<EDR eSCO 2 Mbps>",	LMP_EDR_ESCO_2M	},	/* Bit 5 */
 		{ "<EDR eSCO 3 Mbps>",	LMP_EDR_ESCO_3M	},	/* Bit 6 */
 		{ "<3-slot EDR eSCO>",	LMP_EDR_3S_ESCO	},	/* Bit 7 */
diff --git a/lib/hci.h b/lib/hci.h
index 9d3cdfd06b..4c039830d5 100644
--- a/lib/hci.h
+++ b/lib/hci.h
@@ -241,8 +241,8 @@  enum {
 
 #define LMP_EV4		0x01
 #define LMP_EV5		0x02
-#define LMP_AFH_CAP_SLV	0x08
-#define LMP_AFH_CLS_SLV	0x10
+#define LMP_AFH_CAP_PRP	0x08
+#define LMP_AFH_CLS_PRP	0x10
 #define LMP_NO_BREDR	0x20
 #define LMP_LE		0x40
 #define LMP_EDR_3SLOT	0x80
@@ -250,8 +250,8 @@  enum {
 #define LMP_EDR_5SLOT	0x01
 #define LMP_SNIFF_SUBR	0x02
 #define LMP_PAUSE_ENC	0x04
-#define LMP_AFH_CAP_MST	0x08
-#define LMP_AFH_CLS_MST	0x10
+#define LMP_AFH_CAP_CEN	0x08
+#define LMP_AFH_CLS_CEN	0x10
 #define LMP_EDR_ESCO_2M	0x20
 #define LMP_EDR_ESCO_3M	0x40
 #define LMP_EDR_3S_ESCO	0x80
@@ -281,7 +281,7 @@  enum {
 
 /* Link mode */
 #define HCI_LM_ACCEPT	0x8000
-#define HCI_LM_MASTER	0x0001
+#define HCI_LM_CENTRAL	0x0001
 #define HCI_LM_AUTH	0x0002
 #define HCI_LM_ENCRYPT	0x0004
 #define HCI_LM_TRUSTED	0x0008