diff mbox series

[Bluez,v4,01/12] lib: Inclusive language changes

Message ID 20210906160340.Bluez.v4.1.I2169032b03520f33b73ca4dc7f2ae7ab0a901da3@changeid
State Superseded
Headers show
Series Inclusive language changes | expand

Commit Message

Archie Pusaka Sept. 6, 2021, 8:04 a.m. UTC
From: Archie Pusaka <apusaka@chromium.org>

BT core spec 5.3 promotes the usage of inclusive languages.
This CL replaces some terms with the more appropriate counterparts,
such as "central", "peripheral", and "accept list".
---

(no changes since v3)

Changes in v3:
* Not replacing some terms which belong to libluetooth API

Changes in v2:
* Merging several patches from the same directory into one

 android/bluetooth.c |  4 ++--
 lib/hci.c           | 22 +++++++++++-----------
 lib/mgmt.h          |  2 +-
 monitor/control.c   |  4 ++--
 src/adapter.c       |  4 ++--
 tools/oobtest.c     |  4 ++--
 6 files changed, 20 insertions(+), 20 deletions(-)

Comments

bluez.test.bot@gmail.com Sept. 6, 2021, 8:38 a.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=542379

---Test result---

Test Summary:
CheckPatch                    FAIL      4.00 seconds
GitLint                       FAIL      1.20 seconds
Prep - Setup ELL              PASS      39.57 seconds
Build - Prep                  PASS      0.09 seconds
Build - Configure             PASS      7.17 seconds
Build - Make                  PASS      167.55 seconds
Make Check                    PASS      8.70 seconds
Make Distcheck                PASS      202.81 seconds
Build w/ext ELL - Configure   PASS      7.12 seconds
Build w/ext ELL - Make        PASS      158.55 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script with rule in .checkpatch.conf
Output:
tools: Inclusive language changes
WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#10: 
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf

ERROR:INITIALISED_STATIC: do not initialise statics to 0
#985: FILE: tools/l2test.c:113:
+static int central = 0;

WARNING:MISSING_SPACE: break quoted strings at a space character
#1030: FILE: tools/l2test.c:1340:
 	while ((opt = getopt(argc, argv, "a:b:cde:g:i:mnpqrstuwxyz"
+		"AB:CD:EF:GH:I:J:K:L:M:N:O:P:Q:RSTUV:W:X:Y:Z:")) != EOF) {

ERROR:INITIALISED_STATIC: do not initialise statics to 0
#2331: FILE: tools/rctest.c:79:
+static int central = 0;

ERROR:INITIALISED_STATIC: do not initialise statics to 0
#2483: FILE: tools/rfcomm.c:40:
+static int central = 0;

- total: 3 errors, 2 warnings, 2296 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

"[PATCH] tools: Inclusive language changes" has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

profiles: Inclusive language changes
WARNING:LONG_LINE_COMMENT: line length of 100 exceeds 80 columns
#116: FILE: profiles/health/mcap.h:273:
+	mcap_info_ind_event_cb	mcl_sync_infoind_cb;	/* (CSP Central) Received info indication */

- total: 0 errors, 1 warnings, 87 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

"[PATCH] profiles: Inclusive language changes" has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

src: Inclusive language changes
WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#10: 
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf

ERROR:INITIALISED_STATIC: do not initialise statics to NULL
#36: FILE: src/adapter.c:115:
+static struct mgmt *mgmt_primary = NULL;

- total: 1 errors, 1 warnings, 478 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

"[PATCH] src: Inclusive language changes" has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

mesh: Inclusive language changes
WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#7: 
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf

ERROR:INITIALISED_STATIC: do not initialise statics to 0
#28: FILE: mesh/net-keys.c:56:
+static uint32_t last_flooding_id = 0;

- total: 1 errors, 1 warnings, 146 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

"[PATCH] mesh: Inclusive language changes" has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

unit/mesh: Inclusive language changes
WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#7: 
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf

- total: 0 errors, 1 warnings, 16 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

"[PATCH] unit/mesh: Inclusive language changes" has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.


##############################
Test: GitLint - FAIL
Desc: Run gitlint with rule in .gitlint
Output:
tools: Inclusive language changes
7: B1 Line exceeds max length (95>80): "https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf"

src: Inclusive language changes
7: B1 Line exceeds max length (95>80): "https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf"

mesh: Inclusive language changes
4: B1 Line exceeds max length (95>80): "https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf"

unit/mesh: Inclusive language changes
4: B1 Line exceeds max length (95>80): "https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf"


##############################
Test: Prep - Setup ELL - PASS
Desc: Clone, build, and install ELL

##############################
Test: Build - Prep - PASS
Desc: Prepare environment for build

##############################
Test: Build - Configure - PASS
Desc: Configure the BlueZ source tree

##############################
Test: Build - Make - PASS
Desc: Build the BlueZ source tree

##############################
Test: Make Check - PASS
Desc: Run 'make check'

##############################
Test: Make Distcheck - PASS
Desc: Run distcheck to check the distribution

##############################
Test: Build w/ext ELL - Configure - PASS
Desc: Configure BlueZ source with '--enable-external-ell' configuration

##############################
Test: Build w/ext ELL - Make - PASS
Desc: Build BlueZ source with '--enable-external-ell' configuration



---
Regards,
Linux Bluetooth
Archie Pusaka Sept. 7, 2021, 4:36 a.m. UTC | #2
Hi Marcel,

On Tue, 7 Sept 2021 at 00:05, Marcel Holtmann <marcel@holtmann.org> wrote:
>

> Hi Archie,

>

> > BT core spec 5.3 promotes the usage of inclusive languages.

> > This CL replaces some terms with the more appropriate counterparts,

> > such as "central", "peripheral", and "accept list".

> > ---

> >

> > (no changes since v3)

> >

> > Changes in v3:

> > * Not replacing some terms which belong to libluetooth API

> >

> > Changes in v2:

> > * Merging several patches from the same directory into one

> >

> > android/bluetooth.c |  4 ++--

> > lib/hci.c           | 22 +++++++++++-----------

> > lib/mgmt.h          |  2 +-

> > monitor/control.c   |  4 ++--

> > src/adapter.c       |  4 ++--

> > tools/oobtest.c     |  4 ++--

> > 6 files changed, 20 insertions(+), 20 deletions(-)

> >

> > diff --git a/android/bluetooth.c b/android/bluetooth.c

> > index c3ad503497..fe956b5d43 100644

> > --- a/android/bluetooth.c

> > +++ b/android/bluetooth.c

> > @@ -2276,7 +2276,7 @@ static void new_long_term_key_event(uint16_t index, uint16_t length,

> >               ediv = le16_to_cpu(key->ediv);

> >               rand = le64_to_cpu(key->rand);

> >

> > -             store_ltk(&key->addr.bdaddr, key->addr.type, key->master,

> > +             store_ltk(&key->addr.bdaddr, key->addr.type, key->central,

> >                               key->val, key->type, key->enc_size, ediv, rand);

> >       }

> >

> > @@ -3097,7 +3097,7 @@ static struct mgmt_ltk_info *get_ltk_info(GKeyFile *key_file, const char *peer,

> >       info->ediv = g_key_file_get_integer(key_file, peer, ediv_s, NULL);

> >       info->ediv = cpu_to_le16(info->ediv);

> >

> > -     info->master = master;

> > +     info->central = master;

> >

> > failed:

> >       g_free(key);

> > diff --git a/lib/hci.c b/lib/hci.c

> > index 53af0a1148..a2dd7a2ae6 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_MASTER   },

> >       { "AUTH",       HCI_LM_AUTH     },

> >       { "ENCRYPT",    HCI_LM_ENCRYPT  },

> >       { "TRUSTED",    HCI_LM_TRUSTED  },

>

> you can't do this since it actually maps to input of hciconfig tool. You really need to check where link_mode_map is used.


But I also changed the documentation of hciconfig on patch 05/12.
Are you concerned about that being not in the same patch as this
change, or we shouldn't change the input of any of the tools?
If it is the latter, then I also need to make changes to many of the
tools in patch 05/12.

>

> > @@ -305,7 +305,7 @@ char *hci_lmtostr(unsigned int lm)

> >

> >       *str = 0;

> >       if (!(lm & HCI_LM_MASTER))

> > -             strcpy(str, "SLAVE ");

> > +             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  },

> > @@ -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 },

> > @@ -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_SLV },      /* Bit 3 */

> > +             { "<AFH cls. perip.>",  LMP_AFH_CLS_SLV },      /* 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_MST },      /* Bit 3 */

> > +             { "<AFH cls. central>", LMP_AFH_CLS_MST },      /* 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/mgmt.h b/lib/mgmt.h

> > index 0a6349321a..0d1678f01d 100644

> > --- a/lib/mgmt.h

> > +++ b/lib/mgmt.h

> > @@ -179,7 +179,7 @@ struct mgmt_cp_load_link_keys {

> > struct mgmt_ltk_info {

> >       struct mgmt_addr_info addr;

> >       uint8_t type;

> > -     uint8_t master;

> > +     uint8_t central;

> >       uint8_t enc_size;

> >       uint16_t ediv;

> >       uint64_t rand;

> > diff --git a/monitor/control.c b/monitor/control.c

> > index 266602a34c..dad23a0e62 100644

> > --- a/monitor/control.c

> > +++ b/monitor/control.c

> > @@ -308,13 +308,13 @@ static void mgmt_new_long_term_key(uint16_t len, const void *buf)

> >       /* LE SC keys are both for master and slave */

> >       switch (ev->key.type) {

> >       case 0x00:

> > -             if (ev->key.master)

> > +             if (ev->key.central)

> >                       type = "Master (Unauthenticated)";

> >               else

> >                       type = "Slave (Unauthenticated)";

> >               break;

> >       case 0x01:

> > -             if (ev->key.master)

> > +             if (ev->key.central)

> >                       type = "Master (Authenticated)";

> >               else

> >                       type = "Slave (Authenticated)";

> > diff --git a/src/adapter.c b/src/adapter.c

> > index ddd8967515..ac1e02af6c 100644

> > --- a/src/adapter.c

> > +++ b/src/adapter.c

> > @@ -4122,7 +4122,7 @@ static void load_ltks(struct btd_adapter *adapter, GSList *keys)

> >               key->rand = cpu_to_le64(info->rand);

> >               key->ediv = cpu_to_le16(info->ediv);

> >               key->type = info->authenticated;

> > -             key->master = info->master;

> > +             key->central = info->master;

> >               key->enc_size = info->enc_size;

> >       }

> >

> > @@ -8307,7 +8307,7 @@ static void new_long_term_key_callback(uint16_t index, uint16_t length,

> >               rand = le64_to_cpu(key->rand);

> >

> >               store_longtermkey(adapter, &key->addr.bdaddr,

> > -                                     key->addr.type, key->val, key->master,

> > +                                     key->addr.type, key->val, key->central,

> >                                       key->type, key->enc_size, ediv, rand);

> >

> >               device_set_bonded(device, addr->type);

> > diff --git a/tools/oobtest.c b/tools/oobtest.c

> > index c095036fe7..0368bc3865 100644

> > --- a/tools/oobtest.c

> > +++ b/tools/oobtest.c

> > @@ -133,13 +133,13 @@ static void new_long_term_key_event(uint16_t index, uint16_t len,

> >

> >       switch (ev->key.type) {

> >       case 0x00:

> > -             if (ev->key.master)

> > +             if (ev->key.central)

> >                       type = "Unauthenticated, Master";

> >               else

> >                       type = "Unauthenticated, Slave";

> >               break;

> >       case 0x01:

> > -             if (ev->key.master)

> > +             if (ev->key.central)

> >                       type = "Authenticated, Master";

> >               else

> >                       type = "Authenticated, Slave";

>

> These strings you could have changed. It is just a test tool and not installed.


Actually, I changed them in patch 05/12.

So I tried to respect the "one directory - one patch" policy. However
sometimes changes need to be done cross-directory so no way we can
enforce that rule without having compile errors.
Therefore, I only make the minimum necessary changes in the other
directories so the code can still be compiled while respecting the
"one directory - one patch" policy as much as possible.

In this patch 01/12, the changes are inside the /lib directory, so
cross-directory changes, such as to /tools/oobtest.c, are unavoidable.
However I prefer to update the files inside tools in their own patch
(05/12), so only the necessary changes are made in patch 01/12.

Regards,
Archie
diff mbox series

Patch

diff --git a/android/bluetooth.c b/android/bluetooth.c
index c3ad503497..fe956b5d43 100644
--- a/android/bluetooth.c
+++ b/android/bluetooth.c
@@ -2276,7 +2276,7 @@  static void new_long_term_key_event(uint16_t index, uint16_t length,
 		ediv = le16_to_cpu(key->ediv);
 		rand = le64_to_cpu(key->rand);
 
-		store_ltk(&key->addr.bdaddr, key->addr.type, key->master,
+		store_ltk(&key->addr.bdaddr, key->addr.type, key->central,
 				key->val, key->type, key->enc_size, ediv, rand);
 	}
 
@@ -3097,7 +3097,7 @@  static struct mgmt_ltk_info *get_ltk_info(GKeyFile *key_file, const char *peer,
 	info->ediv = g_key_file_get_integer(key_file, peer, ediv_s, NULL);
 	info->ediv = cpu_to_le16(info->ediv);
 
-	info->master = master;
+	info->central = master;
 
 failed:
 	g_free(key);
diff --git a/lib/hci.c b/lib/hci.c
index 53af0a1148..a2dd7a2ae6 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_MASTER	},
 	{ "AUTH",	HCI_LM_AUTH	},
 	{ "ENCRYPT",	HCI_LM_ENCRYPT	},
 	{ "TRUSTED",	HCI_LM_TRUSTED	},
@@ -305,7 +305,7 @@  char *hci_lmtostr(unsigned int lm)
 
 	*str = 0;
 	if (!(lm & HCI_LM_MASTER))
-		strcpy(str, "SLAVE ");
+		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  },
@@ -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 },
@@ -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_SLV	},	/* Bit 3 */
+		{ "<AFH cls. perip.>",	LMP_AFH_CLS_SLV	},	/* 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_MST	},	/* Bit 3 */
+		{ "<AFH cls. central>", LMP_AFH_CLS_MST	},	/* 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/mgmt.h b/lib/mgmt.h
index 0a6349321a..0d1678f01d 100644
--- a/lib/mgmt.h
+++ b/lib/mgmt.h
@@ -179,7 +179,7 @@  struct mgmt_cp_load_link_keys {
 struct mgmt_ltk_info {
 	struct mgmt_addr_info addr;
 	uint8_t type;
-	uint8_t master;
+	uint8_t central;
 	uint8_t enc_size;
 	uint16_t ediv;
 	uint64_t rand;
diff --git a/monitor/control.c b/monitor/control.c
index 266602a34c..dad23a0e62 100644
--- a/monitor/control.c
+++ b/monitor/control.c
@@ -308,13 +308,13 @@  static void mgmt_new_long_term_key(uint16_t len, const void *buf)
 	/* LE SC keys are both for master and slave */
 	switch (ev->key.type) {
 	case 0x00:
-		if (ev->key.master)
+		if (ev->key.central)
 			type = "Master (Unauthenticated)";
 		else
 			type = "Slave (Unauthenticated)";
 		break;
 	case 0x01:
-		if (ev->key.master)
+		if (ev->key.central)
 			type = "Master (Authenticated)";
 		else
 			type = "Slave (Authenticated)";
diff --git a/src/adapter.c b/src/adapter.c
index ddd8967515..ac1e02af6c 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -4122,7 +4122,7 @@  static void load_ltks(struct btd_adapter *adapter, GSList *keys)
 		key->rand = cpu_to_le64(info->rand);
 		key->ediv = cpu_to_le16(info->ediv);
 		key->type = info->authenticated;
-		key->master = info->master;
+		key->central = info->master;
 		key->enc_size = info->enc_size;
 	}
 
@@ -8307,7 +8307,7 @@  static void new_long_term_key_callback(uint16_t index, uint16_t length,
 		rand = le64_to_cpu(key->rand);
 
 		store_longtermkey(adapter, &key->addr.bdaddr,
-					key->addr.type, key->val, key->master,
+					key->addr.type, key->val, key->central,
 					key->type, key->enc_size, ediv, rand);
 
 		device_set_bonded(device, addr->type);
diff --git a/tools/oobtest.c b/tools/oobtest.c
index c095036fe7..0368bc3865 100644
--- a/tools/oobtest.c
+++ b/tools/oobtest.c
@@ -133,13 +133,13 @@  static void new_long_term_key_event(uint16_t index, uint16_t len,
 
 	switch (ev->key.type) {
 	case 0x00:
-		if (ev->key.master)
+		if (ev->key.central)
 			type = "Unauthenticated, Master";
 		else
 			type = "Unauthenticated, Slave";
 		break;
 	case 0x01:
-		if (ev->key.master)
+		if (ev->key.central)
 			type = "Authenticated, Master";
 		else
 			type = "Authenticated, Slave";