From patchwork Thu Sep 2 04:06:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 505824 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-21.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6593C432BE for ; Thu, 2 Sep 2021 04:07:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 84D8560EE6 for ; Thu, 2 Sep 2021 04:07:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229650AbhIBEIq (ORCPT ); Thu, 2 Sep 2021 00:08:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbhIBEIi (ORCPT ); Thu, 2 Sep 2021 00:08:38 -0400 Received: from mail-qv1-xf4a.google.com (mail-qv1-xf4a.google.com [IPv6:2607:f8b0:4864:20::f4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02409C061575 for ; Wed, 1 Sep 2021 21:07:40 -0700 (PDT) Received: by mail-qv1-xf4a.google.com with SMTP id r3-20020a0cc403000000b00377a3318261so580096qvi.11 for ; Wed, 01 Sep 2021 21:07:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=1mM4fV/PxTjsjhYpIn5XCfcA+Zf+3ZIJ9u4uTgbrHoE=; b=Hy9teKHrGQlolAks4wQAhqX5Dzo7G/1srTlbBEThCDxxNURYbHTQf44hAM0CCo5X49 kX+15dku/kbVsugfgCyAIK/SoG7yBktLJku/HbB2a70L5tJYVD5bsFbB4CfBAV64WYcw hPL1xveDPrfK9/0E6UaZ/sEmHCL9qDPeA9uXmjx29MjfCSn301CVW3p3tpmCGQcpCsrp cfgMuMDrKrjUa87V1KZC0gmX270MlAfxpBa/fCaCmyvvj34pY6ggskgvqr6i1ZBs61I7 rd+e+2mboCi5GebQrLJ1lBi5R9BqAwKrz3lBlhJ306a4gGep4halcvnmgYvLWCcwq0ak 11/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=1mM4fV/PxTjsjhYpIn5XCfcA+Zf+3ZIJ9u4uTgbrHoE=; b=RRa8K1MRaQ0oD8DfI0RWhDXkhgoEItfTDQcLNCkzkiMNnE0zHpjJgOdzLNxFCVnOrD P25UHGmjJQje+eeSvgeCtoy5LSd3BjVPNmxg4+QjmWkHypVg6T/k77B/CnYdzomJzkVb gP80pK0MQhmgMMwiynT5LcMlIWVMwF0Vw5a4tf4gcQTK5yU+13cEDW3RyH9qqBwI9E12 s7xo6CRSfuD2XdvXfgSMdDEVdohpXgAxmWto41HLfJosXLX6Gt02292vynCOqp5sBXRg d/9jRT9sEDPYxgSqmJ9atQ7sfTgg1GVOi3n5DN9v92f5RPGuUeouHtlrmLHzaEQl/waC 8yhA== X-Gm-Message-State: AOAM531l9jrGlYNEH0yCJdUcFjDtgxJQMRjMgPoxDbk716OjfXRjL6Og N2fRY+PUuhU4CuqAd6+PX6U1fiP+e9KK0wO8wqlbDckoFtXA/7M/GojapQf02Y4tt1Qop8lNkgZ xTiu+6Qm5wkEgEDN2o3SJjM/FH9i+8adGWIGHjpLa95OiB0OfVebT523rhEa/EEj6DS/mVpb9bK xV X-Google-Smtp-Source: ABdhPJwofq1xBOuDPBWfW4c9n4+1ydiUnAvXja2IKBW/mVnzix8ger9Rvt9V9ytLNaZGzPy0qNjzHvYaNRmk X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:5249:e81c:3ce6:f50c]) (user=apusaka job=sendgmr) by 2002:a05:6214:104e:: with SMTP id l14mr1020034qvr.45.1630555659103; Wed, 01 Sep 2021 21:07:39 -0700 (PDT) Date: Thu, 2 Sep 2021 12:06:59 +0800 In-Reply-To: <20210902040711.665952-1-apusaka@google.com> Message-Id: <20210902120509.Bluez.v2.1.I3be2e373e96293524fa38328ebac177eddc71938@changeid> Mime-Version: 1.0 References: <20210902040711.665952-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.259.gc128427fd7-goog Subject: [Bluez PATCH v2 01/13] lib: Inclusive language changes From: Archie Pusaka To: linux-bluetooth , Luiz Augusto von Dentz Cc: CrosBT Upstreaming , Archie Pusaka Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Archie Pusaka 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". --- Changes in v2: * Merging several patches from the same directory into one android/bluetooth.c | 4 ++-- btio/btio.c | 20 ++++++++-------- lib/hci.c | 52 +++++++++++++++++++++--------------------- lib/hci.h | 44 +++++++++++++++++------------------ lib/hci_lib.h | 8 +++---- lib/l2cap.h | 2 +- lib/mgmt.h | 2 +- lib/rfcomm.h | 2 +- monitor/control.c | 4 ++-- profiles/health/mcap.c | 2 +- src/adapter.c | 4 ++-- src/sdpd-server.c | 2 +- tools/hcitool.c | 8 +++---- tools/l2test.c | 4 ++-- tools/oobtest.c | 4 ++-- tools/parser/hci.c | 14 ++++++------ tools/rctest.c | 4 ++-- tools/rfcomm.c | 2 +- 18 files changed, 91 insertions(+), 91 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/btio/btio.c b/btio/btio.c index 1f1c374bca..ce958bdd09 100644 --- a/btio/btio.c +++ b/btio/btio.c @@ -369,13 +369,13 @@ static int l2cap_set_master(int sock, int master) return -errno; if (master) { - if (flags & L2CAP_LM_MASTER) + if (flags & L2CAP_LM_CENTRAL) return 0; - flags |= L2CAP_LM_MASTER; + flags |= L2CAP_LM_CENTRAL; } else { - if (!(flags & L2CAP_LM_MASTER)) + if (!(flags & L2CAP_LM_CENTRAL)) return 0; - flags &= ~L2CAP_LM_MASTER; + flags &= ~L2CAP_LM_CENTRAL; } if (setsockopt(sock, SOL_L2CAP, L2CAP_LM, &flags, sizeof(flags)) < 0) @@ -394,13 +394,13 @@ static int rfcomm_set_master(int sock, int master) return -errno; if (master) { - if (flags & RFCOMM_LM_MASTER) + if (flags & RFCOMM_LM_CENTRAL) return 0; - flags |= RFCOMM_LM_MASTER; + flags |= RFCOMM_LM_CENTRAL; } else { - if (!(flags & RFCOMM_LM_MASTER)) + if (!(flags & RFCOMM_LM_CENTRAL)) return 0; - flags &= ~RFCOMM_LM_MASTER; + flags &= ~RFCOMM_LM_CENTRAL; } if (setsockopt(sock, SOL_RFCOMM, RFCOMM_LM, &flags, sizeof(flags)) < 0) @@ -1180,7 +1180,7 @@ parse_opts: return FALSE; } *(va_arg(args, gboolean *)) = - (flags & L2CAP_LM_MASTER) ? TRUE : FALSE; + (flags & L2CAP_LM_CENTRAL) ? TRUE : FALSE; break; case BT_IO_OPT_HANDLE: if (l2cap_get_info(sock, &handle, dev_class) < 0) { @@ -1345,7 +1345,7 @@ static gboolean rfcomm_get(int sock, GError **err, BtIOOption opt1, return FALSE; } *(va_arg(args, gboolean *)) = - (flags & RFCOMM_LM_MASTER) ? TRUE : FALSE; + (flags & RFCOMM_LM_CENTRAL) ? TRUE : FALSE; break; case BT_IO_OPT_HANDLE: if (rfcomm_get_info(sock, &handle, dev_class) < 0) { diff --git a/lib/hci.c b/lib/hci.c index 53af0a1148..d2753a934d 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 }, @@ -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] = { { "", LMP_EV4 }, /* Bit 0 */ { "", LMP_EV5 }, /* Bit 1 */ { "", 0x04 }, /* Bit 2 */ - { "", LMP_AFH_CAP_SLV }, /* Bit 3 */ - { "", LMP_AFH_CLS_SLV }, /* Bit 4 */ + { "", LMP_AFH_CAP_PRP }, /* Bit 3 */ + { "",LMP_AFH_CLS_PRP }, /* Bit 4 */ { "
", LMP_NO_BREDR }, /* Bit 5 */ { "", 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 */ { "", LMP_SNIFF_SUBR }, /* Bit 1 */ { "", LMP_PAUSE_ENC }, /* Bit 2 */ - { "", LMP_AFH_CAP_MST }, /* Bit 3 */ - { "",LMP_AFH_CLS_MST }, /* Bit 4 */ + { "", LMP_AFH_CAP_CEN }, /* Bit 3 */ + { "", LMP_AFH_CLS_CEN }, /* Bit 4 */ { "", LMP_EDR_ESCO_2M }, /* Bit 5 */ { "", LMP_EDR_ESCO_3M }, /* Bit 6 */ { "<3-slot EDR eSCO>", LMP_EDR_3S_ESCO }, /* Bit 7 */ @@ -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 3382b87bf3..e31685b644 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 @@ -421,11 +421,11 @@ typedef struct { } __attribute__ ((packed)) change_conn_link_key_cp; #define CHANGE_CONN_LINK_KEY_CP_SIZE 2 -#define OCF_MASTER_LINK_KEY 0x0017 +#define OCF_CENTRAL_LINK_KEY 0x0017 typedef struct { uint8_t key_flag; -} __attribute__ ((packed)) master_link_key_cp; -#define MASTER_LINK_KEY_CP_SIZE 1 +} __attribute__ ((packed)) central_link_key_cp; +#define CENTRAL_LINK_KEY_CP_SIZE 1 #define OCF_REMOTE_NAME_REQ 0x0019 typedef struct { @@ -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 { @@ -1804,13 +1804,13 @@ typedef struct { } __attribute__ ((packed)) evt_change_conn_link_key_complete; #define EVT_CHANGE_CONN_LINK_KEY_COMPLETE_SIZE 3 -#define EVT_MASTER_LINK_KEY_COMPLETE 0x0A +#define EVT_CENTRAL_LINK_KEY_COMPLETE 0x0A typedef struct { uint8_t status; uint16_t handle; uint8_t key_flag; -} __attribute__ ((packed)) evt_master_link_key_complete; -#define EVT_MASTER_LINK_KEY_COMPLETE_SIZE 4 +} __attribute__ ((packed)) evt_central_link_key_complete; +#define EVT_CENTRAL_LINK_KEY_COMPLETE_SIZE 4 #define EVT_READ_REMOTE_FEATURES_COMPLETE 0x0B typedef struct { @@ -2149,7 +2149,7 @@ typedef struct { uint16_t interval; uint16_t latency; uint16_t supervision_timeout; - uint8_t master_clock_accuracy; + uint8_t central_clock_accuracy; } __attribute__ ((packed)) evt_le_connection_complete; #define EVT_LE_CONN_COMPLETE_SIZE 18 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/lib/l2cap.h b/lib/l2cap.h index 9197800df4..a0ea111839 100644 --- a/lib/l2cap.h +++ b/lib/l2cap.h @@ -52,7 +52,7 @@ struct l2cap_conninfo { }; #define L2CAP_LM 0x03 -#define L2CAP_LM_MASTER 0x0001 +#define L2CAP_LM_CENTRAL 0x0001 #define L2CAP_LM_AUTH 0x0002 #define L2CAP_LM_ENCRYPT 0x0004 #define L2CAP_LM_TRUSTED 0x0008 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/lib/rfcomm.h b/lib/rfcomm.h index 0347ddc367..ab1df888c2 100644 --- a/lib/rfcomm.h +++ b/lib/rfcomm.h @@ -38,7 +38,7 @@ struct rfcomm_conninfo { }; #define RFCOMM_LM 0x03 -#define RFCOMM_LM_MASTER 0x0001 +#define RFCOMM_LM_CENTRAL 0x0001 #define RFCOMM_LM_AUTH 0x0002 #define RFCOMM_LM_ENCRYPT 0x0004 #define RFCOMM_LM_TRUSTED 0x0008 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/profiles/health/mcap.c b/profiles/health/mcap.c index be13af37a0..ab05a2bc24 100644 --- a/profiles/health/mcap.c +++ b/profiles/health/mcap.c @@ -2426,7 +2426,7 @@ static gboolean get_btrole(struct mcap_mcl *mcl) if (getsockopt(sock, SOL_L2CAP, L2CAP_LM, &flags, &len)) DBG("CSP: could not read role"); - return flags & L2CAP_LM_MASTER; + return flags & L2CAP_LM_CENTRAL; } uint64_t mcap_get_timestamp(struct mcap_mcl *mcl, 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/src/sdpd-server.c b/src/sdpd-server.c index 306b92a44c..c71e2c22da 100644 --- a/src/sdpd-server.c +++ b/src/sdpd-server.c @@ -72,7 +72,7 @@ static int init_server(uint16_t mtu, int master, int compat) } if (master) { - int opt = L2CAP_LM_MASTER; + int opt = L2CAP_LM_CENTRAL; if (setsockopt(l2cap_sock, SOL_L2CAP, L2CAP_LM, &opt, sizeof(opt)) < 0) { error("setsockopt: %s", strerror(errno)); return -1; 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/l2test.c b/tools/l2test.c index 6e07f7b842..822cdc8cc9 100644 --- a/tools/l2test.c +++ b/tools/l2test.c @@ -484,7 +484,7 @@ static int do_connect(char *svr) if (reliable) opt |= L2CAP_LM_RELIABLE; if (master) - opt |= L2CAP_LM_MASTER; + opt |= L2CAP_LM_CENTRAL; if (auth) opt |= L2CAP_LM_AUTH; if (encr) @@ -587,7 +587,7 @@ static void do_listen(void (*handler)(int sk)) if (reliable) opt |= L2CAP_LM_RELIABLE; if (master) - opt |= L2CAP_LM_MASTER; + opt |= L2CAP_LM_CENTRAL; if (auth) opt |= L2CAP_LM_AUTH; if (encr) 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"; diff --git a/tools/parser/hci.c b/tools/parser/hci.c index d395e37f54..02ebcfc442 100644 --- a/tools/parser/hci.c +++ b/tools/parser/hci.c @@ -1084,7 +1084,7 @@ static inline void remote_name_req_dump(int level, struct frame *frm) static inline void master_link_key_dump(int level, struct frame *frm) { - master_link_key_cp *cp = frm->ptr; + central_link_key_cp *cp = frm->ptr; p_indent(level, frm); printf("flag %d\n", cp->key_flag); @@ -1771,7 +1771,7 @@ static inline void command_dump(int level, struct frame *frm) case OCF_DISCONNECT_LOGICAL_LINK: generic_command_dump(level + 1, frm); return; - case OCF_MASTER_LINK_KEY: + case OCF_CENTRAL_LINK_KEY: master_link_key_dump(level + 1, frm); return; case OCF_READ_REMOTE_EXT_FEATURES: @@ -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: @@ -3116,7 +3116,7 @@ static inline void remote_name_req_complete_dump(int level, struct frame *frm) static inline void master_link_key_complete_dump(int level, struct frame *frm) { - evt_master_link_key_complete *evt = frm->ptr; + evt_central_link_key_complete *evt = frm->ptr; p_indent(level, frm); printf("status 0x%2.2x handle %d flag %d\n", @@ -3874,7 +3874,7 @@ static inline void event_dump(int level, struct frame *frm) case EVT_CHANGE_CONN_LINK_KEY_COMPLETE: generic_response_dump(level + 1, frm); break; - case EVT_MASTER_LINK_KEY_COMPLETE: + case EVT_CENTRAL_LINK_KEY_COMPLETE: master_link_key_complete_dump(level + 1, frm); break; case EVT_REMOTE_NAME_REQ_COMPLETE: diff --git a/tools/rctest.c b/tools/rctest.c index 7d688691c4..034ae167b2 100644 --- a/tools/rctest.c +++ b/tools/rctest.c @@ -203,7 +203,7 @@ static int do_connect(const char *svr) /* Set link mode */ opt = 0; if (master) - opt |= RFCOMM_LM_MASTER; + opt |= RFCOMM_LM_CENTRAL; if (auth) opt |= RFCOMM_LM_AUTH; if (encr) @@ -294,7 +294,7 @@ static void do_listen(void (*handler)(int sk)) /* Set link mode */ opt = 0; if (master) - opt |= RFCOMM_LM_MASTER; + opt |= RFCOMM_LM_CENTRAL; if (auth) opt |= RFCOMM_LM_AUTH; if (encr) diff --git a/tools/rfcomm.c b/tools/rfcomm.c index 8e1db8ebaa..7ad7ca5ad6 100644 --- a/tools/rfcomm.c +++ b/tools/rfcomm.c @@ -435,7 +435,7 @@ static void cmd_listen(int ctl, int dev, bdaddr_t *bdaddr, int argc, char **argv lm = 0; if (master) - lm |= RFCOMM_LM_MASTER; + lm |= RFCOMM_LM_CENTRAL; if (auth) lm |= RFCOMM_LM_AUTH; if (encryption) From patchwork Thu Sep 2 04:07:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 505823 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-21.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2136C4320E for ; Thu, 2 Sep 2021 04:07:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9951B60EE6 for ; Thu, 2 Sep 2021 04:07:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229704AbhIBEIw (ORCPT ); Thu, 2 Sep 2021 00:08:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbhIBEIw (ORCPT ); Thu, 2 Sep 2021 00:08:52 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23EDAC061575 for ; Wed, 1 Sep 2021 21:07:54 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id c130-20020a25c088000000b0059ee106574aso915082ybf.4 for ; Wed, 01 Sep 2021 21:07:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc:content-transfer-encoding; bh=UUIihZoj7xf+RG6UCgtLAoR0aiDiMeABtZffipHq61Q=; b=Ex9Afh8iNrxjTIhUFFU5EhHiLjDnvMXjLmQaicSeaHV+QwG269hj0M7qcACEsbMoiS v4tVikHazMNLgU2zXLa3VjVMpYBTCx23I9VWYJ0bWAIJ9cHbw37xj4DZM10XLWVAu9p+ MMWQlLjc/ESOJ0lu04GxMHq5f70Cu4BfoHQqRk4j/YRCabORzWyADlE5Lv99jH0uSLYI /nuVC+A3VB09dubC3edopLqfySf2gyjnmr0Nyw1Q/xl6fWrdxemYTTJ0YnWlMPeazrSg FZodsrNAZZwZEGFSmFDGnsRpKf5VeIfa/YWWfUR0pI4iSs0921Jdipw+FxLe2npbbcHb Ss0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc:content-transfer-encoding; bh=UUIihZoj7xf+RG6UCgtLAoR0aiDiMeABtZffipHq61Q=; b=Rjtw+euLWlLVVEWBKPJsNqz3aoixbwJilVT+eKboEbfospF5u911pFLVkE1aC3hTTw QZnJQTUEsM5bNC/bIx+qSKBOKXqwaU7aH2Ix4n8QiuRYZwcIWCQ1OsQwCSWBLBLXWfPx AAToSKRgICE5qMArSIUPm8/JCMo5BqIsEdCB6cfNJtOkl7IhM/U8RUKaGd+FInq5xK6j VWllFVYZ1G60ITB7AnogwQh+agbuqZxtoWhkxDIA4NPknq1F6vD7LGxEQGxrTKhm8+9g gTcjutcTV5F24G5d7PYw9HmCH07tKgJMW7WQfjHunUsI/vhKOEVxZSEjkF1D6sAvmS/T 9laQ== X-Gm-Message-State: AOAM5337UMx7cSRo1RhWmysp/vigoIME62CEx2tgVgVlpoIw6ruOY9eW GND+jgg/6U4WNxM2Iu8S0USkVit2T5KH+2OU6feayNnADLlNKV3J8owIgKwcYlBzAtTlTi8OAQJ DtA9NcMVJ1krrHNDLMBrUAGbFBYKv59fCt3R2xRZlLqfGQEZY6FBudmpmri7M8FSchQg/k+Zql/ cP X-Google-Smtp-Source: ABdhPJxduhR+QJwG9kM2U4W/OzqRgcI6RkqpLyC+3NUtUpR83h8UJcqCzl5zz2YeVJ5g5iT3TJywSyDh/o5X X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:5249:e81c:3ce6:f50c]) (user=apusaka job=sendgmr) by 2002:a25:8082:: with SMTP id n2mr1719631ybk.79.1630555673324; Wed, 01 Sep 2021 21:07:53 -0700 (PDT) Date: Thu, 2 Sep 2021 12:07:02 +0800 In-Reply-To: <20210902040711.665952-1-apusaka@google.com> Message-Id: <20210902120509.Bluez.v2.4.Idde74d908204ede645812e49623e367d27c50e58@changeid> Mime-Version: 1.0 References: <20210902040711.665952-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.259.gc128427fd7-goog Subject: [Bluez PATCH v2 04/13] emulator: Inclusive language changes From: Archie Pusaka To: linux-bluetooth , Luiz Augusto von Dentz Cc: CrosBT Upstreaming , Archie Pusaka Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Archie Pusaka 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". --- Changes in v2: * Merging several patches from the same directory into one android/tester-main.c | 2 +- emulator/btdev.c | 148 +++++++++++++++++++++--------------------- emulator/hciemu.c | 21 +++--- emulator/hciemu.h | 12 ++-- emulator/le.c | 84 ++++++++++++------------ emulator/serial.c | 6 +- tools/l2cap-tester.c | 16 ++--- tools/mgmt-tester.c | 20 +++--- tools/rfcomm-tester.c | 4 +- tools/sco-tester.c | 2 +- tools/smp-tester.c | 6 +- 11 files changed, 161 insertions(+), 160 deletions(-) diff --git a/android/tester-main.c b/android/tester-main.c index 2bfa770bb5..ff5ecdf834 100644 --- a/android/tester-main.c +++ b/android/tester-main.c @@ -2786,7 +2786,7 @@ void emu_remote_connect_hci_action(void) struct step *step = g_new0(struct step, 1); const uint8_t *master_addr; - master_addr = hciemu_get_master_bdaddr(data->hciemu); + master_addr = hciemu_get_central_bdaddr(data->hciemu); tester_print("Trying to connect hci"); diff --git a/emulator/btdev.c b/emulator/btdev.c index 343c065760..669174862b 100644 --- a/emulator/btdev.c +++ b/emulator/btdev.c @@ -33,7 +33,7 @@ #include "monitor/bt.h" #include "btdev.h" -#define WL_SIZE 16 +#define AL_SIZE 16 #define RL_SIZE 16 #define CIS_SIZE 3 @@ -61,7 +61,7 @@ struct btdev_conn { struct btdev_conn *link; }; -struct btdev_wl { +struct btdev_al { uint8_t type; bdaddr_t addr; }; @@ -191,7 +191,7 @@ struct btdev { } __attribute__ ((packed)) le_cig; uint8_t le_iso_path[2]; - struct btdev_wl le_wl[WL_SIZE]; + struct btdev_al le_al[AL_SIZE]; struct btdev_rl le_rl[RL_SIZE]; uint8_t le_rl_enable; uint16_t le_rl_timeout; @@ -445,18 +445,18 @@ static int cmd_set_event_mask(struct btdev *dev, const void *data, uint8_t len) return 0; } -static void wl_reset(struct btdev_wl *wl) +static void al_reset(struct btdev_al *al) { - wl->type = 0xff; - bacpy(&wl->addr, BDADDR_ANY); + al->type = 0xff; + bacpy(&al->addr, BDADDR_ANY); } -static void wl_clear(struct btdev *dev) +static void al_clear(struct btdev *dev) { int i; - for (i = 0; i < WL_SIZE; i++) - wl_reset(&dev->le_wl[i]); + for (i = 0; i < AL_SIZE; i++) + al_reset(&dev->le_al[i]); } static void rl_reset(struct btdev_rl *rl) @@ -484,7 +484,7 @@ static void btdev_reset(struct btdev *btdev) btdev->le_scan_enable = 0x00; btdev->le_adv_enable = 0x00; - wl_clear(btdev); + al_clear(btdev); rl_clear(btdev); } @@ -3566,25 +3566,25 @@ static int cmd_le_create_conn_complete(struct btdev *dev, const void *data, return 0; } -static int cmd_read_wl_size(struct btdev *dev, const void *data, uint8_t len) +static int cmd_read_al_size(struct btdev *dev, const void *data, uint8_t len) { struct bt_hci_rsp_le_read_accept_list_size rsp; rsp.status = BT_HCI_ERR_SUCCESS; - rsp.size = WL_SIZE; + rsp.size = AL_SIZE; cmd_complete(dev, BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE, &rsp, sizeof(rsp)); return 0; } -static bool wl_can_change(struct btdev *dev) +static bool al_can_change(struct btdev *dev) { - /* filter policy uses the White List and advertising is enable. */ + /* filter policy uses the Accept List and advertising is enable. */ if (dev->le_adv_enable && dev->le_adv_filter_policy) return false; - /* scanning filter policy uses the White List and scanning is enabled */ + /* scan filter policy uses the Accept List and scanning is enabled */ if (dev->le_scan_enable) { switch (dev->le_scan_filter_policy) { case 0x00: @@ -3601,23 +3601,23 @@ static bool wl_can_change(struct btdev *dev) return true; } -static int cmd_wl_clear(struct btdev *dev, const void *data, uint8_t len) +static int cmd_al_clear(struct btdev *dev, const void *data, uint8_t len) { uint8_t status; /* This command shall not be used when: - * • any advertising filter policy uses the White List and advertising + * • any advertising filter policy uses the Accept List and advertising * is enabled, - * • the scanning filter policy uses the White List and scanning is + * • the scanning filter policy uses the Accept List and scanning is * enabled, or - * • the initiator filter policy uses the White List and an + * • the initiator filter policy uses the Accept List and an * HCI_LE_Create_Connection or HCI_LE_Extended_Create_Connection * command is outstanding. */ - if (!wl_can_change(dev)) + if (!al_can_change(dev)) return -EPERM; - wl_clear(dev); + al_clear(dev); status = BT_HCI_ERR_SUCCESS; cmd_complete(dev, BT_HCI_CMD_LE_CLEAR_ACCEPT_LIST, &status, @@ -3626,16 +3626,16 @@ static int cmd_wl_clear(struct btdev *dev, const void *data, uint8_t len) return 0; } -#define WL_ADDR_EQUAL(_wl, _type, _addr) \ - (_wl->type == _type && !bacmp(&_wl->addr, (bdaddr_t *)_addr)) +#define AL_ADDR_EQUAL(_al, _type, _addr) \ + (_al->type == _type && !bacmp(&_al->addr, (bdaddr_t *)_addr)) -static void wl_add(struct btdev_wl *wl, uint8_t type, bdaddr_t *addr) +static void al_add(struct btdev_al *al, uint8_t type, bdaddr_t *addr) { - wl->type = type; - bacpy(&wl->addr, addr); + al->type = type; + bacpy(&al->addr, addr); } -static int cmd_add_wl(struct btdev *dev, const void *data, uint8_t len) +static int cmd_add_al(struct btdev *dev, const void *data, uint8_t len) { const struct bt_hci_cmd_le_add_to_accept_list *cmd = data; uint8_t status; @@ -3643,28 +3643,28 @@ static int cmd_add_wl(struct btdev *dev, const void *data, uint8_t len) int i, pos = -1; /* This command shall not be used when: - * • any advertising filter policy uses the White List and advertising + * • any advertising filter policy uses the Accept List and advertising * is enabled, - * • the scanning filter policy uses the White List and scanning is + * • the scanning filter policy uses the Accept List and scanning is * enabled, or - * • the initiator filter policy uses the White List and an + * • the initiator filter policy uses the Accept List and an * HCI_LE_Create_Connection or HCI_LE_Extended_Create_Connection * command is outstanding. */ - if (!wl_can_change(dev)) + if (!al_can_change(dev)) return -EPERM; /* Valid range for address type is 0x00 to 0x01 */ if (cmd->addr_type > 0x01) return -EINVAL; - for (i = 0; i < WL_SIZE; i++) { - struct btdev_wl *wl = &dev->le_wl[i]; + for (i = 0; i < AL_SIZE; i++) { + struct btdev_al *al = &dev->le_al[i]; - if (WL_ADDR_EQUAL(wl, cmd->addr_type, &cmd->addr)) { + if (AL_ADDR_EQUAL(al, cmd->addr_type, &cmd->addr)) { exists = true; break; - } else if (pos < 0 && wl->type == 0xff) + } else if (pos < 0 && al->type == 0xff) pos = i; } @@ -3677,7 +3677,7 @@ static int cmd_add_wl(struct btdev *dev, const void *data, uint8_t len) return 0; } - wl_add(&dev->le_wl[pos], cmd->addr_type, (bdaddr_t *)&cmd->addr); + al_add(&dev->le_al[pos], cmd->addr_type, (bdaddr_t *)&cmd->addr); status = BT_HCI_ERR_SUCCESS; cmd_complete(dev, BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST, @@ -3686,7 +3686,7 @@ static int cmd_add_wl(struct btdev *dev, const void *data, uint8_t len) return 0; } -static int cmd_remove_wl(struct btdev *dev, const void *data, uint8_t len) +static int cmd_remove_al(struct btdev *dev, const void *data, uint8_t len) { const struct bt_hci_cmd_le_remove_from_accept_list *cmd = data; uint8_t status; @@ -3694,37 +3694,37 @@ static int cmd_remove_wl(struct btdev *dev, const void *data, uint8_t len) char addr[18]; /* This command shall not be used when: - * • any advertising filter policy uses the White List and advertising + * • any advertising filter policy uses the Accept List and advertising * is enabled, - * • the scanning filter policy uses the White List and scanning is + * • the scanning filter policy uses the Accept List and scanning is * enabled, or - * • the initiator filter policy uses the White List and an + * • the initiator filter policy uses the Accept List and an * HCI_LE_Create_Connection or HCI_LE_Extended_Create_Connection * command is outstanding. */ - if (!wl_can_change(dev)) + if (!al_can_change(dev)) return -EPERM; /* Valid range for address type is 0x00 to 0x01 */ if (cmd->addr_type > 0x01) return -EINVAL; - for (i = 0; i < WL_SIZE; i++) { - struct btdev_wl *wl = &dev->le_wl[i]; + for (i = 0; i < AL_SIZE; i++) { + struct btdev_al *al = &dev->le_al[i]; - ba2str(&wl->addr, addr); + ba2str(&al->addr, addr); util_debug(dev->debug_callback, dev->debug_data, - "type 0x%02x addr %s", dev->le_wl[i].type, + "type 0x%02x addr %s", dev->le_al[i].type, addr); - if (WL_ADDR_EQUAL(wl, cmd->addr_type, &cmd->addr)) { - wl_reset(wl); + if (AL_ADDR_EQUAL(al, cmd->addr_type, &cmd->addr)) { + al_reset(al); break; } } - if (i == WL_SIZE) + if (i == AL_SIZE) return -EINVAL; status = BT_HCI_ERR_SUCCESS; @@ -4313,10 +4313,10 @@ static int cmd_gen_dhkey(struct btdev *dev, const void *data, uint8_t len) cmd_set_scan_enable_complete), \ CMD(BT_HCI_CMD_LE_CREATE_CONN, cmd_le_create_conn, \ cmd_le_create_conn_complete), \ - CMD(BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE, cmd_read_wl_size, NULL), \ - CMD(BT_HCI_CMD_LE_CLEAR_ACCEPT_LIST, cmd_wl_clear, NULL), \ - CMD(BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST, cmd_add_wl, NULL), \ - CMD(BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST, cmd_remove_wl, NULL), \ + CMD(BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE, cmd_read_al_size, NULL), \ + CMD(BT_HCI_CMD_LE_CLEAR_ACCEPT_LIST, cmd_al_clear, NULL), \ + CMD(BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST, cmd_add_al, NULL), \ + CMD(BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST, cmd_remove_al, NULL), \ CMD(BT_HCI_CMD_LE_CONN_UPDATE, cmd_conn_update, \ cmd_conn_update_complete), \ CMD(BT_HCI_CMD_LE_READ_REMOTE_FEATURES, cmd_le_read_remote_features, \ @@ -5887,10 +5887,10 @@ static void set_le_commands(struct btdev *btdev) btdev->commands[26] |= 0x04; /* LE Set Scan Parameters */ btdev->commands[26] |= 0x08; /* LE Set Scan Enable */ btdev->commands[26] |= 0x10; /* LE Create Connection */ - btdev->commands[26] |= 0x40; /* LE Read White List Size */ - btdev->commands[26] |= 0x80; /* LE Clear White List */ - btdev->commands[27] |= 0x01; /* LE Add Device to White List */ - btdev->commands[27] |= 0x02; /* LE Remove Device from White List */ + btdev->commands[26] |= 0x40; /* LE Read Accept List Size */ + btdev->commands[26] |= 0x80; /* LE Clear Accept List */ + btdev->commands[27] |= 0x01; /* LE Add Device to Accept List */ + btdev->commands[27] |= 0x02; /* LE Remove Device from Accept List */ btdev->commands[27] |= 0x04; /* LE Connection Update */ btdev->commands[27] |= 0x20; /* LE Read Remote Used Features */ btdev->commands[27] |= 0x40; /* LE Encrypt */ @@ -6077,13 +6077,13 @@ static void set_bredrle_features(struct btdev *btdev) btdev->features[2] |= 0x08; /* Transparent SCO */ btdev->features[3] |= 0x40; /* RSSI with inquiry results */ btdev->features[3] |= 0x80; /* Extended SCO link */ - btdev->features[4] |= 0x08; /* AFH capable slave */ - btdev->features[4] |= 0x10; /* AFH classification slave */ + btdev->features[4] |= 0x08; /* AFH capable peripheral */ + btdev->features[4] |= 0x10; /* AFH classification peripheral */ btdev->features[4] |= 0x40; /* LE Supported */ btdev->features[5] |= 0x02; /* Sniff subrating */ btdev->features[5] |= 0x04; /* Pause encryption */ - btdev->features[5] |= 0x08; /* AFH capable master */ - btdev->features[5] |= 0x10; /* AFH classification master */ + btdev->features[5] |= 0x08; /* AFH capable central */ + btdev->features[5] |= 0x10; /* AFH classification central */ btdev->features[6] |= 0x01; /* Extended Inquiry Response */ btdev->features[6] |= 0x02; /* Simultaneous LE and BR/EDR */ btdev->features[6] |= 0x08; /* Secure Simple Pairing */ @@ -6113,15 +6113,15 @@ static void set_bredrle_features(struct btdev *btdev) if (btdev->type >= BTDEV_TYPE_BREDRLE52) { btdev->le_features[1] |= 0x20; /* LE PER ADV */ - btdev->le_features[3] |= 0x10; /* LE CIS Master */ - btdev->le_features[3] |= 0x20; /* LE CIS Slave */ + btdev->le_features[3] |= 0x10; /* LE CIS Central */ + btdev->le_features[3] |= 0x20; /* LE CIS Peripheral */ btdev->le_features[3] |= 0x40; /* LE ISO Broadcaster */ btdev->le_features[3] |= 0x80; /* LE Synchronized Receiver */ btdev->le_features[4] |= 0x01; /* LE ISO channels */ } - btdev->feat_page_2[0] |= 0x01; /* CSB - Master Operation */ - btdev->feat_page_2[0] |= 0x02; /* CSB - Slave Operation */ + btdev->feat_page_2[0] |= 0x01; /* CPB - Central Operation */ + btdev->feat_page_2[0] |= 0x02; /* CPB - Peripheral Operation */ btdev->feat_page_2[0] |= 0x04; /* Synchronization Train */ btdev->feat_page_2[0] |= 0x08; /* Synchronization Scan */ btdev->feat_page_2[0] |= 0x10; /* Inquiry Response Notification */ @@ -6139,12 +6139,12 @@ static void set_bredr_features(struct btdev *btdev) btdev->features[1] |= 0x08; /* SCO link */ btdev->features[3] |= 0x40; /* RSSI with inquiry results */ btdev->features[3] |= 0x80; /* Extended SCO link */ - btdev->features[4] |= 0x08; /* AFH capable slave */ - btdev->features[4] |= 0x10; /* AFH classification slave */ + btdev->features[4] |= 0x08; /* AFH capable peripheral */ + btdev->features[4] |= 0x10; /* AFH classification peripheral */ btdev->features[5] |= 0x02; /* Sniff subrating */ btdev->features[5] |= 0x04; /* Pause encryption */ - btdev->features[5] |= 0x08; /* AFH capable master */ - btdev->features[5] |= 0x10; /* AFH classification master */ + btdev->features[5] |= 0x08; /* AFH capable central */ + btdev->features[5] |= 0x10; /* AFH classification central */ btdev->features[6] |= 0x01; /* Extended Inquiry Response */ btdev->features[6] |= 0x08; /* Secure Simple Pairing */ btdev->features[6] |= 0x10; /* Encapsulated PDU */ @@ -6165,12 +6165,12 @@ static void set_bredr20_features(struct btdev *btdev) btdev->features[1] |= 0x08; /* SCO link */ btdev->features[3] |= 0x40; /* RSSI with inquiry results */ btdev->features[3] |= 0x80; /* Extended SCO link */ - btdev->features[4] |= 0x08; /* AFH capable slave */ - btdev->features[4] |= 0x10; /* AFH classification slave */ + btdev->features[4] |= 0x08; /* AFH capable peripheral */ + btdev->features[4] |= 0x10; /* AFH classification peripheral */ btdev->features[5] |= 0x02; /* Sniff subrating */ btdev->features[5] |= 0x04; /* Pause encryption */ - btdev->features[5] |= 0x08; /* AFH capable master */ - btdev->features[5] |= 0x10; /* AFH classification master */ + btdev->features[5] |= 0x08; /* AFH capable central */ + btdev->features[5] |= 0x10; /* AFH classification central */ btdev->features[7] |= 0x80; /* Extended features */ btdev->max_page = 1; @@ -6185,7 +6185,7 @@ static void set_le_features(struct btdev *btdev) btdev->le_features[0] |= 0x01; /* LE Encryption */ btdev->le_features[0] |= 0x02; /* Connection Parameters Request */ - btdev->le_features[0] |= 0x08; /* Slave-initiated Features Exchange */ + btdev->le_features[0] |= 0x08; /* Peripheral-initiated Features Exchange */ } static void set_le_states(struct btdev *btdev) @@ -6198,7 +6198,7 @@ static void set_le_states(struct btdev *btdev) btdev->le_states[4] = 0xff; btdev->le_states[5] = 0x03; - wl_clear(btdev); + al_clear(btdev); rl_clear(btdev); btdev->le_rl_enable = 0x00; btdev->le_rl_timeout = 0x0384; /* 900 secs or 15 minutes */ diff --git a/emulator/hciemu.c b/emulator/hciemu.c index fe5ef747a2..bd6bf1e631 100644 --- a/emulator/hciemu.c +++ b/emulator/hciemu.c @@ -84,7 +84,7 @@ static void run_command_hook(void *data, void *user_data) run_data->len, hook->user_data); } -static void master_command_callback(uint16_t opcode, +static void central_command_callback(uint16_t opcode, const void *data, uint8_t len, btdev_callback callback, void *user_data) { @@ -230,7 +230,7 @@ static bool create_vhci(struct hciemu *hciemu) if (!btdev) return false; - btdev_set_command_handler(btdev, master_command_callback, hciemu); + btdev_set_command_handler(btdev, central_command_callback, hciemu); fd = open("/dev/vhci", O_RDWR | O_NONBLOCK | O_CLOEXEC); if (fd < 0) { @@ -462,7 +462,7 @@ static void bthost_print(const char *str, void *user_data) "bthost: %s", str); } -static void btdev_master_debug(const char *str, void *user_data) +static void btdev_central_debug(const char *str, void *user_data) { struct hciemu *hciemu = user_data; @@ -500,7 +500,7 @@ bool hciemu_set_debug(struct hciemu *hciemu, hciemu_debug_func_t callback, hciemu->debug_destroy = destroy; hciemu->debug_data = user_data; - btdev_set_debug(hciemu->dev, btdev_master_debug, hciemu, NULL); + btdev_set_debug(hciemu->dev, btdev_central_debug, hciemu, NULL); queue_foreach(hciemu->clients, hciemu_client_set_debug, hciemu); @@ -528,7 +528,7 @@ uint8_t *hciemu_get_features(struct hciemu *hciemu) return btdev_get_features(hciemu->dev); } -const uint8_t *hciemu_get_master_bdaddr(struct hciemu *hciemu) +const uint8_t *hciemu_get_central_bdaddr(struct hciemu *hciemu) { if (!hciemu || !hciemu->dev) return NULL; @@ -556,7 +556,7 @@ const uint8_t *hciemu_get_client_bdaddr(struct hciemu *hciemu) return hciemu_client_bdaddr(client); } -uint8_t hciemu_get_master_scan_enable(struct hciemu *hciemu) +uint8_t hciemu_get_central_scan_enable(struct hciemu *hciemu) { if (!hciemu || !hciemu->dev) return 0; @@ -564,7 +564,7 @@ uint8_t hciemu_get_master_scan_enable(struct hciemu *hciemu) return btdev_get_scan_enable(hciemu->dev); } -uint8_t hciemu_get_master_le_scan_enable(struct hciemu *hciemu) +uint8_t hciemu_get_central_le_scan_enable(struct hciemu *hciemu) { if (!hciemu || !hciemu->dev) return 0; @@ -572,7 +572,8 @@ uint8_t hciemu_get_master_le_scan_enable(struct hciemu *hciemu) return btdev_get_le_scan_enable(hciemu->dev); } -void hciemu_set_master_le_states(struct hciemu *hciemu, const uint8_t *le_states) +void hciemu_set_central_le_states(struct hciemu *hciemu, + const uint8_t *le_states) { if (!hciemu || !hciemu->dev) return; @@ -580,7 +581,7 @@ void hciemu_set_master_le_states(struct hciemu *hciemu, const uint8_t *le_states btdev_set_le_states(hciemu->dev, le_states); } -bool hciemu_add_master_post_command_hook(struct hciemu *hciemu, +bool hciemu_add_central_post_command_hook(struct hciemu *hciemu, hciemu_command_func_t function, void *user_data) { struct hciemu_command_hook *hook; @@ -603,7 +604,7 @@ bool hciemu_add_master_post_command_hook(struct hciemu *hciemu, return true; } -bool hciemu_clear_master_post_command_hooks(struct hciemu *hciemu) +bool hciemu_clear_central_post_command_hooks(struct hciemu *hciemu) { if (!hciemu) return false; diff --git a/emulator/hciemu.h b/emulator/hciemu.h index 8bf2d070ea..3d3d93b4b0 100644 --- a/emulator/hciemu.h +++ b/emulator/hciemu.h @@ -50,14 +50,14 @@ struct bthost *hciemu_client_get_host(struct hciemu *hciemu); const char *hciemu_get_address(struct hciemu *hciemu); uint8_t *hciemu_get_features(struct hciemu *hciemu); -const uint8_t *hciemu_get_master_bdaddr(struct hciemu *hciemu); +const uint8_t *hciemu_get_central_bdaddr(struct hciemu *hciemu); const uint8_t *hciemu_get_client_bdaddr(struct hciemu *hciemu); -uint8_t hciemu_get_master_scan_enable(struct hciemu *hciemu); +uint8_t hciemu_get_central_scan_enable(struct hciemu *hciemu); -uint8_t hciemu_get_master_le_scan_enable(struct hciemu *hciemu); +uint8_t hciemu_get_central_le_scan_enable(struct hciemu *hciemu); -void hciemu_set_master_le_states(struct hciemu *hciemu, +void hciemu_set_central_le_states(struct hciemu *hciemu, const uint8_t *le_states); typedef void (*hciemu_command_func_t)(uint16_t opcode, const void *data, @@ -66,10 +66,10 @@ typedef void (*hciemu_command_func_t)(uint16_t opcode, const void *data, typedef bool (*hciemu_hook_func_t)(const void *data, uint16_t len, void *user_data); -bool hciemu_add_master_post_command_hook(struct hciemu *hciemu, +bool hciemu_add_central_post_command_hook(struct hciemu *hciemu, hciemu_command_func_t function, void *user_data); -bool hciemu_clear_master_post_command_hooks(struct hciemu *hciemu); +bool hciemu_clear_central_post_command_hooks(struct hciemu *hciemu); int hciemu_add_hook(struct hciemu *hciemu, enum hciemu_hook_type type, uint16_t opcode, hciemu_hook_func_t function, diff --git a/emulator/le.c b/emulator/le.c index 23f2579426..0735b81e6e 100644 --- a/emulator/le.c +++ b/emulator/le.c @@ -34,7 +34,7 @@ #include "phy.h" #include "le.h" -#define WHITE_LIST_SIZE 16 +#define ACCEPT_LIST_SIZE 16 #define RESOLV_LIST_SIZE 16 #define SCAN_CACHE_SIZE 64 @@ -102,8 +102,8 @@ struct bt_le { uint8_t le_conn_own_addr_type; uint8_t le_conn_enable; - uint8_t le_white_list_size; - uint8_t le_white_list[WHITE_LIST_SIZE][7]; + uint8_t le_accept_list_size; + uint8_t le_accept_list[ACCEPT_LIST_SIZE][7]; uint8_t le_states[8]; uint16_t le_default_tx_len; @@ -122,27 +122,27 @@ struct bt_le { uint8_t scan_cache_count; }; -static bool is_in_white_list(struct bt_le *hci, uint8_t addr_type, +static bool is_in_accept_list(struct bt_le *hci, uint8_t addr_type, const uint8_t addr[6]) { int i; - for (i = 0; i < hci->le_white_list_size; i++) { - if (hci->le_white_list[i][0] == addr_type && - !memcmp(&hci->le_white_list[i][1], addr, 6)) + for (i = 0; i < hci->le_accept_list_size; i++) { + if (hci->le_accept_list[i][0] == addr_type && + !memcmp(&hci->le_accept_list[i][1], addr, 6)) return true; } return false; } -static void clear_white_list(struct bt_le *hci) +static void clear_accept_list(struct bt_le *hci) { int i; - for (i = 0; i < hci->le_white_list_size; i++) { - hci->le_white_list[i][0] = 0xff; - memset(&hci->le_white_list[i][1], 0, 6); + for (i = 0; i < hci->le_accept_list_size; i++) { + hci->le_accept_list[i][0] = 0xff; + memset(&hci->le_accept_list[i][1], 0, 6); } } @@ -243,10 +243,10 @@ static void reset_defaults(struct bt_le *hci) hci->commands[26] |= 0x08; /* LE Set Scan Enable */ hci->commands[26] |= 0x10; /* LE Create Connection */ hci->commands[26] |= 0x20; /* LE Create Connection Cancel */ - hci->commands[26] |= 0x40; /* LE Read White List Size */ - hci->commands[26] |= 0x80; /* LE Clear White List */ - hci->commands[27] |= 0x01; /* LE Add Device To White List */ - hci->commands[27] |= 0x02; /* LE Remove Device From White List */ + hci->commands[26] |= 0x40; /* LE Read Accept List Size */ + hci->commands[26] |= 0x80; /* LE Clear Accept List */ + hci->commands[27] |= 0x01; /* LE Add Device To Accept List */ + hci->commands[27] |= 0x02; /* LE Remove Device From Accept List */ //hci->commands[27] |= 0x04; /* LE Connection Update */ //hci->commands[27] |= 0x08; /* LE Set Host Channel Classification */ //hci->commands[27] |= 0x10; /* LE Read Channel Map */ @@ -343,7 +343,7 @@ static void reset_defaults(struct bt_le *hci) hci->le_features[0] |= 0x01; /* LE Encryption */ //hci->le_features[0] |= 0x02; /* Connection Parameter Request Procedure */ //hci->le_features[0] |= 0x04; /* Extended Reject Indication */ - //hci->le_features[0] |= 0x08; /* Slave-initiated Features Exchange */ + //hci->le_features[0] |= 0x08; /* Peripheral-initiated Features Exchange */ hci->le_features[0] |= 0x10; /* LE Ping */ hci->le_features[0] |= 0x20; /* LE Data Packet Length Extension */ hci->le_features[0] |= 0x40; /* LL Privacy */ @@ -389,8 +389,8 @@ static void reset_defaults(struct bt_le *hci) hci->le_conn_enable = 0x00; - hci->le_white_list_size = WHITE_LIST_SIZE; - clear_white_list(hci); + hci->le_accept_list_size = ACCEPT_LIST_SIZE; + clear_accept_list(hci); memset(hci->le_states, 0, sizeof(hci->le_states)); hci->le_states[0] |= 0x01; /* Non-connectable Advertising */ @@ -399,8 +399,8 @@ static void reset_defaults(struct bt_le *hci) hci->le_states[0] |= 0x08; /* High Duty Cycle Directed Advertising */ hci->le_states[0] |= 0x10; /* Passive Scanning */ hci->le_states[0] |= 0x20; /* Active Scanning */ - hci->le_states[0] |= 0x40; /* Initiating + Connection (Master Role) */ - hci->le_states[0] |= 0x80; /* Connection (Slave Role) */ + hci->le_states[0] |= 0x40; /* Initiating + Connection (Central Role) */ + hci->le_states[0] |= 0x80; /* Connection (Peripheral Role) */ hci->le_states[1] |= 0x01; /* Passive Scanning + * Non-connectable Advertising */ @@ -1208,31 +1208,31 @@ static void cmd_le_create_conn_cancel(struct bt_le *hci, &evt, sizeof(evt)); } -static void cmd_le_read_white_list_size(struct bt_le *hci, +static void cmd_le_read_accept_list_size(struct bt_le *hci, const void *data, uint8_t size) { struct bt_hci_rsp_le_read_accept_list_size rsp; rsp.status = BT_HCI_ERR_SUCCESS; - rsp.size = hci->le_white_list_size; + rsp.size = hci->le_accept_list_size; cmd_complete(hci, BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE, &rsp, sizeof(rsp)); } -static void cmd_le_clear_white_list(struct bt_le *hci, +static void cmd_le_clear_accept_list(struct bt_le *hci, const void *data, uint8_t size) { uint8_t status; - clear_white_list(hci); + clear_accept_list(hci); status = BT_HCI_ERR_SUCCESS; cmd_complete(hci, BT_HCI_CMD_LE_CLEAR_ACCEPT_LIST, &status, sizeof(status)); } -static void cmd_le_add_to_white_list(struct bt_le *hci, +static void cmd_le_add_to_accept_list(struct bt_le *hci, const void *data, uint8_t size) { const struct bt_hci_cmd_le_add_to_accept_list *cmd = data; @@ -1247,13 +1247,13 @@ static void cmd_le_add_to_white_list(struct bt_le *hci, return; } - for (i = 0; i < hci->le_white_list_size; i++) { - if (hci->le_white_list[i][0] == cmd->addr_type && - !memcmp(&hci->le_white_list[i][1], + for (i = 0; i < hci->le_accept_list_size; i++) { + if (hci->le_accept_list[i][0] == cmd->addr_type && + !memcmp(&hci->le_accept_list[i][1], cmd->addr, 6)) { exists = true; break; - } else if (pos < 0 && hci->le_white_list[i][0] == 0xff) + } else if (pos < 0 && hci->le_accept_list[i][0] == 0xff) pos = i; } @@ -1269,15 +1269,15 @@ static void cmd_le_add_to_white_list(struct bt_le *hci, return; } - hci->le_white_list[pos][0] = cmd->addr_type; - memcpy(&hci->le_white_list[pos][1], cmd->addr, 6); + hci->le_accept_list[pos][0] = cmd->addr_type; + memcpy(&hci->le_accept_list[pos][1], cmd->addr, 6); status = BT_HCI_ERR_SUCCESS; cmd_complete(hci, BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST, &status, sizeof(status)); } -static void cmd_le_remove_from_white_list(struct bt_le *hci, +static void cmd_le_remove_from_accept_list(struct bt_le *hci, const void *data, uint8_t size) { const struct bt_hci_cmd_le_remove_from_accept_list *cmd = data; @@ -1291,9 +1291,9 @@ static void cmd_le_remove_from_white_list(struct bt_le *hci, return; } - for (i = 0; i < hci->le_white_list_size; i++) { - if (hci->le_white_list[i][0] == cmd->addr_type && - !memcmp(&hci->le_white_list[i][1], + for (i = 0; i < hci->le_accept_list_size; i++) { + if (hci->le_accept_list[i][0] == cmd->addr_type && + !memcmp(&hci->le_accept_list[i][1], cmd->addr, 6)) { pos = i; break; @@ -1306,8 +1306,8 @@ static void cmd_le_remove_from_white_list(struct bt_le *hci, return; } - hci->le_white_list[pos][0] = 0xff; - memset(&hci->le_white_list[pos][1], 0, 6); + hci->le_accept_list[pos][0] = 0xff; + memset(&hci->le_accept_list[pos][1], 0, 6); status = BT_HCI_ERR_SUCCESS; cmd_complete(hci, BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST, @@ -1831,13 +1831,13 @@ static const struct { { BT_HCI_CMD_LE_CREATE_CONN_CANCEL, cmd_le_create_conn_cancel, 0, true }, { BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE, - cmd_le_read_white_list_size, 0, true }, + cmd_le_read_accept_list_size, 0, true }, { BT_HCI_CMD_LE_CLEAR_ACCEPT_LIST, - cmd_le_clear_white_list, 0, true }, + cmd_le_clear_accept_list, 0, true }, { BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST, - cmd_le_add_to_white_list, 7, true }, + cmd_le_add_to_accept_list, 7, true }, { BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST, - cmd_le_remove_from_white_list, 7, true }, + cmd_le_remove_from_accept_list, 7, true }, { BT_HCI_CMD_LE_ENCRYPT, cmd_le_encrypt, 32, true }, { BT_HCI_CMD_LE_RAND, cmd_le_rand, 0, true }, @@ -1963,7 +1963,7 @@ static void phy_recv_callback(uint16_t type, const void *data, if (hci->le_scan_filter_policy == 0x01 || hci->le_scan_filter_policy == 0x03) { - if (!is_in_white_list(hci, tx_addr_type, + if (!is_in_accept_list(hci, tx_addr_type, tx_addr)) break; } diff --git a/emulator/serial.c b/emulator/serial.c index b44af0dcce..c9e6d7cd67 100644 --- a/emulator/serial.c +++ b/emulator/serial.c @@ -151,19 +151,19 @@ static void open_pty(struct serial *serial) serial->fd = posix_openpt(O_RDWR | O_NOCTTY); if (serial->fd < 0) { - perror("Failed to get master pseudo terminal"); + perror("Failed to get central pseudo terminal"); return; } if (grantpt(serial->fd) < 0) { - perror("Failed to grant slave pseudo terminal"); + perror("Failed to grant peripheral pseudo terminal"); close(serial->fd); serial->fd = -1; return; } if (unlockpt(serial->fd) < 0) { - perror("Failed to unlock slave pseudo terminal"); + perror("Failed to unlock peripheral pseudo terminal"); close(serial->fd); serial->fd = -1; return; diff --git a/tools/l2cap-tester.c b/tools/l2cap-tester.c index 11d549f22a..169a989f54 100644 --- a/tools/l2cap-tester.c +++ b/tools/l2cap-tester.c @@ -1116,7 +1116,7 @@ static int create_l2cap_sock(struct test_data *data, uint16_t psm, return err; } - master_bdaddr = hciemu_get_master_bdaddr(data->hciemu); + master_bdaddr = hciemu_get_central_bdaddr(data->hciemu); if (!master_bdaddr) { tester_warn("No master bdaddr"); close(sk); @@ -1301,7 +1301,7 @@ static void test_connect(const void *test_data) } if (l2data->direct_advertising) - hciemu_add_master_post_command_hook(data->hciemu, + hciemu_add_central_post_command_hook(data->hciemu, direct_adv_cmd_complete, NULL); sk = create_l2cap_sock(data, 0, l2data->cid, l2data->sec_level, @@ -1419,7 +1419,7 @@ static gboolean test_close_socket_1_part_3(gpointer arg) return FALSE; } - if (hciemu_get_master_le_scan_enable(data->hciemu)) { + if (hciemu_get_central_le_scan_enable(data->hciemu)) { tester_print("Delayed check whether scann is off failed"); tester_test_failed(); return FALSE; @@ -1440,7 +1440,7 @@ static gboolean test_close_socket_1_part_2(gpointer args) * was added to kernel whitelist, and scan was started. We * should be still scanning. */ - if (!hciemu_get_master_le_scan_enable(data->hciemu)) { + if (!hciemu_get_central_le_scan_enable(data->hciemu)) { tester_print("Error - should be still scanning"); tester_test_failed(); return FALSE; @@ -1467,7 +1467,7 @@ static gboolean test_close_socket_2_part_3(gpointer arg) int err; /* Scan should be already over, we're trying to create connection */ - if (hciemu_get_master_le_scan_enable(data->hciemu)) { + if (hciemu_get_central_le_scan_enable(data->hciemu)) { tester_print("Error - should no longer scan"); tester_test_failed(); return FALSE; @@ -1563,7 +1563,7 @@ static void test_close_socket(const void *test_data) const struct l2cap_data *l2data = data->test_data; const uint8_t *client_bdaddr; - hciemu_add_master_post_command_hook(data->hciemu, + hciemu_add_central_post_command_hook(data->hciemu, test_close_socket_router, data); if (l2data->client_bdaddr != NULL) @@ -1668,7 +1668,7 @@ static void test_connect_2(const void *test_data) test_2_connect_cb_cnt = 0; test_scan_enable_counter = 0; - hciemu_add_master_post_command_hook(data->hciemu, + hciemu_add_central_post_command_hook(data->hciemu, test_connect_2_router, data); if (l2data->server_psm) { @@ -1869,7 +1869,7 @@ static void test_server(const void *test_data) tester_print("Listening for connections"); } - master_bdaddr = hciemu_get_master_bdaddr(data->hciemu); + master_bdaddr = hciemu_get_central_bdaddr(data->hciemu); if (!master_bdaddr) { tester_warn("No master bdaddr"); tester_test_failed(); diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index ccc082a488..dc53faf3af 100644 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -365,7 +365,7 @@ static void read_index_list_callback(uint8_t status, uint16_t length, hciemu_set_debug(data->hciemu, print_debug, "hciemu: ", NULL); if (test && test->setup_le_states) - hciemu_set_master_le_states(data->hciemu, test->le_states); + hciemu_set_central_le_states(data->hciemu, test->le_states); } static void test_pre_setup(const void *test_data) @@ -7136,7 +7136,7 @@ static void command_setup_hci_callback(uint16_t opcode, const void *param, return; } - hciemu_clear_master_post_command_hooks(data->hciemu); + hciemu_clear_central_post_command_hooks(data->hciemu); test_setup_condition_complete(data); } @@ -7202,7 +7202,7 @@ static void setup_command_generic(const void *test_data) tester_print("Registering setup expected HCI command callback"); tester_print("Setup expected HCI command 0x%04x", test->setup_expect_hci_command); - hciemu_add_master_post_command_hook(data->hciemu, + hciemu_add_central_post_command_hook(data->hciemu, command_setup_hci_callback, data); test_add_setup_condition(data); } @@ -9529,7 +9529,7 @@ static void setup_ll_privacy_device(const void *test_data) tester_print("Setup expected HCI command 0x%04x", test->setup_expect_hci_command); - hciemu_add_master_post_command_hook(data->hciemu, + hciemu_add_central_post_command_hook(data->hciemu, command_setup_hci_callback, data); test_add_setup_condition(data); @@ -9686,7 +9686,7 @@ static void test_command_generic(const void *test_data) if (test->expect_hci_command) { tester_print("Registering HCI command callback"); - hciemu_add_master_post_command_hook(data->hciemu, + hciemu_add_central_post_command_hook(data->hciemu, command_hci_callback, data); test_add_condition(data); } @@ -9720,13 +9720,13 @@ static void check_scan(void *user_data) { struct test_data *data = tester_get_data(); - if (hciemu_get_master_le_scan_enable(data->hciemu)) { + if (hciemu_get_central_le_scan_enable(data->hciemu)) { tester_warn("LE scan still enabled"); tester_test_failed(); return; } - if (hciemu_get_master_scan_enable(data->hciemu)) { + if (hciemu_get_central_scan_enable(data->hciemu)) { tester_warn("BR/EDR scan still enabled"); tester_test_failed(); return; @@ -9817,7 +9817,7 @@ static void test_pairing_acceptor(const void *test_data) test_add_condition(data); } - master_bdaddr = hciemu_get_master_bdaddr(data->hciemu); + master_bdaddr = hciemu_get_central_bdaddr(data->hciemu); if (!master_bdaddr) { tester_warn("No master bdaddr"); tester_test_failed(); @@ -9882,7 +9882,7 @@ static void test_command_generic_connect(const void *test_data) data->mgmt_alt_ev_id = id; test_add_condition(data); - master_bdaddr = hciemu_get_master_bdaddr(data->hciemu); + master_bdaddr = hciemu_get_central_bdaddr(data->hciemu); if (!master_bdaddr) { tester_warn("No master bdaddr"); tester_test_failed(); @@ -9961,7 +9961,7 @@ static void add_device_callback(uint8_t status, uint16_t len, const void *param, if (test->client_enable_adv) return; - master_bdaddr = hciemu_get_master_bdaddr(data->hciemu); + master_bdaddr = hciemu_get_central_bdaddr(data->hciemu); if (!master_bdaddr) { tester_warn("No master bdaddr"); tester_test_failed(); diff --git a/tools/rfcomm-tester.c b/tools/rfcomm-tester.c index 9bae5b9d54..78b08663bd 100644 --- a/tools/rfcomm-tester.c +++ b/tools/rfcomm-tester.c @@ -542,7 +542,7 @@ static void test_connect(const void *test_data) bthost_add_rfcomm_server(bthost, cli->server_channel, rfcomm_connect_cb, NULL); - master_addr = hciemu_get_master_bdaddr(data->hciemu); + master_addr = hciemu_get_central_bdaddr(data->hciemu); client_addr = hciemu_get_client_bdaddr(data->hciemu); sk = create_rfcomm_sock((bdaddr_t *) master_addr, 0); @@ -680,7 +680,7 @@ static void test_server(const void *test_data) GIOChannel *io; int sk; - master_addr = hciemu_get_master_bdaddr(data->hciemu); + master_addr = hciemu_get_central_bdaddr(data->hciemu); sk = create_rfcomm_sock((bdaddr_t *) master_addr, srv->server_channel); if (sk < 0) { diff --git a/tools/sco-tester.c b/tools/sco-tester.c index 2b8dc0d4a8..7c83aee195 100644 --- a/tools/sco-tester.c +++ b/tools/sco-tester.c @@ -426,7 +426,7 @@ static int create_sco_sock(struct test_data *data) return err; } - master_bdaddr = hciemu_get_master_bdaddr(data->hciemu); + master_bdaddr = hciemu_get_central_bdaddr(data->hciemu); if (!master_bdaddr) { tester_warn("No master bdaddr"); return -ENODEV; diff --git a/tools/smp-tester.c b/tools/smp-tester.c index 644c451c29..b075c5df8a 100644 --- a/tools/smp-tester.c +++ b/tools/smp-tester.c @@ -767,7 +767,7 @@ static void init_bdaddr(struct test_data *data) { const uint8_t *master_bdaddr, *client_bdaddr; - master_bdaddr = hciemu_get_master_bdaddr(data->hciemu); + master_bdaddr = hciemu_get_central_bdaddr(data->hciemu); if (!master_bdaddr) { tester_warn("No master bdaddr"); tester_test_failed(); @@ -808,7 +808,7 @@ static void test_client(const void *test_data) if (smp->expect_hci_command) { tester_print("Registering HCI command callback"); - hciemu_add_master_post_command_hook(data->hciemu, + hciemu_add_central_post_command_hook(data->hciemu, command_hci_callback, data); test_add_condition(data); } @@ -889,7 +889,7 @@ static void test_server(const void *test_data) if (smp->expect_hci_command) { tester_print("Registering HCI command callback"); - hciemu_add_master_post_command_hook(data->hciemu, + hciemu_add_central_post_command_hook(data->hciemu, command_hci_callback, data); test_add_condition(data); } From patchwork Thu Sep 2 04:07:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 505822 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.5 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY, USER_AGENT_GIT, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4739C4320A for ; Thu, 2 Sep 2021 04:08:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B4EE760EE6 for ; Thu, 2 Sep 2021 04:08:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230280AbhIBEI7 (ORCPT ); Thu, 2 Sep 2021 00:08:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229827AbhIBEI7 (ORCPT ); Thu, 2 Sep 2021 00:08:59 -0400 Received: from mail-pf1-x449.google.com (mail-pf1-x449.google.com [IPv6:2607:f8b0:4864:20::449]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F966C061575 for ; Wed, 1 Sep 2021 21:08:01 -0700 (PDT) Received: by mail-pf1-x449.google.com with SMTP id c7-20020aa788070000b029035630a4b35dso460500pfo.9 for ; Wed, 01 Sep 2021 21:08:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=wdenUEJENVIVipxrbo4b1ygCInnbwIE19qxWHQENdgM=; b=AKKpKsauIvERIq65NY8/swtj8kiD1w0ReXxp3yA45Lx37sWbmL6tBKM6A6pnVslycg TBbPYM/YiBPBelV8/tc8E7wf816rl0zBM2+NrlkwIEbClbExaNWTlMu+f1rAVZYallXs 0AvatB4ijMUBrLQvkUmzRIN9Bi9d9pwxVDbPJ8rUWXd0OvUlBB/1XuuHMEKWhwdRO16f Cam+3s/s6YSizVglDIPlTB2w4vqsr6R6gjVHdqKcWonbRQsQyUylB0+Xj/5muY1qahBk iIYdGumE4WkgOk0xeugaXWtLLSqY1MjLNt/2so3C76/P5jL4pD7naBXeSpeDqZVvYtvv MxDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=wdenUEJENVIVipxrbo4b1ygCInnbwIE19qxWHQENdgM=; b=dmTFtMLfbqOhnPIY3S8qh78G3Rj9It2CR/Ne+4LuNzGkPSTsex8Zf0oZQWH1Mdp86k sVosgKLbI6gHBaPREMI+gPIQhArKmnyAaoLD5k+SnhQMGb5wbrBaAEK4f9lmcMeZ5gls 4Uk37tYfPGuqSaSwvRtzUM8maYLuhqMwIBEipm/1nCSy59x5kydpOGtSXZqw+HWbXz1P vMZQIT+1ns8hPERPcZlTLEP+CIUlzH/YXCMqGJWvVInY9nJlF8Fp/lHV91vuGMFFOchF RTxZ6fHfS1WunReWYy/af9QNBZvIprwO/h1VOreRT/A0NlHv+XGIxZoHMl5A575N7xKN PBlg== X-Gm-Message-State: AOAM530GZpiNWPd57bLqiE/c5BULQ6DvNXaL+5LOU+uXwDIL6zYFTAFk XYADrnLaiYiSJjuAwlbFArx+O+IwUM2INjbe5qJ7Nn/dzxzIs8ubirbU9iX/98PY2VuUfcrat9S +IdbXMZCHXdIZVRE/HB9UMDR8rGY1o5yuCKUuAcT59dYe2KhObCSpxxLm5DFJtx0W+tvsZroR/l Rs X-Google-Smtp-Source: ABdhPJwwZhjpqjvP6BxrsVB2t/l3FgItwvQxrgrsqp2kLROMQiBrfXMhYOz5Nlmqj2MZM9pZGOrkYeuUTmAD X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:5249:e81c:3ce6:f50c]) (user=apusaka job=sendgmr) by 2002:a62:1996:0:b0:3f0:947:396d with SMTP id 144-20020a621996000000b003f00947396dmr1371028pfz.75.1630555680929; Wed, 01 Sep 2021 21:08:00 -0700 (PDT) Date: Thu, 2 Sep 2021 12:07:04 +0800 In-Reply-To: <20210902040711.665952-1-apusaka@google.com> Message-Id: <20210902120509.Bluez.v2.6.I0e4236b0928a4359e2f43d0a2ae62e2f20bb3ff4@changeid> Mime-Version: 1.0 References: <20210902040711.665952-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.259.gc128427fd7-goog Subject: [Bluez PATCH v2 06/13] plugins/sixaxis: Inclusive language changes From: Archie Pusaka To: linux-bluetooth , Luiz Augusto von Dentz Cc: CrosBT Upstreaming , Archie Pusaka Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Archie Pusaka BT core spec 5.3 promotes the usage of inclusive languages. This CL uses "central" as it is deemed to be more appropriate. --- (no changes since v1) plugins/sixaxis.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/plugins/sixaxis.c b/plugins/sixaxis.c index 517cecc476..ddecbcccb3 100644 --- a/plugins/sixaxis.c +++ b/plugins/sixaxis.c @@ -139,7 +139,7 @@ static int get_device_bdaddr(int fd, bdaddr_t *bdaddr, CablePairingType type) return -1; } -static int sixaxis_get_master_bdaddr(int fd, bdaddr_t *bdaddr) +static int sixaxis_get_central_bdaddr(int fd, bdaddr_t *bdaddr) { uint8_t buf[8]; int ret; @@ -150,7 +150,7 @@ static int sixaxis_get_master_bdaddr(int fd, bdaddr_t *bdaddr) ret = ioctl(fd, HIDIOCGFEATURE(sizeof(buf)), buf); if (ret < 0) { - error("sixaxis: failed to read master address (%s)", + error("sixaxis: failed to read central address (%s)", strerror(errno)); return ret; } @@ -160,7 +160,7 @@ static int sixaxis_get_master_bdaddr(int fd, bdaddr_t *bdaddr) return 0; } -static int ds4_get_master_bdaddr(int fd, bdaddr_t *bdaddr) +static int ds4_get_central_bdaddr(int fd, bdaddr_t *bdaddr) { uint8_t buf[16]; int ret; @@ -171,7 +171,7 @@ static int ds4_get_master_bdaddr(int fd, bdaddr_t *bdaddr) ret = ioctl(fd, HIDIOCGFEATURE(sizeof(buf)), buf); if (ret < 0) { - error("sixaxis: failed to read DS4 master address (%s)", + error("sixaxis: failed to read DS4 central address (%s)", strerror(errno)); return ret; } @@ -182,16 +182,16 @@ static int ds4_get_master_bdaddr(int fd, bdaddr_t *bdaddr) return 0; } -static int get_master_bdaddr(int fd, bdaddr_t *bdaddr, CablePairingType type) +static int get_central_bdaddr(int fd, bdaddr_t *bdaddr, CablePairingType type) { if (type == CABLE_PAIRING_SIXAXIS) - return sixaxis_get_master_bdaddr(fd, bdaddr); + return sixaxis_get_central_bdaddr(fd, bdaddr); else if (type == CABLE_PAIRING_DS4) - return ds4_get_master_bdaddr(fd, bdaddr); + return ds4_get_central_bdaddr(fd, bdaddr); return -1; } -static int sixaxis_set_master_bdaddr(int fd, const bdaddr_t *bdaddr) +static int sixaxis_set_central_bdaddr(int fd, const bdaddr_t *bdaddr) { uint8_t buf[8]; int ret; @@ -203,13 +203,13 @@ static int sixaxis_set_master_bdaddr(int fd, const bdaddr_t *bdaddr) ret = ioctl(fd, HIDIOCSFEATURE(sizeof(buf)), buf); if (ret < 0) - error("sixaxis: failed to write master address (%s)", + error("sixaxis: failed to write central address (%s)", strerror(errno)); return ret; } -static int ds4_set_master_bdaddr(int fd, const bdaddr_t *bdaddr) +static int ds4_set_central_bdaddr(int fd, const bdaddr_t *bdaddr) { uint8_t buf[23]; int ret; @@ -223,19 +223,19 @@ static int ds4_set_master_bdaddr(int fd, const bdaddr_t *bdaddr) ret = ioctl(fd, HIDIOCSFEATURE(sizeof(buf)), buf); if (ret < 0) - error("sixaxis: failed to write DS4 master address (%s)", + error("sixaxis: failed to write DS4 central address (%s)", strerror(errno)); return ret; } -static int set_master_bdaddr(int fd, const bdaddr_t *bdaddr, +static int set_central_bdaddr(int fd, const bdaddr_t *bdaddr, CablePairingType type) { if (type == CABLE_PAIRING_SIXAXIS) - return sixaxis_set_master_bdaddr(fd, bdaddr); + return sixaxis_set_central_bdaddr(fd, bdaddr); else if (type == CABLE_PAIRING_DS4) - return ds4_set_master_bdaddr(fd, bdaddr); + return ds4_set_central_bdaddr(fd, bdaddr); return -1; } @@ -267,8 +267,8 @@ static void agent_auth_cb(DBusError *derr, void *user_data) { struct authentication_closure *closure = user_data; struct authentication_destroy_closure *destroy; - char master_addr[18], adapter_addr[18], device_addr[18]; - bdaddr_t master_bdaddr; + char central_addr[18], adapter_addr[18], device_addr[18]; + bdaddr_t central_bdaddr; const bdaddr_t *adapter_bdaddr; bool remove_device = true; @@ -283,12 +283,12 @@ static void agent_auth_cb(DBusError *derr, void *user_data) goto out; } - if (get_master_bdaddr(closure->fd, &master_bdaddr, closure->type) < 0) + if (get_central_bdaddr(closure->fd, ¢ral_bdaddr, closure->type) < 0) goto out; adapter_bdaddr = btd_adapter_get_address(closure->adapter); - if (bacmp(adapter_bdaddr, &master_bdaddr)) { - if (set_master_bdaddr(closure->fd, adapter_bdaddr, + if (bacmp(adapter_bdaddr, ¢ral_bdaddr)) { + if (set_central_bdaddr(closure->fd, adapter_bdaddr, closure->type) < 0) goto out; } @@ -302,10 +302,10 @@ static void agent_auth_cb(DBusError *derr, void *user_data) SIXAXIS_HID_SDP_RECORD); ba2str(&closure->bdaddr, device_addr); - ba2str(&master_bdaddr, master_addr); + ba2str(¢ral_bdaddr, central_addr); ba2str(adapter_bdaddr, adapter_addr); - DBG("remote %s old_master %s new_master %s", - device_addr, master_addr, adapter_addr); + DBG("remote %s old_central %s new_central %s", + device_addr, central_addr, adapter_addr); out: g_hash_table_steal(pending_auths, closure->sysfs_path); From patchwork Thu Sep 2 04:07:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 505821 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-21.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A6C5C432BE for ; Thu, 2 Sep 2021 04:08:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 61CC760EE6 for ; Thu, 2 Sep 2021 04:08:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230370AbhIBEJD (ORCPT ); Thu, 2 Sep 2021 00:09:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231152AbhIBEJD (ORCPT ); Thu, 2 Sep 2021 00:09:03 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 773A3C061760 for ; Wed, 1 Sep 2021 21:08:05 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id f8-20020a2585480000b02905937897e3daso932084ybn.2 for ; Wed, 01 Sep 2021 21:08:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=A93ZFvRGofCq3B/sQF0zyV0NETmID4wfdDKEfDQ+hTk=; b=lRofl41TAdGHri4fMFo7JsgTXcjm5hLGoIVf8LX3vZjmQU5++Kk84LJAp5iiJB769Q mHbuSdjM7SqKu7zVIQBtfHt82g95h7OLUv8Vw4/3BiUTv2Uq9RT7kbNOz20M7S2nkDd5 SvPZrpjBmelqwS6hdh0hLW5vNTGuSyMtUuNPwcrCvZdeKk4YT0Rt6BFywDuHZNrwPOl3 6mNx2pTAETtY0a8FbrjgEZtb8o4/xyL9ik274V3QgxC0rppWm4y5bFZtmStiwXAMUqAp zbM4AFc/bZ1672HhNfBthwpWv/PnDlgc1WTSSZMt5D4MlqQNpaFiOTIZsDB2aDvzq2kz FRnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=A93ZFvRGofCq3B/sQF0zyV0NETmID4wfdDKEfDQ+hTk=; b=CZwtVDuDiSo0ns2z5aq3zUG8THIRarUEROxVHDhrkAfAoCH1hyG9ast6d/1Tb1uFxt o+ofiN8PfB17vwfrUBEEYDSsqgNBAsfF9GC9GgF9ULkSeYiKkzzmPqQXtkcxXNXm/52H yco03BSrUNlOLNq0tRgrD69qKM43JKitjH02JobJ7UlB9GwHLmMVImDWEKKbwDRqhyT5 vursK98/gHpmnVULAB2DrpvBY3eqTLlFgF+VEUCGnn45jQOPwJE7r1EMVrz/aZBSyUwI RkE9NktH2wP7KXStvydzRA3DzsywMf/6P4HuD4OKtq9kxyslDxLEyVrekWZOy98Z+45y Bp2Q== X-Gm-Message-State: AOAM5322CP1pV7xFVdWK0TbdppCPADFKYuOo5eMV+9UDdfClgP4QHEO9 UkTZzMmvl9DV0PSZ3EqMDB9gPpO8QZekENpbm3mt5k7h9EcfH3E02zI4nN4LJ7LnD5Wna+gRyZK P59w7F3EHRyvCiixwVeHbtwDHUT7f1oQZqS26SsOPEm0DhdmAxMYRaiZa50eJyJCCGMpT1mBWZU VS X-Google-Smtp-Source: ABdhPJyeKKLEzv8lE9liTTm+qvVnuOlFIEnRfQLxgan/6kHg7kHpmc5reHC1ASRWE21h4AxOayofJO9FrG26 X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:5249:e81c:3ce6:f50c]) (user=apusaka job=sendgmr) by 2002:a25:c647:: with SMTP id k68mr1671517ybf.349.1630555684704; Wed, 01 Sep 2021 21:08:04 -0700 (PDT) Date: Thu, 2 Sep 2021 12:07:05 +0800 In-Reply-To: <20210902040711.665952-1-apusaka@google.com> Message-Id: <20210902120509.Bluez.v2.7.I50be9be1265bc743325cfdb9fa0bdbce9671a304@changeid> Mime-Version: 1.0 References: <20210902040711.665952-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.259.gc128427fd7-goog Subject: [Bluez PATCH v2 07/13] profiles: Inclusive language changes From: Archie Pusaka To: linux-bluetooth , Luiz Augusto von Dentz Cc: CrosBT Upstreaming , Archie Pusaka Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Archie Pusaka BT core spec 5.3 promotes the usage of inclusive languages. This CL replaces some terms with the more appropriate counterparts, such as "central" and "peripheral". --- Changes in v2: * Merging several patches from the same directory into one profiles/audio/avctp.c | 10 +++++----- profiles/audio/avctp.h | 2 +- profiles/health/mcap.c | 20 ++++++++++---------- profiles/health/mcap.h | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c index 9f717f35bb..702ded1366 100644 --- a/profiles/audio/avctp.c +++ b/profiles/audio/avctp.c @@ -1614,7 +1614,7 @@ static void avctp_confirm_cb(GIOChannel *chan, gpointer data) return; } -static GIOChannel *avctp_server_socket(const bdaddr_t *src, gboolean master, +static GIOChannel *avctp_server_socket(const bdaddr_t *src, gboolean central, uint8_t mode, uint16_t psm) { GError *err = NULL; @@ -1625,7 +1625,7 @@ static GIOChannel *avctp_server_socket(const bdaddr_t *src, gboolean master, BT_IO_OPT_SOURCE_BDADDR, src, BT_IO_OPT_PSM, psm, BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_MEDIUM, - BT_IO_OPT_CENTRAL, master, + BT_IO_OPT_CENTRAL, central, BT_IO_OPT_MODE, mode, BT_IO_OPT_INVALID); if (!io) { @@ -1636,20 +1636,20 @@ static GIOChannel *avctp_server_socket(const bdaddr_t *src, gboolean master, return io; } -int avctp_register(struct btd_adapter *adapter, gboolean master) +int avctp_register(struct btd_adapter *adapter, gboolean central) { struct avctp_server *server; const bdaddr_t *src = btd_adapter_get_address(adapter); server = g_new0(struct avctp_server, 1); - server->control_io = avctp_server_socket(src, master, BT_IO_MODE_BASIC, + server->control_io = avctp_server_socket(src, central, BT_IO_MODE_BASIC, AVCTP_CONTROL_PSM); if (!server->control_io) { g_free(server); return -1; } - server->browsing_io = avctp_server_socket(src, master, BT_IO_MODE_ERTM, + server->browsing_io = avctp_server_socket(src, central, BT_IO_MODE_ERTM, AVCTP_BROWSING_PSM); if (!server->browsing_io) { if (server->control_io) { diff --git a/profiles/audio/avctp.h b/profiles/audio/avctp.h index 23e3732cde..ca5ff9126d 100644 --- a/profiles/audio/avctp.h +++ b/profiles/audio/avctp.h @@ -145,7 +145,7 @@ unsigned int avctp_add_state_cb(struct btd_device *dev, avctp_state_cb cb, void *user_data); gboolean avctp_remove_state_cb(unsigned int id); -int avctp_register(struct btd_adapter *adapter, gboolean master); +int avctp_register(struct btd_adapter *adapter, gboolean central); void avctp_unregister(struct btd_adapter *adapter); struct avctp *avctp_connect(struct btd_device *device); diff --git a/profiles/health/mcap.c b/profiles/health/mcap.c index ab05a2bc24..48f825c4ff 100644 --- a/profiles/health/mcap.c +++ b/profiles/health/mcap.c @@ -52,15 +52,15 @@ struct mcap_csp { uint64_t base_tmstamp; /* CSP base timestamp */ struct timespec base_time; /* CSP base time when timestamp set */ - guint local_caps; /* CSP-Master: have got remote caps */ - guint remote_caps; /* CSP-Slave: remote master got caps */ - guint rem_req_acc; /* CSP-Slave: accuracy required by master */ - guint ind_expected; /* CSP-Master: indication expected */ - uint8_t csp_req; /* CSP-Master: Request control flag */ - guint ind_timer; /* CSP-Slave: indication timer */ - guint set_timer; /* CSP-Slave: delayed set timer */ - void *set_data; /* CSP-Slave: delayed set data */ - void *csp_priv_data; /* CSP-Master: In-flight request data */ + guint local_caps; /* CSP-Central: have got remote caps */ + guint remote_caps; /* CSP-Peripheral: remote central got caps */ + guint rem_req_acc; /* CSP-Peripheral: accuracy required by central */ + guint ind_expected; /* CSP-Central: indication expected */ + uint8_t csp_req; /* CSP-Central: Request control flag */ + guint ind_timer; /* CSP-Peripheral: indication timer */ + guint set_timer; /* CSP-Peripheral: delayed set timer */ + void *set_data; /* CSP-Peripheral: delayed set data */ + void *csp_priv_data; /* CSP-Central: In-flight request data */ }; struct mcap_sync_cap_cbdata { @@ -3139,7 +3139,7 @@ void mcap_sync_set_req(struct mcap_mcl *mcl, uint8_t update, uint32_t btclock, g_set_error(err, MCAP_CSP_ERROR, MCAP_ERROR_RESOURCE_UNAVAILABLE, - "Did not get CSP caps from slave yet"); + "Did not get CSP caps from peripheral yet"); return; } diff --git a/profiles/health/mcap.h b/profiles/health/mcap.h index 5a94c8b63b..00f3fa8510 100644 --- a/profiles/health/mcap.h +++ b/profiles/health/mcap.h @@ -270,7 +270,7 @@ struct mcap_instance { mcap_mcl_event_cb mcl_reconnected_cb; /* Old MCL has been reconnected */ mcap_mcl_event_cb mcl_disconnected_cb; /* MCL disconnected */ mcap_mcl_event_cb mcl_uncached_cb; /* MCL has been removed from MCAP cache */ - mcap_info_ind_event_cb mcl_sync_infoind_cb; /* (CSP Master) Received info indication */ + mcap_info_ind_event_cb mcl_sync_infoind_cb; /* (CSP Central) Received info indication */ gpointer user_data; /* Data to be provided in callbacks */ int ref; /* Reference counter */ From patchwork Thu Sep 2 04:07:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 505820 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-21.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 742AEC432BE for ; Thu, 2 Sep 2021 04:08:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 564B860EE6 for ; Thu, 2 Sep 2021 04:08:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230509AbhIBEJW (ORCPT ); Thu, 2 Sep 2021 00:09:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231152AbhIBEJK (ORCPT ); Thu, 2 Sep 2021 00:09:10 -0400 Received: from mail-qt1-x849.google.com (mail-qt1-x849.google.com [IPv6:2607:f8b0:4864:20::849]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB28DC061575 for ; Wed, 1 Sep 2021 21:08:12 -0700 (PDT) Received: by mail-qt1-x849.google.com with SMTP id e3-20020ac80b030000b029028ac1c46c2aso460274qti.2 for ; Wed, 01 Sep 2021 21:08:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=1+Zx0XWf8h4j6Dg1qISGa1tBtRY84aMcPWTfznuCr8I=; b=CFybdlLMaD3DSOZt3wI3UWsu543pjdz/FklP0kz8+gkQ4usW8Dmh9jvIDy90WATqeW 8Qis+oCO5cc5c18dqr3RvmWVaEwXCuNkHf/1c5mL2XlkRxyX3H3TSBmQnfLuMjKgCNOj QT9Jy4RuSOPCROdOJVQi5FVT/zVP/jorAWlm14QtSIMexefgIMHymN2T3EbKFu5AhwZB X9l0bFJvwHkO9O0DnTPDDb/Ts7szXh0SP0vRVD73qoaGTUZD4oYQ/KEq85z2kFxzY+gA RFXMbra2GsBbD4iVJ68WrzsHT6Q+25mzHMJiqnfAXi6upi2f2OLhxbckGqgoVfXGgz+6 rEZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=1+Zx0XWf8h4j6Dg1qISGa1tBtRY84aMcPWTfznuCr8I=; b=bZFrWuSbufhoKVnChoykQ1JQkWR6NcUF62XEE/5fqCN7ir5waME3rLeC9F2ptfjqJ8 W6zXPC2gqMitkMD3QX79X3HjOtXyn2bqNAtUe7oRqq9MZfRwYlttWJNQhdaRA+sOzkTX afLjaZtMvAvZbJoskKBb9kyB/eBl9FqOCtnTNk1SWBuav+kUgFxoLLYUGIWbcC5dEAAw UDazXASCXDVGkB3wuenqw639LsQlq4dufjtl+bl7EeNcYEkIoQTaTQ6n14AEAnpGeyBk VWDiEiX9I/9H3/OLxrvoji2UEQapIQBZzANrUM7Ay6OmkqDmg1Gn+pLM6O+QxEsnggQI S6ig== X-Gm-Message-State: AOAM532NXehDkWg4VyffJK8mUFlp3ohRfbEQjaD3azBPMpq6jvYwoiMq 7q/jffVhoLbeZ7ryB2qJhOKrummcG4be69fXHalvlcTnyFe2XDDXo1r/CQTnRAYcOL798j/x25K c7Re3naYYQwEBsDpZwNhHtKCBXT3nrtQylHC4SEsW+gIuPAHtWE6BFNTPnKSN2wD1iv3Ww6iJEm PQ X-Google-Smtp-Source: ABdhPJx0zTh54hKWzR+Nc/J/SPZy+64qlfd/gy1JXWeMuTae6L4A6vrC8vGuLXvgbNxJRYaGyBm30NHTWiD5 X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:5249:e81c:3ce6:f50c]) (user=apusaka job=sendgmr) by 2002:a05:6214:21cc:: with SMTP id d12mr1071466qvh.22.1630555691967; Wed, 01 Sep 2021 21:08:11 -0700 (PDT) Date: Thu, 2 Sep 2021 12:07:07 +0800 In-Reply-To: <20210902040711.665952-1-apusaka@google.com> Message-Id: <20210902120509.Bluez.v2.9.I222c5f74a0e9d3c7c08c0682494150bdec037dd6@changeid> Mime-Version: 1.0 References: <20210902040711.665952-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.259.gc128427fd7-goog Subject: [Bluez PATCH v2 09/13] client: Inclusive language changes From: Archie Pusaka To: linux-bluetooth , Luiz Augusto von Dentz Cc: CrosBT Upstreaming , Archie Pusaka Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Archie Pusaka Use "parent" to describe dbus hierarchy. --- (no changes since v1) client/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/main.c b/client/main.c index 506602bbdb..b70cf1a186 100644 --- a/client/main.c +++ b/client/main.c @@ -365,19 +365,19 @@ static void print_uuids(GDBusProxy *proxy) } } -static gboolean device_is_child(GDBusProxy *device, GDBusProxy *master) +static gboolean device_is_child(GDBusProxy *device, GDBusProxy *parent) { DBusMessageIter iter; const char *adapter, *path; - if (!master) + if (!parent) return FALSE; if (g_dbus_proxy_get_property(device, "Adapter", &iter) == FALSE) return FALSE; dbus_message_iter_get_basic(&iter, &adapter); - path = g_dbus_proxy_get_path(master); + path = g_dbus_proxy_get_path(parent); if (!strcmp(path, adapter)) return TRUE; From patchwork Thu Sep 2 04:07:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 505818 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-21.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97AE2C432BE for ; Thu, 2 Sep 2021 04:08:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7CD0F60EE6 for ; Thu, 2 Sep 2021 04:08:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231735AbhIBEJZ (ORCPT ); Thu, 2 Sep 2021 00:09:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238450AbhIBEJR (ORCPT ); Thu, 2 Sep 2021 00:09:17 -0400 Received: from mail-qt1-x849.google.com (mail-qt1-x849.google.com [IPv6:2607:f8b0:4864:20::849]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1B33C061575 for ; Wed, 1 Sep 2021 21:08:19 -0700 (PDT) Received: by mail-qt1-x849.google.com with SMTP id o22-20020ac872d60000b029029817302575so442768qtp.10 for ; Wed, 01 Sep 2021 21:08:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=+chwaZbbMAUDVjk5/HeDGz0egFmhkV86cNDd2nRvrXU=; b=Iw4+t7dyWc1w83HaO0bNT5ojih9jfEtlNn3w88/4LXml0vFEZbJQ9ew1bKM1Io4PZa 2eTagJjM9VUrWIhFEfNM/+jrc3n7UuQB8XZ7OtTxC24tcLqKzqP2qzwXnrNb9BsaFuqS 7zUMKq/y7GR+W2n1Be2nFpRkOu0xQ8WYsxqk05AQGQl6ejNK7XVt/I7rl8gDvywyP8xS od1md86/mam6aTU4GmEHHKe1QcDWYv0pteEO1Cc9Kw4i5dOgI+JvBMFdPbODx2U3pj3c upSphe75qWbSx3+Bh2KMo1QuehzJq9qjDe4KbHczWvYoXAPeCOiGKODDbCFHYXzOAkkC V5Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=+chwaZbbMAUDVjk5/HeDGz0egFmhkV86cNDd2nRvrXU=; b=Lx+DtfYU3YVo30nZXDECRfZfesvbpo7PegVGIXInAIwcxo5ajEbADmZbDdcZD3nP02 uGHsKBOM/M6nzByuvfYuvwAEK/GOygAML4m9Jl7epAoFqvwHZ2m9ZKKTwMOEc+F8ADdZ pw3ydIu02/ypdaTo51RQG/GLX97eSfkE1000P9Y2g5ouzICuNnvtgFvgn91ywyEeT7OZ yWgHzZZB1EP8XWMAre05IRyU7y3hLFhjE1XheaVMc9UFxxgJdzziTjOL0gc7ECIeSkUH vdN7qds1+zXHy4d7rwfMtHEmzKRIpeeoSglLFfeQKPG43MhNMKnOgRi490a75P6y2vMq P9WQ== X-Gm-Message-State: AOAM531w28YaDwPLj09ZV9FU3NP9adkOxI3W47PSDf2u0+h7v6xYE3zu 74fVcVjkNZDDKsZOj9jn4Dq9wLZe1Mi1GyCfO1GUVSeW/A/RdCQ6IPrULJmmw4ngq6E4xF3bL9O p2Kp+x2J86OFx6aintsonpeEQtc/7T/eqcBYF8Ns/0Vk8LZz+hgQXQEb+Yd6SzqJCCWsqzCgsxo q7 X-Google-Smtp-Source: ABdhPJxDMAMNZ0+LTKVAzz9btGsCRC1iWkWLe6QbaTHqfbt+Jis7KXG/eiU9a0V3Av0kJ8vW7C8+m0oP/Rut X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:5249:e81c:3ce6:f50c]) (user=apusaka job=sendgmr) by 2002:a05:6214:21cc:: with SMTP id d12mr1071781qvh.22.1630555698852; Wed, 01 Sep 2021 21:08:18 -0700 (PDT) Date: Thu, 2 Sep 2021 12:07:09 +0800 In-Reply-To: <20210902040711.665952-1-apusaka@google.com> Message-Id: <20210902120509.Bluez.v2.11.I864344f9ee91b9c051ae4212c9f5a236bdd49632@changeid> Mime-Version: 1.0 References: <20210902040711.665952-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.259.gc128427fd7-goog Subject: [Bluez PATCH v2 11/13] unit/mesh: Inclusive language changes From: Archie Pusaka To: linux-bluetooth , Luiz Augusto von Dentz Cc: CrosBT Upstreaming , Archie Pusaka Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Archie Pusaka According to https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf "flooding" is the preferred term. --- (no changes since v1) unit/test-mesh-crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unit/test-mesh-crypto.c b/unit/test-mesh-crypto.c index 12709dace0..f9b7d81da7 100644 --- a/unit/test-mesh-crypto.c +++ b/unit/test-mesh-crypto.c @@ -111,7 +111,7 @@ static const struct mesh_crypto_test s8_1_2 = { }; static const struct mesh_crypto_test s8_1_3 = { - .name = "8.1.3 k2 function (master)", + .name = "8.1.3 k2 function (flooding)", .net_key = "f7a2a44f8e8a8029064f173ddc1e2b00", .p = "00", .nid = "7f", @@ -159,7 +159,7 @@ static const struct mesh_crypto_test s8_2_1 = { }; static const struct mesh_crypto_test s8_2_2 = { - .name = "8.2.2 Encryption and privacy keys (Master)", + .name = "8.2.2 Encryption and privacy keys (flooding)", .net_key = "7dd7364cd842ad18c17c2b820c84c3d6", .p = "00", .nid = "68", From patchwork Thu Sep 2 04:07:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 505819 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-21.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6E51C4320E for ; Thu, 2 Sep 2021 04:08:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B6D85610CD for ; Thu, 2 Sep 2021 04:08:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232627AbhIBEJ0 (ORCPT ); Thu, 2 Sep 2021 00:09:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242235AbhIBEJV (ORCPT ); Thu, 2 Sep 2021 00:09:21 -0400 Received: from mail-pj1-x104a.google.com (mail-pj1-x104a.google.com [IPv6:2607:f8b0:4864:20::104a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5841BC061575 for ; Wed, 1 Sep 2021 21:08:23 -0700 (PDT) Received: by mail-pj1-x104a.google.com with SMTP id y1-20020a17090a154100b00196156bbc18so368263pja.0 for ; Wed, 01 Sep 2021 21:08:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=wQW5sRYp/dvG+wXe86fcE1hrtE67nnkl7q2mYx1x44c=; b=FK71F/GgFtxrxniBXkbEfROuWokzdKpC+Wap3U733iBGMkEhlErvi2MBnaMuNA8YVw ErvlIR5qBwwy/6vj717b8iuPmksq/iIfIIMOK/vhE+bWJgBG9/2I9HSZb30WGMtMf0D1 yUKVD3CZ8gFzlnGx5HKhWNr0v0l2OeHsbt3cWy3hOKNBLF3P9j6c1dcsvt0lfmWofSXh 0bN3M68IBYmM9jyoTNhGh2KHvxWK6f55JL/0nvScusXzDpuOkLkYUinKf5I1B0z5O9/n FbgnSUheDc4PFi2/KY0YONtrKwAlW83/alyASnIlEkuIJxdjkY0bJylHO2N0VPoiqYn/ IgAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=wQW5sRYp/dvG+wXe86fcE1hrtE67nnkl7q2mYx1x44c=; b=hnHZQWNuBdnVfyl9BLbqMJsO5VRDtp+q97IptWmdNKIBPjj1GtbJC67AXzXizT0cZr j1d6aHRPIAqADflXxVEhD0mCyAtaJD/BEZF/qEpCIHiBkifT8CPYhBGTl8rxXaBLlJku bbvNxh9wksufVXVFejCIU+mPO8atYfnRvWzx18lGm9eurNULjuPbZCdAhctXBuInkb1v ne4qSd4PwnN9eIdTBN8M5JvDzxHiskb0nMgoSMKsDnHHq1+yVskOh5KtfDzDr8TyHj7K jsa3TSFtlFndjwgQaWAr+gqpdu3OkwR6y1zrd6xnpatU574tGZHXBb6GiDl76jYMEtpu y6hQ== X-Gm-Message-State: AOAM5331Rq5kMdl/R69w7OpaA5pWEMErDt2v7qY3h4+cMkP4Z6Ph5RV4 2il9ZQkFfCl3X/K/Zdr+lF+Qd2pR+tD1g/qDyfZGOqs/kqnXMM1ogb9lydMa8lK4Y1MIM/h17SA TZdr/vr6XExd0+XYoLOBOrKQMEnIAT01DfV+37bGhBdPyGra7ItUMWEfk5mdJgbqysuVGGxAhI0 WC X-Google-Smtp-Source: ABdhPJz7o70cRN7NP5rWGpFnrqBSz2Xiiyw6j9Ds7FhGhzGfs311ZGjOInxm013Vxq9KLlDhABSuvAllQvBs X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:5249:e81c:3ce6:f50c]) (user=apusaka job=sendgmr) by 2002:a17:902:ff02:b0:138:b944:e0f0 with SMTP id f2-20020a170902ff0200b00138b944e0f0mr1077314plj.34.1630555702780; Wed, 01 Sep 2021 21:08:22 -0700 (PDT) Date: Thu, 2 Sep 2021 12:07:10 +0800 In-Reply-To: <20210902040711.665952-1-apusaka@google.com> Message-Id: <20210902120509.Bluez.v2.12.I4df08516dd5129d4e9d2cf963121074f500201d9@changeid> Mime-Version: 1.0 References: <20210902040711.665952-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.259.gc128427fd7-goog Subject: [Bluez PATCH v2 12/13] doc: Inclusive language update From: Archie Pusaka To: linux-bluetooth , Luiz Augusto von Dentz Cc: CrosBT Upstreaming , Archie Pusaka Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Archie Pusaka Update the docs to reflect the changes for the other inclusive language updates. --- Changes in v2: * Merging several patches from the same directory into one doc/mesh-api.txt | 2 +- doc/mgmt-api.txt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/mesh-api.txt b/doc/mesh-api.txt index f2c6b9e5c2..ce651c8017 100644 --- a/doc/mesh-api.txt +++ b/doc/mesh-api.txt @@ -585,7 +585,7 @@ Methods: org.bluez.mesh.Error.InvalidArguments void SetKeyPhase(uint16 net_index, uint8 phase) - This method is used to set the master key update phase of the + This method is used to set the flooding key update phase of the given subnet. When finalizing the procedure, it is important to CompleteAppKeyUpdate() on all app keys that have been updated during the procedure prior to setting phase 3. diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt index 5355fedb00..97d33e30a1 100644 --- a/doc/mgmt-api.txt +++ b/doc/mgmt-api.txt @@ -855,7 +855,7 @@ Load Long Term Keys Command Address (6 Octets) Address_Type (1 Octet) Key_Type (1 Octet) - Master (1 Octet) + Central (1 Octet) Encryption_Size (1 Octet) Encryption_Diversifier (2 Octets) Random_Number (8 Octets) @@ -4019,7 +4019,7 @@ New Long Term Key Event Address (6 Octets) Address_Type (1 Octet) Key_Type (1 Octet) - Master (1 Octet) + Central (1 Octet) Encryption Size (1 Octet) Enc. Diversifier (2 Octets) Random Number (8 Octets) @@ -4459,7 +4459,7 @@ New Signature Resolving Key Event } This event indicates that a new signature resolving key has been - generated for either the master or slave device. + generated for either the central or peripheral device. The Store_Hint parameter indicates whether the host is expected to store the key persistently or not.