Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp927541pxj; Fri, 4 Jun 2021 01:29:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXONd3jV01isxSHjCt8o4ZifsDGkCwD/yJj0GgPSCI5ffWgXN6AT+FloiYHdlU+zpiAPP2 X-Received: by 2002:a17:906:714d:: with SMTP id z13mr3209838ejj.48.1622795363429; Fri, 04 Jun 2021 01:29:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622795363; cv=none; d=google.com; s=arc-20160816; b=kl7YQVvqrNVLg+hR0Keol7EoQ8eIUeXdTRUHJPQ0ZJw+UZLpWV2DVKIT39cLjVimlU WsEFz2dXPyyB+9sLuEzYk+u0wrWqfCeT3K9BYdZrI7pDxEM1NtSezaK4iDr6/7umvosK pfBeNsMW357YOT66x5uhGeQ0lPXHqi9LR+A3Fet9b7qDzEYitNm5OZOg2NEUXSHM2erY JV1wKmUFkwOfF/igfTxYXiFRiIJzCkIp6p5Tp4Un0Z9xeGepvATMZMWSMJyF3UHVqZxI hlWaZfbeBs5mgh/FLEhsW8oTJlAhCRCvuM10+Y0D03/KvT63pqbyBR94U6MWQ5rY5xDL u2Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :dkim-signature; bh=rkwFW1rTtpipvPo2i45vrrpv7tHxndFtqZdOdDuII3A=; b=Luv00eRTY5iiuXTYaPrSASuViM0NyttkkePodeZKRLMJUCBVYYBbWbVFXkw9RS2vMs 2FCHHX50dWCnD3NXonhmJJBkWiXeqh2HMhUbk4aIhWIQCQFYsBEPLqVaipWGTX5UylvL 822pTHWhCyKYWa4NSmUeaOkQaI27XUnXIM6amTZOkgN/we+Kyg5hHe7KV6dBYHbI8A7s 4pNNDJ+q/wYrYZaDIhM216WB5IQsu3B2haDlNe+XKOznQqwE6XU9gHP30iz4ULaG0hAm 8NbajKws/xgeLRJ7O4fRAnwYNNufg6f4aWt8M0JUWPWPnK8UPtk4MFN27/M384wuF/sY kZig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=TqrRKVn7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x18si4103918eji.715.2021.06.04.01.28.59; Fri, 04 Jun 2021 01:29:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=TqrRKVn7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230198AbhFDI2U (ORCPT + 99 others); Fri, 4 Jun 2021 04:28:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230010AbhFDI2U (ORCPT ); Fri, 4 Jun 2021 04:28:20 -0400 Received: from mail-qt1-x84a.google.com (mail-qt1-x84a.google.com [IPv6:2607:f8b0:4864:20::84a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C655C06174A for ; Fri, 4 Jun 2021 01:26:34 -0700 (PDT) Received: by mail-qt1-x84a.google.com with SMTP id d7-20020ac811870000b02901e65f85117bso4728328qtj.18 for ; Fri, 04 Jun 2021 01:26:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=rkwFW1rTtpipvPo2i45vrrpv7tHxndFtqZdOdDuII3A=; b=TqrRKVn7by4f57Ty0NBYM9ZQi0Yel60OrNYMMrjdSVWyfN/pZriGeyU44PbO89UH+P KcXpb6FIgJGL4eZm6mJ2RjgoXhiQCswQJfQwdDai4ATO9xluo0Rry/txCJsBUnpF+h4y NPHqWomi88TH4sHmoUCSGUoPfgt2GJgFv7fYazgcXz4lL+ApLzKomWX6tKnyQ1D/8vG7 LTYS8oIpLAl5ZA0AYkSW6gCY8u26jL9khDnOPV6B/ZamX9UXq0PpyOw/bVlVYCHlJfl/ pG/Bbo+7XPbMbjumsX6r9K6hc4QSAobk1RJviQ2TkGIJ0rUs8OtvzupajxV4OdlfiUOM DPeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=rkwFW1rTtpipvPo2i45vrrpv7tHxndFtqZdOdDuII3A=; b=JuiYoEItu13Ncsi3qG4OSrUtdKwraSVMT6VYBlw6EUrrurKhx+5XEaDDGhIFLtFoQX XiFtSvt9aLiBaiiDdtnWd9gFs77Ni/lzrjfN5bKsb9tYkIpxrAhowZiLVwqL4G+cDFNP ssC87NHfEcU6e9pJHD7CcShVUK0fJoi1FyGJ+AXrnSENNVKHAcovuiBwyS6KoTo0JYhO Wa7Fo/SrRtsnfGWPeOt0fnw5iDJcKBweYGaZH1NLo6NmeXjllZKstw3cORLdrCWQcRyA 4q7N0lFAdAUINgqbM1i1yPOpBObgiGQi7Dal6SGY705FDKJ+Ox5M60aDlKw+udIuASp1 JZGA== X-Gm-Message-State: AOAM530UWtn3JCyPOk+mucnJxw7BcvOyFJMkMoVveFerBN8nKgl3k/UV RFP9uutY8iqpLFo0OVDt1K/tdtxlprvn X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:b:c6ff:1ed3:74cf:2ae3]) (user=apusaka job=sendgmr) by 2002:a0c:d80f:: with SMTP id h15mr3586315qvj.17.1622795193532; Fri, 04 Jun 2021 01:26:33 -0700 (PDT) Date: Fri, 4 Jun 2021 16:26:25 +0800 Message-Id: <20210604162616.v3.1.I444f42473f263fed77f2586eb4b01d6752df0de4@changeid> Mime-Version: 1.0 X-Mailer: git-send-email 2.32.0.rc1.229.g3e70b5a671-goog Subject: [PATCH v3 1/3] Bluetooth: use inclusive language in HCI role comments From: Archie Pusaka To: linux-bluetooth , Marcel Holtmann Cc: CrosBT Upstreaming , Archie Pusaka , "David S. Miller" , Jakub Kicinski , Johan Hedberg , Luiz Augusto von Dentz , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Archie Pusaka 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 --- Changes in v3: * Remove the #define terms from change net/bluetooth/hci_conn.c | 8 ++++---- net/bluetooth/hci_event.c | 6 +++--- net/bluetooth/l2cap_core.c | 2 +- net/bluetooth/smp.c | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index ea0f9cdaa6b1..2b5059a56cda 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -257,7 +257,7 @@ int hci_disconnect(struct hci_conn *conn, __u8 reason) { BT_DBG("hcon %p", conn); - /* When we are master of an established connection and it enters + /* When we are central of an established connection and it enters * the disconnect timeout, then go ahead and try to read the * current clock offset. Processing of the result is done * within the event handling and hci_clock_offset_evt function. @@ -1109,9 +1109,9 @@ struct hci_conn *hci_connect_le(struct hci_dev *hdev, bdaddr_t *dst, hci_req_init(&req, hdev); - /* Disable advertising if we're active. For master role + /* Disable advertising if we're active. For central role * connections most controllers will refuse to connect if - * advertising is enabled, and for slave role connections we + * advertising is enabled, and for peripheral role connections we * anyway have to disable it in order to start directed * advertising. Any registered advertisements will be * re-enabled after the connection attempt is finished. @@ -1119,7 +1119,7 @@ struct hci_conn *hci_connect_le(struct hci_dev *hdev, bdaddr_t *dst, if (hci_dev_test_flag(hdev, HCI_LE_ADV)) __hci_req_pause_adv_instances(&req); - /* If requested to connect as slave use directed advertising */ + /* If requested to connect as peripheral use directed advertising */ if (conn->role == HCI_ROLE_SLAVE) { /* If we're active scanning most controllers are unable * to initiate advertising. Simply reject the attempt. diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 43c324c46c0b..da013d485f14 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -2795,9 +2795,9 @@ static void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *skb) bacpy(&cp.bdaddr, &ev->bdaddr); if (lmp_rswitch_capable(hdev) && (mask & HCI_LM_MASTER)) - cp.role = 0x00; /* Become master */ + cp.role = 0x00; /* Become central */ else - cp.role = 0x01; /* Remain slave */ + cp.role = 0x01; /* Remain peripheral */ hci_send_cmd(hdev, HCI_OP_ACCEPT_CONN_REQ, sizeof(cp), &cp); } else if (!(flags & HCI_PROTO_DEFER)) { @@ -5131,7 +5131,7 @@ static void le_conn_complete_evt(struct hci_dev *hdev, u8 status, conn->dst_type = bdaddr_type; /* If we didn't have a hci_conn object previously - * but we're in master role this must be something + * but we're in central role this must be something * initiated using a white list. Since white list based * connections are not "first class citizens" we don't * have full tracking of them. Therefore, we go ahead diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 9ebb85df4db4..b76c5d00b082 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -1691,7 +1691,7 @@ static void l2cap_le_conn_ready(struct l2cap_conn *conn) if (hcon->out) smp_conn_security(hcon, hcon->pending_sec_level); - /* For LE slave connections, make sure the connection interval + /* For LE peripheral connections, make sure the connection interval * is in the range of the minimum and maximum interval that has * been configured for this connection. If not, then trigger * the connection update procedure. diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index 6777f5313838..53f984d11bc1 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c @@ -909,8 +909,8 @@ static int tk_request(struct l2cap_conn *conn, u8 remote_oob, u8 auth, hcon->pending_sec_level = BT_SECURITY_HIGH; } - /* If both devices have Keyoard-Display I/O, the master - * Confirms and the slave Enters the passkey. + /* If both devices have Keyboard-Display I/O, the initiator + * Confirms and the responder Enters the passkey. */ if (smp->method == OVERLAP) { if (hcon->role == HCI_ROLE_MASTER) @@ -3083,7 +3083,7 @@ static void bredr_pairing(struct l2cap_chan *chan) if (!test_bit(HCI_CONN_ENCRYPT, &hcon->flags)) return; - /* Only master may initiate SMP over BR/EDR */ + /* Only initiator may initiate SMP over BR/EDR */ if (hcon->role != HCI_ROLE_MASTER) return; -- 2.32.0.rc1.229.g3e70b5a671-goog