Skip to content

Commit 74be523

Browse files
apusakaholtmann
authored andcommitted
Bluetooth: use inclusive language in HCI role comments
This patch replaces some non-inclusive terms based on the appropriate language mapping table compiled by the Bluetooth SIG: https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf Specifically, these terms are replaced: master -> initiator (for smp) or central (everything else) slave -> responder (for smp) or peripheral (everything else) The #define preprocessor terms are unchanged for now to not disturb dependent APIs. Signed-off-by: Archie Pusaka <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent 83b4b19 commit 74be523

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

net/bluetooth/hci_conn.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ int hci_disconnect(struct hci_conn *conn, __u8 reason)
257257
{
258258
BT_DBG("hcon %p", conn);
259259

260-
/* When we are master of an established connection and it enters
260+
/* When we are central of an established connection and it enters
261261
* the disconnect timeout, then go ahead and try to read the
262262
* current clock offset. Processing of the result is done
263263
* within the event handling and hci_clock_offset_evt function.
@@ -1109,17 +1109,17 @@ struct hci_conn *hci_connect_le(struct hci_dev *hdev, bdaddr_t *dst,
11091109

11101110
hci_req_init(&req, hdev);
11111111

1112-
/* Disable advertising if we're active. For master role
1112+
/* Disable advertising if we're active. For central role
11131113
* connections most controllers will refuse to connect if
1114-
* advertising is enabled, and for slave role connections we
1114+
* advertising is enabled, and for peripheral role connections we
11151115
* anyway have to disable it in order to start directed
11161116
* advertising. Any registered advertisements will be
11171117
* re-enabled after the connection attempt is finished.
11181118
*/
11191119
if (hci_dev_test_flag(hdev, HCI_LE_ADV))
11201120
__hci_req_pause_adv_instances(&req);
11211121

1122-
/* If requested to connect as slave use directed advertising */
1122+
/* If requested to connect as peripheral use directed advertising */
11231123
if (conn->role == HCI_ROLE_SLAVE) {
11241124
/* If we're active scanning most controllers are unable
11251125
* to initiate advertising. Simply reject the attempt.

net/bluetooth/hci_event.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2795,9 +2795,9 @@ static void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *skb)
27952795
bacpy(&cp.bdaddr, &ev->bdaddr);
27962796

27972797
if (lmp_rswitch_capable(hdev) && (mask & HCI_LM_MASTER))
2798-
cp.role = 0x00; /* Become master */
2798+
cp.role = 0x00; /* Become central */
27992799
else
2800-
cp.role = 0x01; /* Remain slave */
2800+
cp.role = 0x01; /* Remain peripheral */
28012801

28022802
hci_send_cmd(hdev, HCI_OP_ACCEPT_CONN_REQ, sizeof(cp), &cp);
28032803
} else if (!(flags & HCI_PROTO_DEFER)) {
@@ -5131,7 +5131,7 @@ static void le_conn_complete_evt(struct hci_dev *hdev, u8 status,
51315131
conn->dst_type = bdaddr_type;
51325132

51335133
/* If we didn't have a hci_conn object previously
5134-
* but we're in master role this must be something
5134+
* but we're in central role this must be something
51355135
* initiated using a white list. Since white list based
51365136
* connections are not "first class citizens" we don't
51375137
* have full tracking of them. Therefore, we go ahead

net/bluetooth/l2cap_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1691,7 +1691,7 @@ static void l2cap_le_conn_ready(struct l2cap_conn *conn)
16911691
if (hcon->out)
16921692
smp_conn_security(hcon, hcon->pending_sec_level);
16931693

1694-
/* For LE slave connections, make sure the connection interval
1694+
/* For LE peripheral connections, make sure the connection interval
16951695
* is in the range of the minimum and maximum interval that has
16961696
* been configured for this connection. If not, then trigger
16971697
* the connection update procedure.

net/bluetooth/smp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -909,8 +909,8 @@ static int tk_request(struct l2cap_conn *conn, u8 remote_oob, u8 auth,
909909
hcon->pending_sec_level = BT_SECURITY_HIGH;
910910
}
911911

912-
/* If both devices have Keyoard-Display I/O, the master
913-
* Confirms and the slave Enters the passkey.
912+
/* If both devices have Keyboard-Display I/O, the initiator
913+
* Confirms and the responder Enters the passkey.
914914
*/
915915
if (smp->method == OVERLAP) {
916916
if (hcon->role == HCI_ROLE_MASTER)
@@ -3083,7 +3083,7 @@ static void bredr_pairing(struct l2cap_chan *chan)
30833083
if (!test_bit(HCI_CONN_ENCRYPT, &hcon->flags))
30843084
return;
30853085

3086-
/* Only master may initiate SMP over BR/EDR */
3086+
/* Only initiator may initiate SMP over BR/EDR */
30873087
if (hcon->role != HCI_ROLE_MASTER)
30883088
return;
30893089

0 commit comments

Comments
 (0)