From patchwork Fri Aug 13 12:17:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 497164 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=-23.4 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, UNWANTED_LANGUAGE_BODY, URIBL_BLOCKED, 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 2E57FC4338F for ; Fri, 13 Aug 2021 12:19:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 15180610E9 for ; Fri, 13 Aug 2021 12:19:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239981AbhHMMUI (ORCPT ); Fri, 13 Aug 2021 08:20:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239683AbhHMMUG (ORCPT ); Fri, 13 Aug 2021 08:20:06 -0400 Received: from mail-pj1-x1049.google.com (mail-pj1-x1049.google.com [IPv6:2607:f8b0:4864:20::1049]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24E24C061756 for ; Fri, 13 Aug 2021 05:19:40 -0700 (PDT) Received: by mail-pj1-x1049.google.com with SMTP id e2-20020a17090a3b8200b001791a53ce87so4250218pjc.0 for ; Fri, 13 Aug 2021 05:19:40 -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=ezhVvYP/dsDxlbl9kAF9fitIxAnV25R0vLYiRMy9y5c=; b=F9JrxTYssvSjSmxsMdiCondHiW4TD4MuYlD0DrSyaBIyYvnYtrvyEUiaHwVVoIuvn0 GxQXH5dkCwDYE3hbbnFTb5GulFqu/g2bw0xAcuV7TQjDB7isMDEUSRljHXuk9yJuq9S+ 9kDcWGkwNrDi+YRgC/hE32xcFFyknZ2oUZZgLDWH4Z319HClh8VXzB54vZnqgspnkyjD jIek5+0qDmUniAy9Gzj6KGAaINdhQfEYUY7+GGbZ5IiN+6wMpqI5cCHKV/7vcAPxT8dB 7k/zRz0p8fFciWsRnk4IS0pDfDqtzheGIRuaUxr7sM8NFegbO6xypthPrXGOjTVDz1bJ AZoQ== 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=ezhVvYP/dsDxlbl9kAF9fitIxAnV25R0vLYiRMy9y5c=; b=r1+yGy2ThYBmpck1FGqhI/61M8WJul77p4aw0hgnLtMExdidFITSM3MzfyaaDTL0Ig 6Bj2mdogtp4jKijrexGYl3mN9CYqrDGWj4FjvVNxSSyyM2A8vtkzjmtExaCHAXA8soka spp3YtKg1pxRqf//mVMOvKXBzLVNFW+Sp4A/clQS1EaxG4eGsYGFj5biDD+Yek5vNgq4 wV5mWVTbEPAE97RUNomDRz5bT6Zk73CAv9hbqliEou7v5yDYaPsfHkm6EuyNZtqsVlnB AgWnznK+Ky0cmAJ0qIeKDJysCqKCvKMENCDRKinodwf2+H/10aNFmkbLHSrqtV2FeJba mYcg== X-Gm-Message-State: AOAM533LvRvuphXR9V/yEen6H111yKJO2yKNEt4qHDosKjiiRcwUQG9G jD6vJrON3sIpKym5RC9caTZ6+kslZAaSM815IeH5/keXKN1PDS0KE5ZI4SvXVkduzhztGn38doj M/lktYZevxSV4H69V1+t5PDqwbC4c1SfLeTFu26ppZndSHMFJRbG14zRckrN6T2s+zoUrMdw26J pt X-Google-Smtp-Source: ABdhPJxLxx+L0OeTfE8UAPFnN8CxH205A+juV88I+9AJ0Qkf1T1kQfp8eRf9dYkYvfWkJqeNZRxJlQ4aPn5u X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a17:90b:396:: with SMTP id ga22mr205472pjb.0.1628857179053; Fri, 13 Aug 2021 05:19:39 -0700 (PDT) Date: Fri, 13 Aug 2021 20:17:46 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.1.I3be2e373e96293524fa38328ebac177eddc71938@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 01/62] lib: Inclusive language in HCI commands and events From: Archie Pusaka To: linux-bluetooth , Luiz Augusto von Dentz Cc: CrosBT Upstreaming , Archie Pusaka , Miao-chen Chou Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Archie Pusaka "central" and "peripheral" are preferred, as reflected in the BT core spec 5.3. Reviewed-by: Miao-chen Chou --- lib/hci.h | 14 +++++++------- tools/parser/hci.c | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/hci.h b/lib/hci.h index 3382b87bf3..9d3cdfd06b 100644 --- a/lib/hci.h +++ b/lib/hci.h @@ -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 { @@ -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/tools/parser/hci.c b/tools/parser/hci.c index d395e37f54..a1253acdf7 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: @@ -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: From patchwork Fri Aug 13 12:17:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 496667 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.4 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, URIBL_BLOCKED, 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 3E8CAC432BE for ; Fri, 13 Aug 2021 12:19:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 23500610CF for ; Fri, 13 Aug 2021 12:19:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233573AbhHMMUL (ORCPT ); Fri, 13 Aug 2021 08:20:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239827AbhHMMUK (ORCPT ); Fri, 13 Aug 2021 08:20:10 -0400 Received: from mail-qk1-x749.google.com (mail-qk1-x749.google.com [IPv6:2607:f8b0:4864:20::749]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06D93C0617AE for ; Fri, 13 Aug 2021 05:19:44 -0700 (PDT) Received: by mail-qk1-x749.google.com with SMTP id d22-20020a379b160000b02903d298616502so4342091qke.11 for ; Fri, 13 Aug 2021 05:19:43 -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=gKyL/fA9NlAN6iVhN4cw+wRKBqvhqPf8DHC59IDmm2I=; b=j8UYf6W6/Hg91KvSC2NOoLGpiVh1b9fUk7S15h6ezg0kk8NcgThLRtMpQkI+5Oc29g IE6TbtrwD1jbIXgKe30xRJ9mKKmThqJ3CabTEfoT+ZLmns63U+K6G1emTIO0jum4PQs+ XKIRekMMLUbfPhZ3JFJYYWfBvwusqZahOwZsYvtinhaAAFiEJuzqWEcDp6VCPDGPQOWk Vszg6GbjP/vqWojnKDRRxyZd5j7HQSPEnqdPvjlrWfyif0B5MXn98qmTkAP7qLyfyA/z l/eOa2BgKihimC9odqehSEEUR3yxVRinwM0MklJx5aB81hQzi6LNIET6MnY6XpGQlYIy o89w== 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=gKyL/fA9NlAN6iVhN4cw+wRKBqvhqPf8DHC59IDmm2I=; b=uNkadkKRKvsKB2XngAxr/voh5ES5r2nW5ubQoN8FS3DFYuCjdISl3RmcGOeHNqPLaL HOre8iOl5zM1aZbgXn+CS49oP/FVAT6wMvKN/fgiES0iBDQmQFYHLEevMieWSyncXgq8 rteJg9pAoPJbI37Ui5jrDI2LFTnIikCHQUfRkxD/rzZpoHtzKPO6tGak1SdxXzYFxNe0 cYUTIleM5QFEi5wxO2NTrHQ0CplWYqaVe/bdC57KyZCTEed7s85zPP1rUzD/FcK9gqKO vzwjVgYYva9FnGkoc8GAz8a5oTJS48G5twic+1swTPU+fb/THkiHXe2okoB74nxlcuDj xSVA== X-Gm-Message-State: AOAM530E3jxSE1N8V0HdjFpv45VJCeqJvt3K8xkInQEXweNl6meNhv8g AwxYSFQHp8qAXLBoTF6/52VM/2GG2qJTMrSlKikuwsTwE+msblzR1POHd+Odq8XCQ+z8QJcX5PN OEhs5Qwj7VvBbXn4l6YMOojvgIDzvJzQetC6qeLdIK16oDyzSwZB9IvANPKLKFXbA32IwNnY+NG 4G X-Google-Smtp-Source: ABdhPJzeHSRWmdePcWyl73YWSy1zuj2GHQRw+ZkTHFFBYH0faBBz/ukNEWnir6MLV/4Z+cRMPV6giIAz1L4W X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:ad4:5bc7:: with SMTP id t7mr2388783qvt.10.1628857183146; Fri, 13 Aug 2021 05:19:43 -0700 (PDT) Date: Fri, 13 Aug 2021 20:17:47 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.2.Ibb7f04e885ef866b1b00a9ba0514b7da85cfe7f6@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 02/62] lib: Inclusive language in consts and strings 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 "central" and "peripheral" are preferred, as reflected in the BT core spec 5.3 --- lib/hci.c | 16 ++++++++-------- lib/hci.h | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/hci.c b/lib/hci.c index 53af0a1148..3611d3d360 100644 --- a/lib/hci.c +++ b/lib/hci.c @@ -288,7 +288,7 @@ int hci_strtolp(char *str, unsigned int *val) static hci_map link_mode_map[] = { { "NONE", 0 }, { "ACCEPT", HCI_LM_ACCEPT }, - { "MASTER", HCI_LM_MASTER }, + { "CENTRAL", HCI_LM_CENTRAL }, { "AUTH", HCI_LM_AUTH }, { "ENCRYPT", HCI_LM_ENCRYPT }, { "TRUSTED", HCI_LM_TRUSTED }, @@ -304,8 +304,8 @@ char *hci_lmtostr(unsigned int lm) return NULL; *str = 0; - if (!(lm & HCI_LM_MASTER)) - strcpy(str, "SLAVE "); + if (!(lm & HCI_LM_CENTRAL)) + strcpy(str, "PERIPHERAL "); s = hci_bit2str(link_mode_map, lm); if (!s) { @@ -345,7 +345,7 @@ static hci_map commands_map[] = { { "Set Connection Encryption", 16 }, { "Change Connection Link Key", 17 }, - { "Master Link Key", 18 }, + { "Temporary Link Key", 18 }, { "Remote Name Request", 19 }, { "Cancel Remote Name Request", 20 }, { "Read Remote Supported Features", 21 }, @@ -735,8 +735,8 @@ static hci_map lmp_features_map[8][9] = { { "", 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 */ diff --git a/lib/hci.h b/lib/hci.h index 9d3cdfd06b..4c039830d5 100644 --- a/lib/hci.h +++ b/lib/hci.h @@ -241,8 +241,8 @@ enum { #define LMP_EV4 0x01 #define LMP_EV5 0x02 -#define LMP_AFH_CAP_SLV 0x08 -#define LMP_AFH_CLS_SLV 0x10 +#define LMP_AFH_CAP_PRP 0x08 +#define LMP_AFH_CLS_PRP 0x10 #define LMP_NO_BREDR 0x20 #define LMP_LE 0x40 #define LMP_EDR_3SLOT 0x80 @@ -250,8 +250,8 @@ enum { #define LMP_EDR_5SLOT 0x01 #define LMP_SNIFF_SUBR 0x02 #define LMP_PAUSE_ENC 0x04 -#define LMP_AFH_CAP_MST 0x08 -#define LMP_AFH_CLS_MST 0x10 +#define LMP_AFH_CAP_CEN 0x08 +#define LMP_AFH_CLS_CEN 0x10 #define LMP_EDR_ESCO_2M 0x20 #define LMP_EDR_ESCO_3M 0x40 #define LMP_EDR_3S_ESCO 0x80 @@ -281,7 +281,7 @@ enum { /* Link mode */ #define HCI_LM_ACCEPT 0x8000 -#define HCI_LM_MASTER 0x0001 +#define HCI_LM_CENTRAL 0x0001 #define HCI_LM_AUTH 0x0002 #define HCI_LM_ENCRYPT 0x0004 #define HCI_LM_TRUSTED 0x0008 From patchwork Fri Aug 13 12:17:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 497163 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.2 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, URIBL_BLOCKED, 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 C9375C4338F for ; Fri, 13 Aug 2021 12:19:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AD290610CF for ; Fri, 13 Aug 2021 12:19:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240142AbhHMMUO (ORCPT ); Fri, 13 Aug 2021 08:20:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233416AbhHMMUO (ORCPT ); Fri, 13 Aug 2021 08:20:14 -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 8CCCBC061756 for ; Fri, 13 Aug 2021 05:19:47 -0700 (PDT) Received: by mail-qv1-xf4a.google.com with SMTP id z8-20020a0ce9880000b02903528f1b338aso6901317qvn.6 for ; Fri, 13 Aug 2021 05:19:47 -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=1284gNRf72shSVowIWjGd7MUKlqYd7rRcUK80E8MgEs=; b=VOwWQzqe27QBHosB3XKzfsRu7J1BcpBir2vLkwPrjI4C7sxeNT7DvWOOQAdvUT+1D4 qhLPCMfhs9vcLxjO2bP/9/C3VEJgyELJaWLTFLZrHSJlrRtBSqS4ofNL0uqS1sAX9/OG HaX2dAXRnbLSfQx7EO++wk9qGWjKajWJpaU3KIY9Y4tp/I7c6ZE2ErqG3cfOUi+WkQqg JONPpJmLde6xe0C6W52nO9rl0FOl/SGpU2YjN+OW0awC9sIYOdqUwdaOglKfKF2Llytm 5nqeob43qlbci+Bcufek/2BpDsmpK6k5/AIiu6IeUbBnvDIeoX7LzPXgr2mDeqg63AoX yv8g== 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=1284gNRf72shSVowIWjGd7MUKlqYd7rRcUK80E8MgEs=; b=QAX3NxeIrRYXh12QIYw+aGnTLu1Ic3Po020cBM1ufdWJHgub+ACeeuJbKDhYLf/6pq YYCkOpmimkeAkDJKpGT3fJupKGecKnnJBqJdXl4lY4sSnTQkwbayfoWJcAmFbw+Fk6GN P/T2qKsuaii+Cs6MYdYxXMAVmeILYP8R2KEDF5EiCl9Hw78VjVLgnVafPkUT8B4qEFRJ qQ6SOyDhm41SbZD9t3U0hn26UM7PhFCXRfma69haQbv5vdKsXHp9l1js/4+L8ucZowJP qgVgqdbt9xypDua1lTGFcACmbOIiYYJqnB1CXFNu5egO/3UXDpuiklCKw3m9tOlD5iGF so7A== X-Gm-Message-State: AOAM533eycT5U/bkPgI8Gule/72nriodsQtLukN5rzLewEFFlRRN7tJN F48r6svlMD0V4YXd0xYQ5H2h6nyOoUHi7B5v5wPscSxWrg4WdHSGlJAMDIa6d97UDZ15xhwr/yD EMjQpisgOjd7gLZm3P+3ZG0RSkurJvPL6FYmOXKnHbHEQJznApVxDph5G3KaVv/4T9h0WAdjZzt 4O X-Google-Smtp-Source: ABdhPJzkpoGzvix84A4kADVXRXQdVotDpsgSXvsC/WoD6R3iouWr8sWRSxSYRJ41sSyLaoIcbQLTCEW4NDFc X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:ad4:4c4b:: with SMTP id cs11mr2202308qvb.56.1628857186715; Fri, 13 Aug 2021 05:19:46 -0700 (PDT) Date: Fri, 13 Aug 2021 20:17:48 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.3.I700d72f935b48346f2e74088152eeef41dc5b938@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 03/62] tools/hciconfig: 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 in lib/hci.c --- tools/hciconfig.rst | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/hciconfig.rst b/tools/hciconfig.rst index 7d59b4046e..6141fc2be7 100644 --- a/tools/hciconfig.rst +++ b/tools/hciconfig.rst @@ -216,16 +216,16 @@ revision Display revision information. lm [*mode*] - With no *mode*, prints link mode. **MASTER** or **SLAVE** mean, - respectively, to ask to become master or to remain slave when a connection - request comes in. The additional keyword **ACCEPT** means that baseband - connections will be accepted even if there are no listening *AF_BLUETOOTH* - sockets. *mode* is **NONE** or a comma-separated list of keywords, where - possible keywords are **MASTER** and **ACCEPT**. **NONE** sets link policy - to the default behaviour of remaining slave and not accepting baseband - connections when there are no listening *AF_BLUETOOTH* sockets. If - **MASTER** is present, the device will ask to become master if a - connection request comes in. If **ACCEPT** is present, the device will + With no *mode*, prints link mode. **CENTRAL** or **PERIPHERAL** mean, + respectively, to ask to become central or to remain peripheral when a + connection request comes in. The additional keyword **ACCEPT** means that + baseband connections will be accepted even if there are no listening + *AF_BLUETOOTH* sockets. *mode* is **NONE** or a comma-separated list of + keywords, where possible keywords are **CENTRAL** and **ACCEPT**. **NONE** + sets link policy to the default behaviour of remaining peripheral and not + accepting baseband connections when there are no listening *AF_BLUETOOTH* + sockets. If **CENTRAL** is present, the device will ask to become central + if a connection request comes in. If **ACCEPT** is present, the device will accept baseband connections even when there are no listening *AF_BLUETOOTH* sockets. From patchwork Fri Aug 13 12:17:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 496666 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.4 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, URIBL_BLOCKED, 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 EAE3EC4338F for ; Fri, 13 Aug 2021 12:19:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D2A7B610E9 for ; Fri, 13 Aug 2021 12:19:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240145AbhHMMUR (ORCPT ); Fri, 13 Aug 2021 08:20:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239683AbhHMMUR (ORCPT ); Fri, 13 Aug 2021 08:20:17 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6544C0617AE for ; Fri, 13 Aug 2021 05:19:50 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id j21-20020a25d2150000b029057ac4b4e78fso8967980ybg.4 for ; Fri, 13 Aug 2021 05:19:50 -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=wf0eyxF5NWE4g86nU1WG74jgOVwEPEElvt764q6iHS0=; b=TdycFAHGrabJYIYtAa3qRChuBh1zxoSB9h/Q9032lNXGk2V7cumVRzIJF+wAgvTrwG lZdjo5z6I/OCDjg1Doy/9WSzpSZ4xnb4onRa72VgBLr/2LFDGWRMUn7CfBGVh5pSPrt+ dyRWjrSnmr7or2AD3b2JvClcNSsVLxoo+mnLL3p+w3q5gzRf8oCgOFG+6YWyA0DH+LtQ xoEeWhxAqItQSEG77wyLdo34OthSz39CFAQssmxZtSGhitEpdFvDFu3F58yd/Jf+e+r6 fGvuSpCdFtFQldjVC2P8XKUdNpmm640k5SeJVuyV0n8JdyuzxwndvsOImjYsYGiic4yW LnfQ== 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=wf0eyxF5NWE4g86nU1WG74jgOVwEPEElvt764q6iHS0=; b=oAwJogPIxg5qlcdjaiX8Aw3GknTTZFTNAnY7csGOVPYcUirfoie1NLT62OfZl5xMHG hiTZ9b89ciKolSW3+9FEBcFfrDxQ5C+TcKBf6zxcIfQyzxqV66jNlx14dYcPbwx+aG6s HN9XBvlezlDUUy/DDaXk1Ipm1LjYB2LANb8RubUYzlkzg0xMUJryUG2V+Omj7cXTHQ3d EO0IV068swyUcM2iILKcEzkIkaHvClXUVNvaz+bFtkq+ELq7jjgOWsBeuY5Af8rF8ybI bgIMhKediPXxa/jfPJ1X5Az23HYvUOrwoz4FWOh+yZMQtiwUrlgDkG7d/0okIu+QHfJW zZKQ== X-Gm-Message-State: AOAM532sDyXH9fP6nruKlLLa3Nui7Y6OBVlsbvCRTTbKv0JCeEniaRTL 0j37OlJtLS1V2uPXpxi715+VPpoAOn7Fe7HDE60BRajwVmSC2LukaTmowhk+gDwCx3Xki+lRg46 dv8cbS3GXAcPrND22VHr9HVnOyyTMTzjjorFtFFabej0PAT6vwizR3j6DmPy3Ceiaq5SWY8ngZ+ l8 X-Google-Smtp-Source: ABdhPJxlgwD7fyzZIVCvMg07bpKyjC5NzVTpxUd8UAVyiaHkrxMIg0mcepi5vJGEZVXRlXfevFEqpWAjyQ9c X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a25:c5d4:: with SMTP id v203mr2685627ybe.295.1628857190039; Fri, 13 Aug 2021 05:19:50 -0700 (PDT) Date: Fri, 13 Aug 2021 20:17:49 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.4.I29592c8a1a134f751cfde25e962d389215836cb5@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 04/62] core: Inclusive language for l2cap 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 "central" is preferred, as reflected on the BT core spec 5.3. --- btio/btio.c | 10 +++++----- lib/l2cap.h | 2 +- profiles/health/mcap.c | 2 +- src/sdpd-server.c | 2 +- tools/l2test.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/btio/btio.c b/btio/btio.c index 1f1c374bca..9c4601e6f8 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) @@ -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) { 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/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/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/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) From patchwork Fri Aug 13 12:17:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 497162 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.2 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, URIBL_BLOCKED, 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 B864EC4338F for ; Fri, 13 Aug 2021 12:19:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A016E610CF for ; Fri, 13 Aug 2021 12:19:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240202AbhHMMUV (ORCPT ); Fri, 13 Aug 2021 08:20:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240175AbhHMMUV (ORCPT ); Fri, 13 Aug 2021 08:20:21 -0400 Received: from mail-pl1-x649.google.com (mail-pl1-x649.google.com [IPv6:2607:f8b0:4864:20::649]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2283C061756 for ; Fri, 13 Aug 2021 05:19:54 -0700 (PDT) Received: by mail-pl1-x649.google.com with SMTP id m4-20020a170902db04b029012d5b1d78d5so5969106plx.15 for ; Fri, 13 Aug 2021 05:19: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; bh=PiBtj+MsTnuwJd4EJgx4Ti6LcY37TLBitjCaDjrgtwY=; b=BZncDvQkFO0wHxVVsVuRoAHPsWG68XjvhRDIPO5FNYTY2pJGMdeA1M2JcjU2I77BuE mdHKNuIFx3eSBz3bIQzdaPlkMnZ5mJgJhFMy6X3V48L8pO17rCZ5egInWl2jOO/ORuVY spUbHQsZsya3u0kXfjyQ+ONGoiu5H8Y9iizA5xQDILaJi+V53JcDS4oEmbFooOD5ikCW WpD6QV1l6+5pCl4tVEaWEF4ak580/YHFuXNygq6X2gx2iI0V/m2cP4GoPYh16NyfEhXt eDKE0j3lg0N/e3PCMXwazQObiXRsY2dTZJ1Tj1spjC2Xrb6fyic4JZ8mi+Hn2BTjDxJT orkA== 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=PiBtj+MsTnuwJd4EJgx4Ti6LcY37TLBitjCaDjrgtwY=; b=P+cLhzrq97fcdNCGxJTrHfLaIWRnStO++eV7SI+x3djxKq7fFFEyT4XI6b8j/M1Q7g V0+rPkwTZiJXExZTCCOAuFCNjDU0/vL7HY1QOVUBQUWtc3Uj86LqsULRvrMDFSCpqjKq sS88UFnnj9s8MIjR+lwzLa8zimgQDwOk5DpKFA3SWNGQZ/zOHTXRJOgMvDkD1BJNCjOo obQaKbmYKsyLKgafW/oITfS1SjBznTvbrPGVA33RpI4GGw479ctOIHaDo7mT5k0nGw5+ /yNeakhQfUtfICPZA3x49rn9+vhjSEfoHptxClefWjMrKlfIoNAgJxZaSbmM5oPdvsDL ZKyg== X-Gm-Message-State: AOAM533jLu3+WpCUYThJ60Ypi8m2kwLuJhw+MAZ6PJPbD8xmzzK/cAWB cJJfWfvVKamgzl/ZcZBaKPZCczvG/ewcaEt1bdIQRxpHM5/ZvtuIDKjFeJ4i8fu9VA14uz04xub mvJf/tD/jbyt97xMtOg70GBrGtPC+tv9M9dAeh+3IN7MLTYkpwoJqIX3oNIku6bBiQ689HwL68w 9b X-Google-Smtp-Source: ABdhPJy5a08TQ3i2smtXTW6wf3eFCsq3/vEc+ADXRw3j9fQrCB/lJjg/PdEPAI6VZGMzDXv8JYV9TT63zt4q X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a17:90b:4504:: with SMTP id iu4mr2430509pjb.209.1628857194016; Fri, 13 Aug 2021 05:19:54 -0700 (PDT) Date: Fri, 13 Aug 2021 20:17:50 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.5.I598f2d795e09d5ffb1ba6cb16c2baef2ac595e8e@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 05/62] core: Inclusive language for rfcomm 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 "central" is preferred, as reflected in the BT core spec 5.3. --- btio/btio.c | 10 +++++----- lib/rfcomm.h | 2 +- tools/rctest.c | 4 ++-- tools/rfcomm.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/btio/btio.c b/btio/btio.c index 9c4601e6f8..ce958bdd09 100644 --- a/btio/btio.c +++ b/btio/btio.c @@ -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) @@ -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/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/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 Fri Aug 13 12:17:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 496665 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.2 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, URIBL_BLOCKED, 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 4B383C4338F for ; Fri, 13 Aug 2021 12:19:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 31382610FA for ; Fri, 13 Aug 2021 12:19:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240203AbhHMMUZ (ORCPT ); Fri, 13 Aug 2021 08:20:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240175AbhHMMUY (ORCPT ); Fri, 13 Aug 2021 08:20:24 -0400 Received: from mail-qk1-x74a.google.com (mail-qk1-x74a.google.com [IPv6:2607:f8b0:4864:20::74a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 125FAC061756 for ; Fri, 13 Aug 2021 05:19:58 -0700 (PDT) Received: by mail-qk1-x74a.google.com with SMTP id q11-20020a05620a05abb02903ca17a8eef8so7025937qkq.10 for ; Fri, 13 Aug 2021 05:19:58 -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=HLdivF6sZUXLkJWSP1eMNrG2XucAP7mPn8a9G064n5g=; b=bEw600A7hKqgQ5uWL+By1hpC8PYCXVm8Aj0uS5VL9Y3ZlAcR3/eCVBzKACllHYkjPl GMO4ksP9at9XPRR2eWJGZao4vjJzaxeTIzp/iOPTBuorCrFlXer4lvAzTW5sdA+OvrMo YFpvbXH8mOVTTG8WoHNBLT7QT9BulAlYHcIFKxhaM0JCX7V6A9jhbt7y7uuLuGBRT2LR awjIYUp2DdPhCUmSML2aN39skPW3oCiHYfIyXOwuya/+dKQBBP4l3Y5iB7YZZcxduZmP aX9dB3iy+dFeUNtaaGEdV8Dw7eSYRLyo75RL3J94THQfPApC1C6SQztNhxnVvCmKG16T jwQw== 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=HLdivF6sZUXLkJWSP1eMNrG2XucAP7mPn8a9G064n5g=; b=fa+kZKYfmaREBsPWN0ExquRbL+PoYKeFlEiC3Z1yVaraf3z60f3gB0bHEE8MoNq1XW 7d0asGou2BOU0ciMgQk1WVEUYTa6UIKgDIIol+W4h/xaIiT/rybDLK1pzZCszVmP0qUa 4RW5XNEfntQGt2s0lTN0IdIV5BXNuhAu5QG2iqfcj0aY9Z40i9B33GSE00iURlyoXPPt iqHt0zNJo4llBPisatI1KK/ZBdZxsjUJfxvoFbDR0GvYDbJltyBlBJfYLRrDCBFHVjtd 28CL1nn6xSbzSi4il00oVP3TZxmDocFLlhWewB5ZpSHkB5iDHghoxTKo4Zl2eL2C2j/f 71FQ== X-Gm-Message-State: AOAM530pYa1EOuFZLv6x7FT4hVOD5y26YGgY3ghXuYicbp3If6ujPDa2 hvCm9oE0Y4b4kmodKKus+YkngJWsWd7hZG1sk1NP/YNBgMyDKmYSzy0nj+KuRAKIeLOC2Q8zwvr UZ6DGuUkrxZFyaIpGkdSjm5QJUqfS1+xJyDOjMjFRanNuAd6tdsqEKsCmnuGwiV7v5mH767ysGQ /d X-Google-Smtp-Source: ABdhPJw5Msi1Z6rvTbge+JbMfeYYaB/ej6nt2mVAdgbOGdycoMu+t/+natjeKFs04wzIi1twzmMSQ5HnlpLM X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:ad4:438e:: with SMTP id s14mr2293550qvr.26.1628857197254; Fri, 13 Aug 2021 05:19:57 -0700 (PDT) Date: Fri, 13 Aug 2021 20:17:51 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.6.I65c31fd642c75050d65646aeefe6d96904f93f66@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 06/62] lib: Inclusive language for filtering devices 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 "accept list" is preferred, as reflected in the BT core spec 5.3. --- lib/hci.c | 36 ++++++++++++++++++------------------ lib/hci.h | 20 ++++++++++---------- lib/hci_lib.h | 8 ++++---- tools/hcitool.c | 8 ++++---- tools/parser/hci.c | 6 +++--- 5 files changed, 39 insertions(+), 39 deletions(-) diff --git a/lib/hci.c b/lib/hci.c index 3611d3d360..d2753a934d 100644 --- a/lib/hci.c +++ b/lib/hci.c @@ -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 }, @@ -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 4c039830d5..e31685b644 100644 --- a/lib/hci.h +++ b/lib/hci.h @@ -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 { 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/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/parser/hci.c b/tools/parser/hci.c index a1253acdf7..02ebcfc442 100644 --- a/tools/parser/hci.c +++ b/tools/parser/hci.c @@ -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: From patchwork Fri Aug 13 12:17:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 497161 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.2 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, URIBL_BLOCKED, 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 D4CCBC4338F for ; Fri, 13 Aug 2021 12:20:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BBA56610CF for ; Fri, 13 Aug 2021 12:20:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240233AbhHMMU2 (ORCPT ); Fri, 13 Aug 2021 08:20:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240175AbhHMMU2 (ORCPT ); Fri, 13 Aug 2021 08:20:28 -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 BD6C1C061756 for ; Fri, 13 Aug 2021 05:20:01 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id f64-20020a2538430000b0290593bfc4b046so8975202yba.9 for ; Fri, 13 Aug 2021 05:20: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=6xRz0Qm0SECmn6Pgtavnhfow/nmGujogj3e0uaxrCNo=; b=GC5iniwgQRS68xPq1n+30ZLfL7qpyGZ2BJDbXlk3k0INJsfcxy0TTYvn+yA7YKOE6Y A9vlV2jqg0pVfAgrjrkzsk4AUIMcVcFJI+PJ2XsRKnJ4+P4flDxqqPucpxzMs+qng9n2 BIkrMnlsy9ume0ZzlU6w6vDeACkTn5vsuhOA9yxaE5LdIAxRKVjESIDY5sdAvAi/jqSU q0CM3oW0zKehdkU7nCZ2j/pmFivca8LZLLzI6zQMuLTSqexB9pqOIMwDsKF6lwA5c+Fy ttINYAHup54wofM7ww2EzEpo8M36DdjguCmchx8ZgliD5Eki/PkbV3T/IQC/Rsu33F26 TPvQ== 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=6xRz0Qm0SECmn6Pgtavnhfow/nmGujogj3e0uaxrCNo=; b=TfFv11twu6Ko6Yw5jwmMRLaNn7Yb1EbM1fjsBhnsIYabq1yjiOcqhc5J5V7duUyC41 eGbHQfkacTzNXosysS1DdotZdidfsD8hIEOeLFF8v0bhgvptdIX5+QccgvKImqCZEk8d obQhUuuF1tEhpJnsPQNAr6upZ/d7fy5IkMqCvFZxJp4b0qxwxG0bXEoicJQzvkqUKA7P bvIfptEnDLuGOnlB3TeQ3SQwUJMDnJ1DbSrM5PjlBz7z84ZtBuGCulzJ/Ves9lD17AZz oDUgMHcPMvL9ZVTkTw4Z/mQ/ImlIp7uh/P5j4Wi1xgh4xq/YWHtCGEj+as2LCSr22otm xRrg== X-Gm-Message-State: AOAM532PiGHX9Fj9L7TLwJIS+mjld4DrT1KirFOzeaqpErxVvfUFiI4D kWwuxi9awI2dvbXp1OCpLtDgkfFxQqhONOvjq5HBlzSEzNTvjEb3koZtTEGuS5jzoOHzjulAFKm cyqOCVxyINq9xa2FOqDCEuv2oOOcCOwUG1PFFAbyYp0H9c1w8iYNyYLxo/rNbxU05mbG4JA0xpe Z8 X-Google-Smtp-Source: ABdhPJy65nWs3IFeHLV0d4ZGvJ1anDX7YJhS2o/i6V8NAIGi18iCBPWZsTSJunWYVvgl6oSKY3Cr+/W8p4ka X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a25:83ce:: with SMTP id v14mr2843618ybm.221.1628857200916; Fri, 13 Aug 2021 05:20:00 -0700 (PDT) Date: Fri, 13 Aug 2021 20:17:52 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.7.I2169032b03520f33b73ca4dc7f2ae7ab0a901da3@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 07/62] lib/mgmt: Inclusive language for LTK 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 "central" is preferred, as reflected in the BT core spec 5.3. --- android/bluetooth.c | 4 ++-- lib/mgmt.h | 2 +- monitor/control.c | 4 ++-- src/adapter.c | 4 ++-- tools/oobtest.c | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/android/bluetooth.c b/android/bluetooth.c index c3ad503497..fe956b5d43 100644 --- a/android/bluetooth.c +++ b/android/bluetooth.c @@ -2276,7 +2276,7 @@ static void new_long_term_key_event(uint16_t index, uint16_t length, ediv = le16_to_cpu(key->ediv); rand = le64_to_cpu(key->rand); - store_ltk(&key->addr.bdaddr, key->addr.type, key->master, + store_ltk(&key->addr.bdaddr, key->addr.type, key->central, key->val, key->type, key->enc_size, ediv, rand); } @@ -3097,7 +3097,7 @@ static struct mgmt_ltk_info *get_ltk_info(GKeyFile *key_file, const char *peer, info->ediv = g_key_file_get_integer(key_file, peer, ediv_s, NULL); info->ediv = cpu_to_le16(info->ediv); - info->master = master; + info->central = master; failed: g_free(key); diff --git a/lib/mgmt.h b/lib/mgmt.h index 0a6349321a..0d1678f01d 100644 --- a/lib/mgmt.h +++ b/lib/mgmt.h @@ -179,7 +179,7 @@ struct mgmt_cp_load_link_keys { struct mgmt_ltk_info { struct mgmt_addr_info addr; uint8_t type; - uint8_t master; + uint8_t central; uint8_t enc_size; uint16_t ediv; uint64_t rand; diff --git a/monitor/control.c b/monitor/control.c index d1ba97d377..97d7e789c4 100644 --- a/monitor/control.c +++ b/monitor/control.c @@ -308,13 +308,13 @@ static void mgmt_new_long_term_key(uint16_t len, const void *buf) /* LE SC keys are both for master and slave */ switch (ev->key.type) { case 0x00: - if (ev->key.master) + if (ev->key.central) type = "Master (Unauthenticated)"; else type = "Slave (Unauthenticated)"; break; case 0x01: - if (ev->key.master) + if (ev->key.central) type = "Master (Authenticated)"; else type = "Slave (Authenticated)"; diff --git a/src/adapter.c b/src/adapter.c index 663b778e4a..a71ebd15c3 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -4028,7 +4028,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; } @@ -8145,7 +8145,7 @@ static void new_long_term_key_callback(uint16_t index, uint16_t length, rand = le64_to_cpu(key->rand); store_longtermkey(adapter, &key->addr.bdaddr, - key->addr.type, key->val, key->master, + key->addr.type, key->val, key->central, key->type, key->enc_size, ediv, rand); device_set_bonded(device, addr->type); diff --git a/tools/oobtest.c b/tools/oobtest.c index c095036fe7..0368bc3865 100644 --- a/tools/oobtest.c +++ b/tools/oobtest.c @@ -133,13 +133,13 @@ static void new_long_term_key_event(uint16_t index, uint16_t len, switch (ev->key.type) { case 0x00: - if (ev->key.master) + if (ev->key.central) type = "Unauthenticated, Master"; else type = "Unauthenticated, Slave"; break; case 0x01: - if (ev->key.master) + if (ev->key.central) type = "Authenticated, Master"; else type = "Authenticated, Slave"; From patchwork Fri Aug 13 12:17:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 496664 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.2 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, URIBL_BLOCKED, 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 B806FC4338F for ; Fri, 13 Aug 2021 12:20:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9E0EF610A4 for ; Fri, 13 Aug 2021 12:20:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240251AbhHMMUc (ORCPT ); Fri, 13 Aug 2021 08:20:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240175AbhHMMUb (ORCPT ); Fri, 13 Aug 2021 08:20:31 -0400 Received: from mail-qv1-xf49.google.com (mail-qv1-xf49.google.com [IPv6:2607:f8b0:4864:20::f49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1643EC061756 for ; Fri, 13 Aug 2021 05:20:05 -0700 (PDT) Received: by mail-qv1-xf49.google.com with SMTP id bo13-20020a05621414adb029035561c68664so6918804qvb.1 for ; Fri, 13 Aug 2021 05:20: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=QaLclhB85/cauEIPsHpq5YPbMmoQlX3Cg2QfR0Ui6yc=; b=t8VC0g+m//6pk7vxpv20EkQuR2iPT3XG4p1jE84aA8vW/A3Gbru+YLT6+hque/pgcR uzecx0XHyz0Wx5RHMbLsXQz71jH3v3W0iGAtylgmqM+3O/FQXlUZr4Y+RVaThVD42Vod AbHCFTXyNaM5wPz2dpgLk5rIAKDzLEbqfqJ1wIZyCRoW/o6sTh1H7cBCkqP4squ8OmwQ 73+9jx0G+Cd4a0ZP0j/gVzHzk2lb/ZzDtqwN1AmxbUMt+7b88hifeCe1IwH7RH1Joom5 gusPMmbONtxzYxLa/eE6jBjs8f7GOkgjcs/ip7scvinFVIzAMvimHMhnoymE2qMunR1L HqRQ== 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=QaLclhB85/cauEIPsHpq5YPbMmoQlX3Cg2QfR0Ui6yc=; b=cjmtsYeKT75OuNEMFSfGaU9peDpZxx3cFiD+M2aQ55nLukuErdcS4HWq+GG2DNbF03 s1+MuRXIjym8Ys0Hk9/JSD55Qcc5wVKmSlAzInTFRYuy2dTwszMt/Mb7T5nAVnXAPSx7 leFzSD8/xz87m9FZbYLp3nqwJJxy4DJW5PtpUxpRyQnVm3atwYjWGeoxIH/NUcGjFOxG +VsoXYxZhVmaUMXUxovEB2BlLOIjwZc2W8mp0839WSknJ3cgKIQ9Vw5ZJIpKqG1TrL4a G2+35+Pr5IETFBIrAY8z7+YmgR31FdCuteN5JX5AhLOiAxx5jZ2XXtFP2gqEukx5ZBPc 1BLg== X-Gm-Message-State: AOAM532H2lgN9x4urAsYN37ILaDkHbOsowRetLUE2FMXD6ULdZz5d8Ra tPOwkEbhJbboskjqLpsQ4c0GTe5NspZsMpTlXPFqUtO46W99Ax/NonCD4dw+11TP5TBKKOjpjh2 YCD5Lt+posdxgmdiUhmSztI6EH9ViJ6/o2aE/WbAJhy36tjgJLAgtlMaJDmByzXUj1W7QC+f2Yn QK X-Google-Smtp-Source: ABdhPJyxN6H6icnw4YWucR6CUXWBZ80xIeVIUr5wibieFqhzuqkoxk/lSZjljlr1QwD5Pw4lsbEKUiasMyj4 X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a0c:c250:: with SMTP id w16mr2428319qvh.10.1628857204219; Fri, 13 Aug 2021 05:20:04 -0700 (PDT) Date: Fri, 13 Aug 2021 20:17:53 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.8.I4df08516dd5129d4e9d2cf963121074f500201d9@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 08/62] doc/mgmt: 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 in lib/mgmt.c. --- doc/mgmt-api.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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. From patchwork Fri Aug 13 12:17:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 497160 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.2 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, URIBL_BLOCKED, 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 DAE67C4338F for ; Fri, 13 Aug 2021 12:20:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C1BE1610A4 for ; Fri, 13 Aug 2021 12:20:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240279AbhHMMUg (ORCPT ); Fri, 13 Aug 2021 08:20:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240257AbhHMMUf (ORCPT ); Fri, 13 Aug 2021 08:20:35 -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 8B4D0C061756 for ; Fri, 13 Aug 2021 05:20:08 -0700 (PDT) Received: by mail-pj1-x104a.google.com with SMTP id v3-20020a17090ac903b029017912733966so5351672pjt.2 for ; Fri, 13 Aug 2021 05:20:08 -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=ejnwLlyLznKWLUa0eV7/KWaNGPYz6cgbkPhMFmYxfVs=; b=ngEGNwSRSlmganPA3oWy4Be+YcaSD6XVGuoJ9AGnbWOBKUa1AYt0nTuV+ZgBHmyixv 8WMU8RUyD0qDXmo5Av7MytoVmqsv3Pd6FVP3Tf7tutVUpf4htPT3Gaj+xDfzEqO+WW6W S5GPigepGBzf2Xz/CBi1FGaJEvwnQ9zxUxBv5g0aF4u6aLC66tCtjXFuAdxDV/WkC0LT Tle/jd3hWJEq/Av8upj+iGWb6Gx6zaa+H/a6E7UnE/6+d907fLbs5Td6HS0GGx0vQOXQ rZ/kl5xmiqncENx+9AN0shqR/abnDgIpaM6N6drUOOLmOpQEwCq5eDou4zkyLhY0vsMJ pqEA== 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=ejnwLlyLznKWLUa0eV7/KWaNGPYz6cgbkPhMFmYxfVs=; b=k6J211AhF/R31ipsGO28MQN4dKUedADOJoRtFTIY5TxbcMNuN+8MnM3BcSW/8nueqO NyGUV4xMVg2IGqh2HxGoivsyuWQs2+AJeH7UL4vX3E0HheYcRkKF/8aWIIeut43B7r/M lrwzgrATRGx19z/1g0qpdxBU3uFa9wKUPhd8imzgI2BP4WMIFWjGlDg09z89IFZPmgrU T9+vYQtUXRCE3I90LcnFfY8P+gZa3Qf5K9WMmSmq5KQQgrfKqVMk4QQirHJXA2mFP/Np 7pJNwIBSHEU+nAq7t8wV7RMI14oH37wmD4mhL6O1wt6AybEgL1GpK49o7trYvVxnNdC9 oRIg== X-Gm-Message-State: AOAM5334UxxtUZ4Tvspaz/eiDYoWQ+CeLSSjPsTN697Fmg3s3OOEopIw b+4yFzfPkW6r9yPhaxnP/J7t55pc4XGIM/JzKMUy3prdjqA20kZAIlJOlFjA97BHJp7e4fTBeEV U2TR0AxuW3eu6AN/5wICr1uZ5xN8WHApbOVD5MzsyRR2/eLefogNeMG5zw2Wcia01ZpV38fijoi 1T X-Google-Smtp-Source: ABdhPJy/kBx+w0AIhvFl2p1Kw4D2bmH3qqMezIu2hC7RwDm6ATcDt1cmQnSnIrcAaMV56e4kxIbITW9T3MXM X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:aa7:80d1:0:b029:399:ce3a:d617 with SMTP id a17-20020aa780d10000b0290399ce3ad617mr2252807pfn.16.1628857207890; Fri, 13 Aug 2021 05:20:07 -0700 (PDT) Date: Fri, 13 Aug 2021 20:17:54 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.9.Ieb652c069b1583fec1439ee784a0f49a02afed11@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 09/62] btio: 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 "central" is preferred, as is reflected in the BT core spec 5.3. --- android/a2dp.c | 2 +- btio/btio.c | 42 +++++++++++++++++++++--------------------- btio/btio.h | 2 +- profiles/audio/a2dp.c | 2 +- profiles/audio/avctp.c | 2 +- profiles/sap/server.c | 2 +- tools/btiotest.c | 8 ++++---- 7 files changed, 30 insertions(+), 30 deletions(-) diff --git a/android/a2dp.c b/android/a2dp.c index e24f79348d..029107cf5c 100644 --- a/android/a2dp.c +++ b/android/a2dp.c @@ -1692,7 +1692,7 @@ bool bt_a2dp_register(struct ipc *ipc, const bdaddr_t *addr, uint8_t mode) BT_IO_OPT_SOURCE_BDADDR, &adapter_addr, BT_IO_OPT_PSM, AVDTP_PSM, BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_MEDIUM, - BT_IO_OPT_MASTER, true, + BT_IO_OPT_CENTRAL, true, BT_IO_OPT_INVALID); if (!server) { error("Failed to listen on AVDTP channel: %s", err->message); diff --git a/btio/btio.c b/btio/btio.c index ce958bdd09..bc6ede08fa 100644 --- a/btio/btio.c +++ b/btio/btio.c @@ -61,7 +61,7 @@ struct set_opts { uint16_t mtu; uint16_t imtu; uint16_t omtu; - int master; + int central; uint8_t mode; int flushable; uint32_t priority; @@ -359,7 +359,7 @@ static int l2cap_connect(int sock, const bdaddr_t *dst, uint8_t dst_type, return 0; } -static int l2cap_set_master(int sock, int master) +static int l2cap_set_central(int sock, int central) { int flags; socklen_t len; @@ -368,7 +368,7 @@ static int l2cap_set_master(int sock, int master) if (getsockopt(sock, SOL_L2CAP, L2CAP_LM, &flags, &len) < 0) return -errno; - if (master) { + if (central) { if (flags & L2CAP_LM_CENTRAL) return 0; flags |= L2CAP_LM_CENTRAL; @@ -384,7 +384,7 @@ static int l2cap_set_master(int sock, int master) return 0; } -static int rfcomm_set_master(int sock, int master) +static int rfcomm_set_central(int sock, int central) { int flags; socklen_t len; @@ -393,7 +393,7 @@ static int rfcomm_set_master(int sock, int master) if (getsockopt(sock, SOL_RFCOMM, RFCOMM_LM, &flags, &len) < 0) return -errno; - if (master) { + if (central) { if (flags & RFCOMM_LM_CENTRAL) return 0; flags |= RFCOMM_LM_CENTRAL; @@ -656,7 +656,7 @@ static gboolean set_le_mode(int sock, uint8_t mode, GError **err) static gboolean l2cap_set(int sock, uint8_t src_type, int sec_level, uint16_t imtu, uint16_t omtu, uint8_t mode, - int master, int flushable, uint32_t priority, + int central, int flushable, uint32_t priority, GError **err) { if (imtu || omtu || mode) { @@ -676,8 +676,8 @@ static gboolean l2cap_set(int sock, uint8_t src_type, int sec_level, return ret; } - if (master >= 0 && l2cap_set_master(sock, master) < 0) { - ERROR_FAILED(err, "l2cap_set_master", errno); + if (central >= 0 && l2cap_set_central(sock, central) < 0) { + ERROR_FAILED(err, "l2cap_set_central", errno); return FALSE; } @@ -733,13 +733,13 @@ static int rfcomm_connect(int sock, const bdaddr_t *dst, uint8_t channel) return 0; } -static gboolean rfcomm_set(int sock, int sec_level, int master, GError **err) +static gboolean rfcomm_set(int sock, int sec_level, int central, GError **err) { if (sec_level && !set_sec_level(sock, BT_IO_RFCOMM, sec_level, err)) return FALSE; - if (master >= 0 && rfcomm_set_master(sock, master) < 0) { - ERROR_FAILED(err, "rfcomm_set_master", errno); + if (central >= 0 && rfcomm_set_central(sock, central) < 0) { + ERROR_FAILED(err, "rfcomm_set_central", errno); return FALSE; } @@ -828,7 +828,7 @@ static gboolean parse_set_opts(struct set_opts *opts, GError **err, /* Set defaults */ opts->type = BT_IO_SCO; opts->defer = DEFAULT_DEFER_TIMEOUT; - opts->master = -1; + opts->central = -1; opts->mode = L2CAP_MODE_BASIC; opts->flushable = -1; opts->priority = 0; @@ -889,8 +889,8 @@ static gboolean parse_set_opts(struct set_opts *opts, GError **err, if (!opts->mtu) opts->mtu = opts->imtu; break; - case BT_IO_OPT_MASTER: - opts->master = va_arg(args, gboolean); + case BT_IO_OPT_CENTRAL: + opts->central = va_arg(args, gboolean); break; case BT_IO_OPT_MODE: opts->mode = va_arg(args, int); @@ -1171,7 +1171,7 @@ parse_opts: case BT_IO_OPT_IMTU: *(va_arg(args, uint16_t *)) = l2o.imtu; break; - case BT_IO_OPT_MASTER: + case BT_IO_OPT_CENTRAL: len = sizeof(flags); if (getsockopt(sock, SOL_L2CAP, L2CAP_LM, &flags, &len) < 0) { @@ -1336,7 +1336,7 @@ static gboolean rfcomm_get(int sock, GError **err, BtIOOption opt1, *(va_arg(args, uint8_t *)) = dst.rc_channel; break; - case BT_IO_OPT_MASTER: + case BT_IO_OPT_CENTRAL: len = sizeof(flags); if (getsockopt(sock, SOL_RFCOMM, RFCOMM_LM, &flags, &len) < 0) { @@ -1484,7 +1484,7 @@ static gboolean sco_get(int sock, GError **err, BtIOOption opt1, va_list args) case BT_IO_OPT_DEST_CHANNEL: case BT_IO_OPT_PSM: case BT_IO_OPT_CID: - case BT_IO_OPT_MASTER: + case BT_IO_OPT_CENTRAL: case BT_IO_OPT_MODE: case BT_IO_OPT_FLUSHABLE: case BT_IO_OPT_PRIORITY: @@ -1578,10 +1578,10 @@ gboolean bt_io_set(GIOChannel *io, GError **err, BtIOOption opt1, ...) switch (type) { case BT_IO_L2CAP: return l2cap_set(sock, opts.src_type, opts.sec_level, opts.imtu, - opts.omtu, opts.mode, opts.master, + opts.omtu, opts.mode, opts.central, opts.flushable, opts.priority, err); case BT_IO_RFCOMM: - return rfcomm_set(sock, opts.sec_level, opts.master, err); + return rfcomm_set(sock, opts.sec_level, opts.central, err); case BT_IO_SCO: return sco_set(sock, opts.mtu, opts.voice, err); case BT_IO_INVALID: @@ -1628,7 +1628,7 @@ static GIOChannel *create_io(gboolean server, struct set_opts *opts, goto failed; if (!l2cap_set(sock, opts->src_type, opts->sec_level, opts->imtu, opts->omtu, opts->mode, - opts->master, opts->flushable, opts->priority, + opts->central, opts->flushable, opts->priority, err)) goto failed; break; @@ -1641,7 +1641,7 @@ static GIOChannel *create_io(gboolean server, struct set_opts *opts, if (rfcomm_bind(sock, &opts->src, server ? opts->channel : 0, err) < 0) goto failed; - if (!rfcomm_set(sock, opts->sec_level, opts->master, err)) + if (!rfcomm_set(sock, opts->sec_level, opts->central, err)) goto failed; break; case BT_IO_SCO: diff --git a/btio/btio.h b/btio/btio.h index f0259cf1db..50a2a4dc02 100644 --- a/btio/btio.h +++ b/btio/btio.h @@ -36,7 +36,7 @@ typedef enum { BT_IO_OPT_MTU, BT_IO_OPT_OMTU, BT_IO_OPT_IMTU, - BT_IO_OPT_MASTER, + BT_IO_OPT_CENTRAL, BT_IO_OPT_HANDLE, BT_IO_OPT_CLASS, BT_IO_OPT_MODE, diff --git a/profiles/audio/a2dp.c b/profiles/audio/a2dp.c index 86bc02994f..a09ebce086 100644 --- a/profiles/audio/a2dp.c +++ b/profiles/audio/a2dp.c @@ -2418,7 +2418,7 @@ static bool a2dp_server_listen(struct a2dp_server *server) BT_IO_OPT_PSM, AVDTP_PSM, BT_IO_OPT_MODE, mode, BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_MEDIUM, - BT_IO_OPT_MASTER, true, + BT_IO_OPT_CENTRAL, true, BT_IO_OPT_INVALID); if (server->io) return true; diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c index 50de336181..9f717f35bb 100644 --- a/profiles/audio/avctp.c +++ b/profiles/audio/avctp.c @@ -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_MASTER, master, + BT_IO_OPT_CENTRAL, master, BT_IO_OPT_MODE, mode, BT_IO_OPT_INVALID); if (!io) { diff --git a/profiles/sap/server.c b/profiles/sap/server.c index 82365fca90..e6f3024ea6 100644 --- a/profiles/sap/server.c +++ b/profiles/sap/server.c @@ -1369,7 +1369,7 @@ int sap_server_register(struct btd_adapter *adapter) btd_adapter_get_address(adapter), BT_IO_OPT_CHANNEL, SAP_SERVER_CHANNEL, BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_HIGH, - BT_IO_OPT_MASTER, TRUE, + BT_IO_OPT_CENTRAL, TRUE, BT_IO_OPT_INVALID); if (!io) { error("Can't listen at channel %d.", SAP_SERVER_CHANNEL); diff --git a/tools/btiotest.c b/tools/btiotest.c index cb8cc35348..3f4900a5a5 100644 --- a/tools/btiotest.c +++ b/tools/btiotest.c @@ -343,7 +343,7 @@ static void l2cap_listen(const char *src, uint8_t addr_type, uint16_t psm, BT_IO_OPT_PSM, psm, BT_IO_OPT_CID, cid, BT_IO_OPT_SEC_LEVEL, sec, - BT_IO_OPT_MASTER, master, + BT_IO_OPT_CENTRAL, master, BT_IO_OPT_INVALID); else l2_srv = bt_io_listen(conn, cfm, data, @@ -353,7 +353,7 @@ static void l2cap_listen(const char *src, uint8_t addr_type, uint16_t psm, BT_IO_OPT_PSM, psm, BT_IO_OPT_CID, cid, BT_IO_OPT_SEC_LEVEL, sec, - BT_IO_OPT_MASTER, master, + BT_IO_OPT_CENTRAL, master, BT_IO_OPT_INVALID); if (!l2_srv) { @@ -427,7 +427,7 @@ static void rfcomm_listen(const char *src, uint8_t ch, gboolean defer, BT_IO_OPT_SOURCE, src, BT_IO_OPT_CHANNEL, ch, BT_IO_OPT_SEC_LEVEL, sec, - BT_IO_OPT_MASTER, master, + BT_IO_OPT_CENTRAL, master, BT_IO_OPT_INVALID); else rc_srv = bt_io_listen(conn, cfm, @@ -435,7 +435,7 @@ static void rfcomm_listen(const char *src, uint8_t ch, gboolean defer, &err, BT_IO_OPT_CHANNEL, ch, BT_IO_OPT_SEC_LEVEL, sec, - BT_IO_OPT_MASTER, master, + BT_IO_OPT_CENTRAL, master, BT_IO_OPT_INVALID); if (!rc_srv) { From patchwork Fri Aug 13 12:17:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 496663 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.2 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, URIBL_BLOCKED, 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 C60C6C4338F for ; Fri, 13 Aug 2021 12:20:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A3560610FA for ; Fri, 13 Aug 2021 12:20:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240325AbhHMMUl (ORCPT ); Fri, 13 Aug 2021 08:20:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240299AbhHMMUj (ORCPT ); Fri, 13 Aug 2021 08:20:39 -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 8C7DBC0617AE for ; Fri, 13 Aug 2021 05:20:12 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id n20-20020a2540140000b0290593b8e64cd5so9016284yba.3 for ; Fri, 13 Aug 2021 05:20: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=QwJGZ6YFLicAPJkwwIPCz7HAsuEhJaNimEfVks76qOY=; b=S4RQjcNt9ukj8pLoUcaBEGDrX3ehidLEZX8maqM8AsLMmWZv72gIy5taaK+aaSBqIh yfcsITaE7a5/R3e3QMDTNaiM4izRXa3ymXZNh38HtYMjlPxhuDrqpnaHkRals6kM6Jxa ssJRuf7jgIm9Y9NKWv8EuiMhB3QMmuNyWIPuMcv4nxR7ePU+e1vpSxEc/giFvB+yiZ/y cmbxm2AnqGwiaitI8652oOZmE1GQh2ho25lTMgVIbPx34tFjAqbCM8CqjWBT9NQM3mDC j9i4uzX4SqVQDThuGVRHF8Y/L1W5T9G4Rtj0L/qL3EyN1w2nKnBn8nr3Kr1zhw54o8OE vtgQ== 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=QwJGZ6YFLicAPJkwwIPCz7HAsuEhJaNimEfVks76qOY=; b=ADyDBKuihV1dO9nXZwOe9vYVSXKt2AzkQFxfD3TrlP6NZyX/MTwC+1Al7CayAvyQV7 NmYA+V8qDSsp5crmCQTMr0g8h6fYaS5FGyrlMUrZjJOhgKdKWxYkmSQdmQzAoV8dlPOL 902itrufdS8c/ppU20KHrgbEBt76I2ii9aF5DDjX5lWSkl7UCgYdPMxeGsJTZdiR6js7 6NcuNs2dN508sb9SQrUPhc51cfH5k391iffpRAsp1XXB4KzGNbFUD21BQWVB0kQ0jXMS u8cLuHDDZRsd6N2eY62/f0y7Pa2UbNaGAhU2GiibXKYej98arLtmdMqwWRSehq/bH6Eu vduQ== X-Gm-Message-State: AOAM533h8/rdqZB0osYPMtBKsPunB3lDTfef/+LEOBJHY4Cq8ArCLcEG Tg6IankszwvlibFCkzd6i3aeD4Se7gMIvCYL3BYm1X6yenJi8RbMxqR4jmPVDnhJ2YQLhizbzo9 DVFYip2MnPiVsgYl5Ym1MhWJwNLHoITU1xhI//lWVOb5PdRuoHDumhl91sBOIVyOICVuKuZGvR4 VN X-Google-Smtp-Source: ABdhPJwnXxLUWNPgdIBcDO/mbabXTDePGcexoeJ9Ftv+xdzBK3dwDcoWZGh4eDomZV5yee1Djo0dHmvAuNin X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a25:cf08:: with SMTP id f8mr2618119ybg.188.1628857211796; Fri, 13 Aug 2021 05:20:11 -0700 (PDT) Date: Fri, 13 Aug 2021 20:17:55 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.10.I42dbaec328499fe2c304308bd098c08535e4e93b@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 10/62] shared/ad: 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 "peripheral" is preferred, as reflected in the BT core spec 5.3. Also prefer to use "reject list", as reflected in https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf --- src/shared/ad.c | 8 ++++---- src/shared/ad.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/shared/ad.c b/src/shared/ad.c index d40d153316..27b76dc817 100644 --- a/src/shared/ad.c +++ b/src/shared/ad.c @@ -959,7 +959,7 @@ void bt_ad_clear_flags(struct bt_ad *ad) data_destroy); } -static uint8_t type_blacklist[] = { +static uint8_t type_reject_list[] = { BT_AD_FLAGS, BT_AD_UUID16_SOME, BT_AD_UUID16_ALL, @@ -976,7 +976,7 @@ static uint8_t type_blacklist[] = { BT_AD_DEVICE_ID, BT_AD_SMP_TK, BT_AD_SMP_OOB_FLAGS, - BT_AD_SLAVE_CONN_INTERVAL, + BT_AD_PERIPHERAL_CONN_INTERVAL, BT_AD_SOLICIT16, BT_AD_SOLICIT128, BT_AD_SERVICE_DATA16, @@ -1012,8 +1012,8 @@ bool bt_ad_add_data(struct bt_ad *ad, uint8_t type, void *data, size_t len) if (len > (BT_AD_MAX_DATA_LEN - 2)) return false; - for (i = 0; i < sizeof(type_blacklist); i++) { - if (type == type_blacklist[i]) + for (i = 0; i < sizeof(type_reject_list); i++) { + if (type == type_reject_list[i]) return false; } diff --git a/src/shared/ad.h b/src/shared/ad.h index 84ef9dee9e..feb712f508 100644 --- a/src/shared/ad.h +++ b/src/shared/ad.h @@ -32,7 +32,7 @@ #define BT_AD_DEVICE_ID 0x10 #define BT_AD_SMP_TK 0x10 #define BT_AD_SMP_OOB_FLAGS 0x11 -#define BT_AD_SLAVE_CONN_INTERVAL 0x12 +#define BT_AD_PERIPHERAL_CONN_INTERVAL 0x12 #define BT_AD_SOLICIT16 0x14 #define BT_AD_SOLICIT128 0x15 #define BT_AD_SERVICE_DATA16 0x16 From patchwork Fri Aug 13 12:17:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 497159 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.2 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, URIBL_BLOCKED, 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 555F3C432BE for ; Fri, 13 Aug 2021 12:20:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3FE1F61101 for ; Fri, 13 Aug 2021 12:20:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236930AbhHMMUn (ORCPT ); Fri, 13 Aug 2021 08:20:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240299AbhHMMUm (ORCPT ); Fri, 13 Aug 2021 08:20:42 -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 0A8CCC061756 for ; Fri, 13 Aug 2021 05:20:16 -0700 (PDT) Received: by mail-pj1-x104a.google.com with SMTP id j6-20020a17090ac486b0290178ffdbd20dso2907754pjt.0 for ; Fri, 13 Aug 2021 05:20:16 -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=iyAYbcC4s/NWf+n/ms4uj/u8ixL0E3asRmRgBJgfIAA=; b=CDoB9oryEiq4qKPVoLwOPsSzylZ8PVj58wor0+onggK7ZVkWAoW/W/iJ9WYZvmqT9U 0jjrv0RqVAdO7iEhLP8a+Gx43SPknqghP8SB11l9P8gxbc6ulM7m6dPwfaF3FoTrp3rH Zd5lNZHt3qc8TO44kFOIZ+yYxwm9Jy6AftSUS0uoZbtGfHV0cEBs+HBldNdXlKwzXnux ppi9+4g73R9IiuhbS9jAsHoTL7a+FaRXzwhjbHsvllwTU8srvWvHgl8zbuhEi8OmU6Uk 1sn18fSJpLwVRhdOcz/YZzhiFILETvRMMvA22DNnvBy86/chW3vmkrw1QsMttKMVXMhq PlIQ== 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=iyAYbcC4s/NWf+n/ms4uj/u8ixL0E3asRmRgBJgfIAA=; b=pjlyy9lyaabN9uOVGTjV4lzMZ49iK6qfle+JBnA/PIn4xB4t5lYmwMxh2lRXkYqfB8 FERgninI4j5prfUTLyVH0QMQ2iP148H5tQ3CyOX1vA6QRFxvFDOT+CixK37OXwmg7A0T EEQLP2k0h0Z6Q2QNgMXGmLHDn5SsHSrQVB0+W9vpH5f5X4ztI4jwZP/xpoSYh3h6JPtg 6Av0P8KS+VNP71AFXKHdTvG2Ru2B+05lAVnELzQz/qkn1L10lk/1r67NquNF1YhptmMr YVigNTnaiFFT4QpVy2Z1SuUFpphcxi5nLXLRfGhisMemcIXvatATnpCsIQQFaO9soxif /DFA== X-Gm-Message-State: AOAM5311NVnZQoDTWy7iXz6Fv62amFmolQhqcB8XEclWLgSAwdC/WPOs rxI+DK/MoGftfxUia5/j72k4WD0mjrwbsoZAGjCfjBFJ/GhBw6+dlpXNf5zx1VQ2gwuyICbXg8h 9wo/BWPdTHDj7+qemUzLtqNSJyU+JWTk9jFCnc6YPyh5PlHlamMt9sA4VcQJXEHa/Fj1PEIUNj0 Nm X-Google-Smtp-Source: ABdhPJyMoD6PtclKBB+8ikkDhJxo+TDla5vZdIFAx9Qwqw0htlZ5wU5VHlxohZy8NYuAsMq9pJSMowM9Ji3U X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a05:6a00:8c7:b029:3a1:119b:736 with SMTP id s7-20020a056a0008c7b02903a1119b0736mr2324163pfu.52.1628857215439; Fri, 13 Aug 2021 05:20:15 -0700 (PDT) Date: Fri, 13 Aug 2021 20:17:56 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.11.Idba293f890e2f391c383815e31e7c2708918e77e@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 11/62] shared/hfp: 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 Prefer to use "rejected", as reflected in https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf --- android/handsfree-client.c | 2 +- src/shared/hfp.c | 4 ++-- src/shared/hfp.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/android/handsfree-client.c b/android/handsfree-client.c index 4c682fbb8f..c8f9e690ea 100644 --- a/android/handsfree-client.c +++ b/android/handsfree-client.c @@ -405,7 +405,7 @@ static void cmd_complete_cb(enum hfp_result result, enum hfp_error cme_err, case HFP_RESULT_DELAYED: ev.type = HAL_HF_CLIENT_CMD_COMP_ERR_DELAYED; break; - case HFP_RESULT_BLACKLISTED: + case HFP_RESULT_REJECTED: ev.type = HAL_HF_CLIENT_CMD_COMP_ERR_BACKLISTED; break; case HFP_RESULT_CME_ERROR: diff --git a/src/shared/hfp.c b/src/shared/hfp.c index f41c70dfec..df6eab35d6 100644 --- a/src/shared/hfp.c +++ b/src/shared/hfp.c @@ -721,7 +721,7 @@ bool hfp_gw_send_result(struct hfp_gw *hfp, enum hfp_result result) case HFP_RESULT_BUSY: case HFP_RESULT_NO_ANSWER: case HFP_RESULT_DELAYED: - case HFP_RESULT_BLACKLISTED: + case HFP_RESULT_REJECTED: case HFP_RESULT_CME_ERROR: case HFP_RESULT_NO_DIALTONE: case HFP_RESULT_CONNECT: @@ -1018,7 +1018,7 @@ static bool is_response(const char *prefix, enum hfp_result *result, } if (strcmp(prefix, "BLACKLISTED") == 0) { - *result = HFP_RESULT_BLACKLISTED; + *result = HFP_RESULT_REJECTED; *cme_err = 0; return true; } diff --git a/src/shared/hfp.h b/src/shared/hfp.h index 1fb3ee8d32..600d084a73 100644 --- a/src/shared/hfp.h +++ b/src/shared/hfp.h @@ -20,7 +20,7 @@ enum hfp_result { HFP_RESULT_BUSY = 7, HFP_RESULT_NO_ANSWER = 8, HFP_RESULT_DELAYED = 9, - HFP_RESULT_BLACKLISTED = 10, + HFP_RESULT_REJECTED = 10, HFP_RESULT_CME_ERROR = 11, }; From patchwork Fri Aug 13 12:17:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 496662 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.4 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, URIBL_BLOCKED, 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 2DE40C4338F for ; Fri, 13 Aug 2021 12:20:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1A04B610CF for ; Fri, 13 Aug 2021 12:20:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240345AbhHMMUr (ORCPT ); Fri, 13 Aug 2021 08:20:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233383AbhHMMUq (ORCPT ); Fri, 13 Aug 2021 08:20:46 -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 EA9F5C061756 for ; Fri, 13 Aug 2021 05:20:19 -0700 (PDT) Received: by mail-qt1-x849.google.com with SMTP id u16-20020a05622a14d0b029028ca201eab9so6239504qtx.21 for ; Fri, 13 Aug 2021 05:20: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=L48m3nLyvQigWfaVCrVf871Bd1U78w7zQysvResPXY8=; b=Fx2OYEp6XQssbI47sD7z8sr5dVSTUiVvMyvXJfmgS1ye3h+sj8ta8n1u6JTHfFIeMc 4BJIfnI/HBfzFizB91UWj4JcpybBSheEka32ixMyLkxa+9mMXiOaAyC+o8VYP2Ppnhts jgwSJ7503jlslMrkJufVSv71vbRg75F0HUMAtY0UpLb/KCaB4hMKeodaA79iAFMr3Aro bAqqHplLTMzhjYO8NVnBhSzhnfNsTNoRRXMfA9PUIchODD5OwWRDqBJG29HsFWvWiMGh tSUnq7anQTzWbECK34G1YSYwzs9skIekEjiQCq1pl63LnqAE51a4QN0DXCgth0h6WikX hPng== 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=L48m3nLyvQigWfaVCrVf871Bd1U78w7zQysvResPXY8=; b=fLY5DJa1y+64wsNLVThhGJl+aYs9nHFD7TCPGvPiEPljfYUIg931W3pFU5GcOCOdbb gcIQ6kIkmnJ1RjHS4iapVTmFSYs23ksBL7lpOp74wQ1wxtAVyXx163p04bj9DmHRTI52 oh1PFiXoA6Dq+tOAqujuBsMLVWcPwo/+ZJy4tr1kNRU5M9QpKvtaLiLWwVkDkUcSfrAP HlnrokdcNVDMhcujxXn5/YhhFtjBOBKrqKzUVjhuLiXfuOfa8AwqK6MBA369Ge0bJONK OcnAp1O2oHycSBqoK7ddW+3GSCx0MaHBBVlT/TI5HERsgQHJ7CXjorR2scHuybNGe5Ug RcrA== X-Gm-Message-State: AOAM533uZwPANFTfiNYe0HAi4VUqP1PV7J2lMNjYVMtWNI7tcvNXIYk/ 39W1/74Po/fs9i5V4S36HevJIbmZ02KNS6yXdiKzObOJWLiXhFou0xfoFGtnJeL19m+hiPd5fAJ Y30q8hsqnr0+Bwn/qPPcwO/Der2vRjLKnToYUtSGP18WPPP8XQ92V98qnNevnUDVdEdS/WYH+ln nv X-Google-Smtp-Source: ABdhPJyNTFYkORHZWw6LNCPSWk8oVB90D9OlVviK3YOLZCe8n/kS3kypT+GShMLnSBZigFcMAKcvcYWayae0 X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a05:6214:285:: with SMTP id l5mr2346032qvv.24.1628857219106; Fri, 13 Aug 2021 05:20:19 -0700 (PDT) Date: Fri, 13 Aug 2021 20:17:57 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.12.Iaa507a7e5c90b0ded462cac1363fce9ea916214e@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 12/62] monitor: Inclusive language in struct member 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 "central" and "peripheral" are preferred, as reflected in the BT core spec 5.3. --- emulator/btdev.c | 34 +++++++++---------- monitor/bt.h | 88 ++++++++++++++++++++++++------------------------ monitor/ll.c | 32 +++++++++--------- monitor/packet.c | 64 +++++++++++++++++------------------ 4 files changed, 109 insertions(+), 109 deletions(-) diff --git a/emulator/btdev.c b/emulator/btdev.c index c9ec22ebe5..159ebe6ec5 100644 --- a/emulator/btdev.c +++ b/emulator/btdev.c @@ -5280,24 +5280,24 @@ static void le_cis_estabilished(struct btdev *dev, struct btdev_conn *conn, struct btdev *remote = conn->link->dev; /* TODO: Figure out if these values makes sense */ - memcpy(evt.cig_sync_delay, remote->le_cig.params.m_interval, - sizeof(remote->le_cig.params.m_interval)); - memcpy(evt.cis_sync_delay, remote->le_cig.params.s_interval, - sizeof(remote->le_cig.params.s_interval)); - memcpy(evt.m_latency, &remote->le_cig.params.m_latency, - sizeof(remote->le_cig.params.m_latency)); - memcpy(evt.s_latency, &remote->le_cig.params.s_latency, - sizeof(remote->le_cig.params.s_latency)); - evt.m_phy = remote->le_cig.cis[0].m_phy; - evt.s_phy = remote->le_cig.cis[0].s_phy; + memcpy(evt.cig_sync_delay, remote->le_cig.params.c_interval, + sizeof(remote->le_cig.params.c_interval)); + memcpy(evt.cis_sync_delay, remote->le_cig.params.p_interval, + sizeof(remote->le_cig.params.p_interval)); + memcpy(evt.c_latency, &remote->le_cig.params.c_latency, + sizeof(remote->le_cig.params.c_latency)); + memcpy(evt.p_latency, &remote->le_cig.params.p_latency, + sizeof(remote->le_cig.params.p_latency)); + evt.c_phy = remote->le_cig.cis[0].c_phy; + evt.p_phy = remote->le_cig.cis[0].p_phy; evt.nse = 0x01; - evt.m_bn = 0x01; - evt.s_bn = 0x01; - evt.m_ft = 0x01; - evt.s_ft = 0x01; - evt.m_mtu = remote->le_cig.cis[0].m_sdu; - evt.s_mtu = remote->le_cig.cis[0].s_sdu; - evt.interval = remote->le_cig.params.m_latency; + evt.c_bn = 0x01; + evt.p_bn = 0x01; + evt.c_ft = 0x01; + evt.p_ft = 0x01; + evt.c_mtu = remote->le_cig.cis[0].c_sdu; + evt.p_mtu = remote->le_cig.cis[0].p_sdu; + evt.interval = remote->le_cig.params.c_latency; } le_meta_event(dev, BT_HCI_EVT_LE_CIS_ESTABLISHED, &evt, sizeof(evt)); diff --git a/monitor/bt.h b/monitor/bt.h index 738bc294b2..cde68d4802 100644 --- a/monitor/bt.h +++ b/monitor/bt.h @@ -127,8 +127,8 @@ struct bt_ll_phy { #define BT_LL_PHY_UPDATE_IND 0x18 struct bt_ll_phy_update_ind { - uint8_t m_phy; - uint8_t s_phy; + uint8_t c_phy; + uint8_t p_phy; uint16_t instant; } __attribute__ ((packed)); @@ -168,19 +168,19 @@ struct bt_ll_clock_acc { struct bt_ll_cis_req { uint8_t cig; uint8_t cis; - uint8_t m_phy; - uint8_t s_phy; - uint16_t m_sdu; - uint16_t s_sdu; - uint8_t m_interval[3]; - uint8_t s_interval[3]; - uint8_t m_pdu; - uint8_t s_pdu; + uint8_t c_phy; + uint8_t p_phy; + uint16_t c_sdu; + uint16_t p_sdu; + uint8_t c_interval[3]; + uint8_t p_interval[3]; + uint8_t c_pdu; + uint8_t p_pdu; uint8_t nse; uint8_t sub_interval[3]; uint8_t bn; - uint8_t m_ft; - uint8_t s_ft; + uint8_t c_ft; + uint8_t p_ft; uint16_t iso_interval; uint8_t offset_min[3]; uint8_t offset_max[3]; @@ -2646,23 +2646,23 @@ struct bt_hci_rsp_le_read_iso_tx_sync { #define BT_HCI_BIT_LE_SET_CIG_PARAMS BT_HCI_CMD_BIT(41, 7) struct bt_hci_cis_params { uint8_t cis_id; - uint16_t m_sdu; - uint16_t s_sdu; - uint8_t m_phy; - uint8_t s_phy; - uint8_t m_rtn; - uint8_t s_rtn; + uint16_t c_sdu; + uint16_t p_sdu; + uint8_t c_phy; + uint8_t p_phy; + uint8_t c_rtn; + uint8_t p_rtn; } __attribute__ ((packed)); struct bt_hci_cmd_le_set_cig_params { uint8_t cig_id; - uint8_t m_interval[3]; - uint8_t s_interval[3]; + uint8_t c_interval[3]; + uint8_t p_interval[3]; uint8_t sca; uint8_t packing; uint8_t framing; - uint16_t m_latency; - uint16_t s_latency; + uint16_t c_latency; + uint16_t p_latency; uint8_t num_cis; struct bt_hci_cis_params cis[0]; } __attribute__ ((packed)); @@ -2679,22 +2679,22 @@ struct bt_hci_rsp_le_set_cig_params { struct bt_hci_cis_params_test { uint8_t cis_id; uint8_t nse; - uint16_t m_sdu; - uint16_t s_sdu; - uint8_t m_pdu; - uint8_t s_pdu; - uint8_t m_phy; - uint8_t s_phy; - uint8_t m_bn; - uint8_t s_bn; + uint16_t c_sdu; + uint16_t p_sdu; + uint8_t c_pdu; + uint8_t p_pdu; + uint8_t c_phy; + uint8_t p_phy; + uint8_t c_bn; + uint8_t p_bn; } __attribute__ ((packed)); struct bt_hci_cmd_le_set_cig_params_test { uint8_t cig_id; - uint8_t m_interval[3]; - uint8_t s_interval[3]; - uint8_t m_ft; - uint8_t s_ft; + uint8_t c_interval[3]; + uint8_t p_interval[3]; + uint8_t c_ft; + uint8_t p_ft; uint16_t iso_interval; uint8_t sca; uint8_t packing; @@ -3571,17 +3571,17 @@ struct bt_hci_evt_le_cis_established { uint16_t conn_handle; uint8_t cig_sync_delay[3]; uint8_t cis_sync_delay[3]; - uint8_t m_latency[3]; - uint8_t s_latency[3]; - uint8_t m_phy; - uint8_t s_phy; + uint8_t c_latency[3]; + uint8_t p_latency[3]; + uint8_t c_phy; + uint8_t p_phy; uint8_t nse; - uint8_t m_bn; - uint8_t s_bn; - uint8_t m_ft; - uint8_t s_ft; - uint16_t m_mtu; - uint16_t s_mtu; + uint8_t c_bn; + uint8_t p_bn; + uint8_t c_ft; + uint8_t p_ft; + uint16_t c_mtu; + uint16_t p_mtu; uint16_t interval; } __attribute__ ((packed)); diff --git a/monitor/ll.c b/monitor/ll.c index cf93647e03..d1023c8a3e 100644 --- a/monitor/ll.c +++ b/monitor/ll.c @@ -505,16 +505,16 @@ static void phy_update_ind(const void *data, uint8_t size) const struct bt_ll_phy_update_ind *pdu = data; uint8_t mask; - print_field("M_TO_S_PHY: 0x%2.2x", pdu->m_phy); + print_field("M_TO_S_PHY: 0x%2.2x", pdu->c_phy); - mask = print_bitfield(2, pdu->m_phy, le_phys); + mask = print_bitfield(2, pdu->c_phy, le_phys); if (mask) print_text(COLOR_UNKNOWN_OPTIONS_BIT, " Reserved" " (0x%2.2x)", mask); - print_field("S_TO_M_PHY: 0x%2.2x", pdu->s_phy); + print_field("S_TO_M_PHY: 0x%2.2x", pdu->p_phy); - mask = print_bitfield(2, pdu->s_phy, le_phys); + mask = print_bitfield(2, pdu->p_phy, le_phys); if (mask) print_text(COLOR_UNKNOWN_OPTIONS_BIT, " Reserved" " (0x%2.2x)", mask); @@ -596,38 +596,38 @@ static void cis_req(const void *data, uint8_t size) print_field("CIG ID: 0x%2.2x", cmd->cig); print_field("CIS ID: 0x%2.2x", cmd->cis); - print_field("Master to Slave PHY: 0x%2.2x", cmd->m_phy); + print_field("Master to Slave PHY: 0x%2.2x", cmd->c_phy); - mask = print_bitfield(2, cmd->m_phy, le_phys); + mask = print_bitfield(2, cmd->c_phy, le_phys); if (mask) print_text(COLOR_UNKNOWN_OPTIONS_BIT, " Reserved" " (0x%2.2x)", mask); - print_field("Slave To Master PHY: 0x%2.2x", cmd->s_phy); + print_field("Slave To Master PHY: 0x%2.2x", cmd->p_phy); - mask = print_bitfield(2, cmd->s_phy, le_phys); + mask = print_bitfield(2, cmd->p_phy, le_phys); if (mask) print_text(COLOR_UNKNOWN_OPTIONS_BIT, " Reserved" " (0x%2.2x)", mask); - print_field("Master to Slave Maximum SDU: %u", cmd->m_sdu); - print_field("Slave to Master Maximum SDU: %u", cmd->s_sdu); + print_field("Master to Slave Maximum SDU: %u", cmd->c_sdu); + print_field("Slave to Master Maximum SDU: %u", cmd->p_sdu); - memcpy(&interval, cmd->m_interval, sizeof(cmd->m_interval)); + memcpy(&interval, cmd->c_interval, sizeof(cmd->c_interval)); print_field("Master to Slave Interval: 0x%6.6x", le32_to_cpu(interval)); - memcpy(&interval, cmd->s_interval, sizeof(cmd->s_interval)); + memcpy(&interval, cmd->p_interval, sizeof(cmd->p_interval)); print_field("Slave to Master Interval: 0x%6.6x", le32_to_cpu(interval)); - print_field("Master to Slave Maximum PDU: %u", cmd->m_pdu); - print_field("Slave to Master Maximum PDU: %u", cmd->s_pdu); + print_field("Master to Slave Maximum PDU: %u", cmd->c_pdu); + print_field("Slave to Master Maximum PDU: %u", cmd->p_pdu); print_field("Burst Number: %u us", cmd->bn); memcpy(&interval, cmd->sub_interval, sizeof(cmd->sub_interval)); print_field("Sub-Interval: 0x%6.6x", le32_to_cpu(interval)); - print_field("Master to Slave Flush Timeout: %u", cmd->m_ft); - print_field("Slave to Master Flush Timeout: %u", cmd->s_ft); + print_field("Master to Slave Flush Timeout: %u", cmd->c_ft); + print_field("Slave to Master Flush Timeout: %u", cmd->p_ft); print_field("ISO Interval: 0x%4.4x", le16_to_cpu(cmd->iso_interval)); diff --git a/monitor/packet.c b/monitor/packet.c index 025b7e9b00..b6c7fe7234 100644 --- a/monitor/packet.c +++ b/monitor/packet.c @@ -8024,15 +8024,15 @@ static void print_cis_params(const void *data, int i) print_field("CIS ID: 0x%2.2x", cis->cis_id); print_field("Master to Slave Maximum SDU Size: %u", - le16_to_cpu(cis->m_sdu)); + le16_to_cpu(cis->c_sdu)); print_field("Slave to Master Maximum SDU Size: %u", - le16_to_cpu(cis->s_sdu)); - print_le_phy("Master to Slave PHY", cis->m_phy); - print_le_phy("Slave to Master PHY", cis->s_phy); + le16_to_cpu(cis->p_sdu)); + print_le_phy("Master to Slave PHY", cis->c_phy); + print_le_phy("Slave to Master PHY", cis->p_phy); print_field("Master to Slave Retransmission attempts: 0x%2.2x", - cis->m_rtn); + cis->c_rtn); print_field("Slave to Master Retransmission attempts: 0x%2.2x", - cis->s_rtn); + cis->p_rtn); } static void le_set_cig_params_cmd(const void *data, uint8_t size) @@ -8040,15 +8040,15 @@ static void le_set_cig_params_cmd(const void *data, uint8_t size) const struct bt_hci_cmd_le_set_cig_params *cmd = data; print_field("CIG ID: 0x%2.2x", cmd->cig_id); - print_usec_interval("Master to Slave SDU Interval", cmd->m_interval); - print_usec_interval("Slave to Master SDU Interval", cmd->s_interval); + print_usec_interval("Master to Slave SDU Interval", cmd->c_interval); + print_usec_interval("Slave to Master SDU Interval", cmd->p_interval); print_sca(cmd->sca); print_packing(cmd->packing); print_framing(cmd->framing); print_field("Master to Slave Maximum Latency: %d ms (0x%4.4x)", - le16_to_cpu(cmd->m_latency), le16_to_cpu(cmd->m_latency)); + le16_to_cpu(cmd->c_latency), le16_to_cpu(cmd->c_latency)); print_field("Slave to Master Maximum Latency: %d ms (0x%4.4x)", - le16_to_cpu(cmd->s_latency), le16_to_cpu(cmd->s_latency)); + le16_to_cpu(cmd->p_latency), le16_to_cpu(cmd->p_latency)); print_field("Number of CIS: %u", cmd->num_cis); size -= sizeof(*cmd); @@ -8063,16 +8063,16 @@ static void print_cis_params_test(const void *data, int i) print_field("CIS ID: 0x%2.2x", cis->cis_id); print_field("NSE: 0x%2.2x", cis->nse); - print_field("Master to Slave Maximum SDU: 0x%4.4x", cis->m_sdu); + print_field("Master to Slave Maximum SDU: 0x%4.4x", cis->c_sdu); print_field("Slave to Master Maximum SDU: 0x%4.4x", - le16_to_cpu(cis->s_sdu)); + le16_to_cpu(cis->p_sdu)); print_field("Master to Slave Maximum PDU: 0x%2.2x", - le16_to_cpu(cis->m_pdu)); - print_field("Slave to Master Maximum PDU: 0x%2.2x", cis->s_pdu); - print_le_phy("Master to Slave PHY", cis->m_phy); - print_le_phy("Slave to Master PHY", cis->s_phy); - print_field("Master to Slave Burst Number: 0x%2.2x", cis->m_bn); - print_field("Slave to Master Burst Number: 0x%2.2x", cis->s_bn); + le16_to_cpu(cis->c_pdu)); + print_field("Slave to Master Maximum PDU: 0x%2.2x", cis->p_pdu); + print_le_phy("Master to Slave PHY", cis->c_phy); + print_le_phy("Slave to Master PHY", cis->p_phy); + print_field("Master to Slave Burst Number: 0x%2.2x", cis->c_bn); + print_field("Slave to Master Burst Number: 0x%2.2x", cis->p_bn); } static void le_set_cig_params_test_cmd(const void *data, uint8_t size) @@ -8080,10 +8080,10 @@ static void le_set_cig_params_test_cmd(const void *data, uint8_t size) const struct bt_hci_cmd_le_set_cig_params_test *cmd = data; print_field("CIG ID: 0x%2.2x", cmd->cig_id); - print_usec_interval("Master to Slave SDU Interval", cmd->m_interval); - print_usec_interval("Master to Slave SDU Interval", cmd->s_interval); - print_field("Master to Slave Flush Timeout: 0x%2.2x", cmd->m_ft); - print_field("Slave to Master Flush Timeout: 0x%2.2x", cmd->s_ft); + print_usec_interval("Master to Slave SDU Interval", cmd->c_interval); + print_usec_interval("Master to Slave SDU Interval", cmd->p_interval); + print_field("Master to Slave Flush Timeout: 0x%2.2x", cmd->c_ft); + print_field("Slave to Master Flush Timeout: 0x%2.2x", cmd->p_ft); print_field("ISO Interval: %.2f ms (0x%4.4x)", le16_to_cpu(cmd->iso_interval) * 1.25, le16_to_cpu(cmd->iso_interval)); @@ -10775,17 +10775,17 @@ static void le_cis_established_evt(const void *data, uint8_t size) print_field("Connection Handle: %d", le16_to_cpu(evt->conn_handle)); print_usec_interval("CIG Synchronization Delay", evt->cig_sync_delay); print_usec_interval("CIS Synchronization Delay", evt->cis_sync_delay); - print_usec_interval("Master to Slave Latency", evt->m_latency); - print_usec_interval("Slave to Master Latency", evt->s_latency); - print_le_phy("Master to Slave PHY", evt->m_phy); - print_le_phy("Slave to Master PHY", evt->s_phy); + print_usec_interval("Master to Slave Latency", evt->c_latency); + print_usec_interval("Slave to Master Latency", evt->p_latency); + print_le_phy("Master to Slave PHY", evt->c_phy); + print_le_phy("Slave to Master PHY", evt->p_phy); print_field("Number of Subevents: %u", evt->nse); - print_field("Master to Slave Burst Number: %u", evt->m_bn); - print_field("Slave to Master Burst Number: %u", evt->s_bn); - print_field("Master to Slave Flush Timeout: %u", evt->m_ft); - print_field("Slave to Master Flush Timeout: %u", evt->s_ft); - print_field("Master to Slave MTU: %u", le16_to_cpu(evt->m_mtu)); - print_field("Slave to Master MTU: %u", le16_to_cpu(evt->s_mtu)); + print_field("Master to Slave Burst Number: %u", evt->c_bn); + print_field("Slave to Master Burst Number: %u", evt->p_bn); + print_field("Master to Slave Flush Timeout: %u", evt->c_ft); + print_field("Slave to Master Flush Timeout: %u", evt->p_ft); + print_field("Master to Slave MTU: %u", le16_to_cpu(evt->c_mtu)); + print_field("Slave to Master MTU: %u", le16_to_cpu(evt->p_mtu)); print_field("ISO Interval: %u", le16_to_cpu(evt->interval)); } From patchwork Fri Aug 13 12:17:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 496661 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.2 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, URIBL_BLOCKED, 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 D9C28C432BE for ; Fri, 13 Aug 2021 12:20:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C28E6610FA for ; Fri, 13 Aug 2021 12:20:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240352AbhHMMUu (ORCPT ); Fri, 13 Aug 2021 08:20:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233383AbhHMMUt (ORCPT ); Fri, 13 Aug 2021 08:20:49 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52D6BC061756 for ; Fri, 13 Aug 2021 05:20:23 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id n200-20020a25d6d10000b02905935ac4154aso8926620ybg.23 for ; Fri, 13 Aug 2021 05:20: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=OSZOPfTppezBMekhYxQMiyjUungy/Ia53ml6iFlewQY=; b=LbFrvtk7nteqlwgBT/H394xIEYQ5Gne9zyeD4QdgCUmt7yf7MTAfIJ0YVNA/nI8bVG wEeWjR1zAUQk30ZluNy45YodtTz734jW0fMJjeTK+6PCD/TtnlI5aqrfZTHSmfZXxmrR B+SqwRd0FIccw6DRsMyw1xmFlWsEU636XihTXBZQ79O6oIK8BbGmlPdjO3Ps6RetQXJj c2c83a1QR8ca8T43O50LcOQoM3nYqkg/UGhkpKv3Io1nbz/ruvGMRzHYXPpKBIFH9Y3w 1BvXz68mJKk8cWk08H1aKYp2rUXjm8nje4iyvrXTSngZho2Vgnh0fk4xNubTstGXr9N4 G5wg== 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=OSZOPfTppezBMekhYxQMiyjUungy/Ia53ml6iFlewQY=; b=GGOMYjr864UuTae+YGXeJZyhtJkJlS77HN/OEQOzkGMvefrVojYXVN+4mBw/jqEB2S V8dymmakxgrq0ynmiz0PK+tqhTY3CoP2fOMFLjdu2xxnNJPCc1wmo2D1c6S9Z67rn6V+ zyay3jLJl43bryGjW+yewz8uAcOzri6Yjyr3fP01muPmqpZhyvP1ULpL5E9YlSMDKH2u XXnxrw8a7CIplUrewqUx/oaycXcFGoNvrp//RnpPGsdoUYr4LWapeNLCuy/WX79+yUmi SLYTDnCjWqZI3z0HPRpyAlZhiL8SW2ZwkZRjeiJYuQfB1JgX8Eq0U19fn/sj1LuD3PEV Kdag== X-Gm-Message-State: AOAM532slwd4Hmg1i7C6d7BE38ZW5tM2xuQUVEpZ9qccL6XHlzpWSRru sIDnUy10ZipTr7kT7PTcGslj4DYvoYwyDuMlNHd4Ots9tQ8ylP0j5jtjTEbb7k5bO4RNHe4r4oc yYaCVPJDe0VQZyhVyBE39+NMOF4FJ+rnl9omXmsuo2GdoRtR6L0XAMqbvYU/Db2libhX/g8Gloq 83 X-Google-Smtp-Source: ABdhPJxt4YwNztRbVllj3YZ+wCdyseukEP8BCpepgsh7jBlgzsIn1rYwBqmqpYpHTbuYw/6mq3Ny4mALG0ck X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a25:a20a:: with SMTP id b10mr2595240ybi.478.1628857222507; Fri, 13 Aug 2021 05:20:22 -0700 (PDT) Date: Fri, 13 Aug 2021 20:17:58 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.13.Iace7436b123a902208d19b893f5f99a250d0af18@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 13/62] monitor: Inclusive language in SMP related things 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 "central" is preferred, as reflected in the BT core spec 5.3. --- emulator/smp.c | 8 ++++---- monitor/bt.h | 4 ++-- monitor/l2cap.c | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/emulator/smp.c b/emulator/smp.c index ec1baea046..c0f9911774 100644 --- a/emulator/smp.c +++ b/emulator/smp.c @@ -382,7 +382,7 @@ static void distribute_keys(struct smp_conn *conn) if (conn->local_key_dist & DIST_ENC_KEY) { memset(buf, 0, sizeof(buf)); smp_send(conn, BT_L2CAP_SMP_ENCRYPT_INFO, buf, sizeof(buf)); - smp_send(conn, BT_L2CAP_SMP_MASTER_IDENT, buf, 10); + smp_send(conn, BT_L2CAP_SMP_CENTRAL_IDENT, buf, 10); } if (conn->local_key_dist & DIST_ID_KEY) { @@ -570,7 +570,7 @@ static void encrypt_info(struct smp_conn *conn, const void *data, uint16_t len) { } -static void master_ident(struct smp_conn *conn, const void *data, uint16_t len) +static void central_ident(struct smp_conn *conn, const void *data, uint16_t len) { conn->remote_key_dist &= ~DIST_ENC_KEY; @@ -725,8 +725,8 @@ void smp_data(void *conn_data, const void *data, uint16_t len) case BT_L2CAP_SMP_ENCRYPT_INFO: encrypt_info(conn, data, len); break; - case BT_L2CAP_SMP_MASTER_IDENT: - master_ident(conn, data, len); + case BT_L2CAP_SMP_CENTRAL_IDENT: + central_ident(conn, data, len); break; case BT_L2CAP_SMP_IDENT_ADDR_INFO: ident_addr_info(conn, data, len); diff --git a/monitor/bt.h b/monitor/bt.h index cde68d4802..3d3073e462 100644 --- a/monitor/bt.h +++ b/monitor/bt.h @@ -4026,8 +4026,8 @@ struct bt_l2cap_smp_encrypt_info { uint8_t ltk[16]; } __attribute__ ((packed)); -#define BT_L2CAP_SMP_MASTER_IDENT 0x07 -struct bt_l2cap_smp_master_ident { +#define BT_L2CAP_SMP_CENTRAL_IDENT 0x07 +struct bt_l2cap_smp_central_ident { uint16_t ediv; uint64_t rand; } __attribute__ ((packed)); diff --git a/monitor/l2cap.c b/monitor/l2cap.c index f16f82532c..109bc16b44 100644 --- a/monitor/l2cap.c +++ b/monitor/l2cap.c @@ -3017,9 +3017,9 @@ static void smp_encrypt_info(const struct l2cap_frame *frame) print_hex_field("Long term key", pdu->ltk, 16); } -static void smp_master_ident(const struct l2cap_frame *frame) +static void smp_central_ident(const struct l2cap_frame *frame) { - const struct bt_l2cap_smp_master_ident *pdu = frame->data; + const struct bt_l2cap_smp_central_ident *pdu = frame->data; print_field("EDIV: 0x%4.4x", le16_to_cpu(pdu->ediv)); print_field("Rand: 0x%16.16" PRIx64, le64_to_cpu(pdu->rand)); @@ -3123,8 +3123,8 @@ static const struct smp_opcode_data smp_opcode_table[] = { smp_pairing_failed, 1, true }, { 0x06, "Encryption Information", smp_encrypt_info, 16, true }, - { 0x07, "Master Identification", - smp_master_ident, 10, true }, + { 0x07, "Central Identification", + smp_central_ident, 10, true }, { 0x08, "Identity Information", smp_ident_info, 16, true }, { 0x09, "Identity Address Information", From patchwork Fri Aug 13 12:17: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: 497158 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.2 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, UPPERCASE_75_100, URIBL_BLOCKED,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 05522C4338F for ; Fri, 13 Aug 2021 12:20:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E4AEB610F7 for ; Fri, 13 Aug 2021 12:20:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240362AbhHMMUx (ORCPT ); Fri, 13 Aug 2021 08:20:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240353AbhHMMUx (ORCPT ); Fri, 13 Aug 2021 08:20:53 -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 D1242C061756 for ; Fri, 13 Aug 2021 05:20:26 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id d69-20020a25e6480000b02904f4a117bd74so9013694ybh.17 for ; Fri, 13 Aug 2021 05:20:26 -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=YKZ4eLYwzaOHjplDVKO5bjFgPKbFqtTWrJlcc5epVl8=; b=PyUfG8FEytZnHFSQ/LFqXnvhuL0gwJqjGZz05ez9nDIA1pakdTENOfkknEojtijXdh 7yUIMG6n4zzITgvDGlMUvyc70VKYy+d4WD07GAlDwkQswP6V8p29OPANmh9Mwz4lQOgu gZL/jf2284R/3qYIArgTZxmJl7oxQO7biv2aA/l5Rcg94MkNfMXNhKLzifa4D3AqN5uG xDjpfxrNiBnqKaAYd7j5vcuaA04hIz6Ps/yEdgx+zAt9i0Wbmwx13sI/oaGpOaoMgYDD XTuewk8GmISaGihSYZ0ZnGxZvstzXy41prWqNdgT2OwQpOQ+LGtJcL0CtQrZs+MF1qlv zvIg== 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=YKZ4eLYwzaOHjplDVKO5bjFgPKbFqtTWrJlcc5epVl8=; b=oMmmpbM+3TmXuSZyH3zVEzI+7gd3+B8pnwPT5vYETDiqb+BiP3fmxqclsTL34NEzhJ GZLQ8pl1Eke9QYYoloCxtNurjyZCu3Rntp3U2DfYjYgU/1KZ7qxydrw2WUvMrgcuxU33 RcnRfuDX3Rnqrx0SwMMi2dxQq6HI518dgsPaPwq8wRE4I1l/ycvZy2XuXmHhh9RxGc9h NWTKdUs0JTwDZZ6dKNsxC5wchiSWfxivDx4BYpKoCdJQM8+R6mH4JOTH4WfX3XZwiDBZ ZGB1aqmPNE+bQKPVJzIX31fccjJ2Xdzu5k52M23Bl4DYx1yIKGlb+jWtGQySxkjQWfZd gICg== X-Gm-Message-State: AOAM5339WApo8wfHivQIqk95Cp1Oj7IPQQ0QigNW7g4YEKdpOKYbwdX5 wDozasUMHsgISTnxmuznK90Jf9W597tbbZtYp+sTT+g8zVgyxX6jW5zOSXgKJwn73mlY2K/3+32 HX2IbVTaOI2rILjSXfDO4iZkUZiM2y2k3QGt61qyITvPXEC+x8bnQz03JiWAEw3BzQrjJ/lt/YM qU X-Google-Smtp-Source: ABdhPJyCyN+dW7uI59hbS2k8nnlmr5qlniqlu7hGTgtisGBjNgEeqWB7e/7ZQ3OeGaZoAfxXf3X70bZZ7rAc X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a05:6902:134c:: with SMTP id g12mr2555981ybu.251.1628857226046; Fri, 13 Aug 2021 05:20:26 -0700 (PDT) Date: Fri, 13 Aug 2021 20:17:59 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.14.Iedb876c1f066370a58faad16ab17f846975ea7d9@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 14/62] monitor: Inclusive language in LE states 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 "central" and "peripheral" are preferred, as reflected in the BT core spec 5.3. --- monitor/packet.c | 110 +++++++++++++++++++++++------------------------ 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/monitor/packet.c b/monitor/packet.c index b6c7fe7234..3609235d06 100644 --- a/monitor/packet.c +++ b/monitor/packet.c @@ -2722,11 +2722,11 @@ void packet_print_features_msft(const uint8_t *features) #define LE_STATE_ACTIVE_SCAN 0x0020 #define LE_STATE_PASSIVE_SCAN 0x0040 #define LE_STATE_INITIATING 0x0080 -#define LE_STATE_CONN_MASTER 0x0100 -#define LE_STATE_CONN_SLAVE 0x0200 -#define LE_STATE_MASTER_MASTER 0x0400 -#define LE_STATE_SLAVE_SLAVE 0x0800 -#define LE_STATE_MASTER_SLAVE 0x1000 +#define LE_STATE_CONN_CENTRAL 0x0100 +#define LE_STATE_CONN_PERIPHERAL 0x0200 +#define LE_STATE_CENTRAL_CENTRAL 0x0400 +#define LE_STATE_PERIPHERAL_PERIPHERAL 0x0800 +#define LE_STATE_CENTRAL_PERIPHERAL 0x1000 static const struct bitfield_data le_states_desc_table[] = { { 0, "Scannable Advertising State" }, @@ -2749,59 +2749,59 @@ static const struct { uint8_t bit; uint16_t states; } le_states_comb_table[] = { - { 0, LE_STATE_NONCONN_ADV }, - { 1, LE_STATE_SCAN_ADV }, - { 2, LE_STATE_CONN_ADV }, - { 3, LE_STATE_HIGH_DIRECT_ADV }, - { 4, LE_STATE_PASSIVE_SCAN }, - { 5, LE_STATE_ACTIVE_SCAN }, - { 6, LE_STATE_INITIATING | LE_STATE_CONN_MASTER }, - { 7, LE_STATE_CONN_SLAVE }, - { 8, LE_STATE_PASSIVE_SCAN | LE_STATE_NONCONN_ADV }, - { 9, LE_STATE_PASSIVE_SCAN | LE_STATE_SCAN_ADV }, - { 10, LE_STATE_PASSIVE_SCAN | LE_STATE_CONN_ADV }, - { 11, LE_STATE_PASSIVE_SCAN | LE_STATE_HIGH_DIRECT_ADV }, - { 12, LE_STATE_ACTIVE_SCAN | LE_STATE_NONCONN_ADV }, - { 13, LE_STATE_ACTIVE_SCAN | LE_STATE_SCAN_ADV }, - { 14, LE_STATE_ACTIVE_SCAN | LE_STATE_CONN_ADV }, - { 15, LE_STATE_ACTIVE_SCAN | LE_STATE_HIGH_DIRECT_ADV }, - { 16, LE_STATE_INITIATING | LE_STATE_NONCONN_ADV }, - { 17, LE_STATE_INITIATING | LE_STATE_SCAN_ADV }, - { 18, LE_STATE_CONN_MASTER | LE_STATE_NONCONN_ADV }, - { 19, LE_STATE_CONN_MASTER | LE_STATE_SCAN_ADV }, - { 20, LE_STATE_CONN_SLAVE | LE_STATE_NONCONN_ADV }, - { 21, LE_STATE_CONN_SLAVE | LE_STATE_SCAN_ADV }, - { 22, LE_STATE_INITIATING | LE_STATE_PASSIVE_SCAN }, - { 23, LE_STATE_INITIATING | LE_STATE_ACTIVE_SCAN }, - { 24, LE_STATE_CONN_MASTER | LE_STATE_PASSIVE_SCAN }, - { 25, LE_STATE_CONN_MASTER | LE_STATE_ACTIVE_SCAN }, - { 26, LE_STATE_CONN_SLAVE | LE_STATE_PASSIVE_SCAN }, - { 27, LE_STATE_CONN_SLAVE | LE_STATE_ACTIVE_SCAN }, - { 28, LE_STATE_INITIATING | LE_STATE_CONN_MASTER | - LE_STATE_MASTER_MASTER }, - { 29, LE_STATE_LOW_DIRECT_ADV }, - { 30, LE_STATE_LOW_DIRECT_ADV | LE_STATE_PASSIVE_SCAN }, - { 31, LE_STATE_LOW_DIRECT_ADV | LE_STATE_ACTIVE_SCAN }, + { 0, LE_STATE_NONCONN_ADV }, + { 1, LE_STATE_SCAN_ADV }, + { 2, LE_STATE_CONN_ADV }, + { 3, LE_STATE_HIGH_DIRECT_ADV }, + { 4, LE_STATE_PASSIVE_SCAN }, + { 5, LE_STATE_ACTIVE_SCAN }, + { 6, LE_STATE_INITIATING | LE_STATE_CONN_CENTRAL }, + { 7, LE_STATE_CONN_PERIPHERAL }, + { 8, LE_STATE_PASSIVE_SCAN | LE_STATE_NONCONN_ADV }, + { 9, LE_STATE_PASSIVE_SCAN | LE_STATE_SCAN_ADV }, + { 10, LE_STATE_PASSIVE_SCAN | LE_STATE_CONN_ADV }, + { 11, LE_STATE_PASSIVE_SCAN | LE_STATE_HIGH_DIRECT_ADV }, + { 12, LE_STATE_ACTIVE_SCAN | LE_STATE_NONCONN_ADV }, + { 13, LE_STATE_ACTIVE_SCAN | LE_STATE_SCAN_ADV }, + { 14, LE_STATE_ACTIVE_SCAN | LE_STATE_CONN_ADV }, + { 15, LE_STATE_ACTIVE_SCAN | LE_STATE_HIGH_DIRECT_ADV }, + { 16, LE_STATE_INITIATING | LE_STATE_NONCONN_ADV }, + { 17, LE_STATE_INITIATING | LE_STATE_SCAN_ADV }, + { 18, LE_STATE_CONN_CENTRAL | LE_STATE_NONCONN_ADV }, + { 19, LE_STATE_CONN_CENTRAL | LE_STATE_SCAN_ADV }, + { 20, LE_STATE_CONN_PERIPHERAL | LE_STATE_NONCONN_ADV }, + { 21, LE_STATE_CONN_PERIPHERAL | LE_STATE_SCAN_ADV }, + { 22, LE_STATE_INITIATING | LE_STATE_PASSIVE_SCAN }, + { 23, LE_STATE_INITIATING | LE_STATE_ACTIVE_SCAN }, + { 24, LE_STATE_CONN_CENTRAL | LE_STATE_PASSIVE_SCAN }, + { 25, LE_STATE_CONN_CENTRAL | LE_STATE_ACTIVE_SCAN }, + { 26, LE_STATE_CONN_PERIPHERAL | LE_STATE_PASSIVE_SCAN }, + { 27, LE_STATE_CONN_PERIPHERAL | LE_STATE_ACTIVE_SCAN }, + { 28, LE_STATE_INITIATING | LE_STATE_CONN_CENTRAL | + LE_STATE_CENTRAL_CENTRAL }, + { 29, LE_STATE_LOW_DIRECT_ADV }, + { 30, LE_STATE_LOW_DIRECT_ADV | LE_STATE_PASSIVE_SCAN }, + { 31, LE_STATE_LOW_DIRECT_ADV | LE_STATE_ACTIVE_SCAN }, { 32, LE_STATE_INITIATING | LE_STATE_CONN_ADV | - LE_STATE_MASTER_SLAVE }, + LE_STATE_CENTRAL_PERIPHERAL }, { 33, LE_STATE_INITIATING | LE_STATE_HIGH_DIRECT_ADV | - LE_STATE_MASTER_SLAVE }, + LE_STATE_CENTRAL_PERIPHERAL }, { 34, LE_STATE_INITIATING | LE_STATE_LOW_DIRECT_ADV | - LE_STATE_MASTER_SLAVE }, - { 35, LE_STATE_CONN_MASTER | LE_STATE_CONN_ADV | - LE_STATE_MASTER_SLAVE }, - { 36, LE_STATE_CONN_MASTER | LE_STATE_HIGH_DIRECT_ADV | - LE_STATE_MASTER_SLAVE }, - { 37, LE_STATE_CONN_MASTER | LE_STATE_LOW_DIRECT_ADV | - LE_STATE_MASTER_SLAVE }, - { 38, LE_STATE_CONN_SLAVE | LE_STATE_CONN_ADV | - LE_STATE_MASTER_SLAVE }, - { 39, LE_STATE_CONN_SLAVE | LE_STATE_HIGH_DIRECT_ADV | - LE_STATE_SLAVE_SLAVE }, - { 40, LE_STATE_CONN_SLAVE | LE_STATE_LOW_DIRECT_ADV | - LE_STATE_SLAVE_SLAVE }, - { 41, LE_STATE_INITIATING | LE_STATE_CONN_SLAVE | - LE_STATE_MASTER_SLAVE }, + LE_STATE_CENTRAL_PERIPHERAL }, + { 35, LE_STATE_CONN_CENTRAL | LE_STATE_CONN_ADV | + LE_STATE_CENTRAL_PERIPHERAL }, + { 36, LE_STATE_CONN_CENTRAL | LE_STATE_HIGH_DIRECT_ADV | + LE_STATE_CENTRAL_PERIPHERAL }, + { 37, LE_STATE_CONN_CENTRAL | LE_STATE_LOW_DIRECT_ADV | + LE_STATE_CENTRAL_PERIPHERAL }, + { 38, LE_STATE_CONN_PERIPHERAL | LE_STATE_CONN_ADV | + LE_STATE_CENTRAL_PERIPHERAL }, + { 39, LE_STATE_CONN_PERIPHERAL | LE_STATE_HIGH_DIRECT_ADV | + LE_STATE_PERIPHERAL_PERIPHERAL }, + { 40, LE_STATE_CONN_PERIPHERAL | LE_STATE_LOW_DIRECT_ADV | + LE_STATE_PERIPHERAL_PERIPHERAL }, + { 41, LE_STATE_INITIATING | LE_STATE_CONN_PERIPHERAL | + LE_STATE_CENTRAL_PERIPHERAL }, { } }; From patchwork Fri Aug 13 12:18:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 497157 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.2 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, URIBL_BLOCKED, 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 35099C4338F for ; Fri, 13 Aug 2021 12:20:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1D100610CF for ; Fri, 13 Aug 2021 12:20:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240359AbhHMMU6 (ORCPT ); Fri, 13 Aug 2021 08:20:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240356AbhHMMU5 (ORCPT ); Fri, 13 Aug 2021 08:20:57 -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 E5C98C061756 for ; Fri, 13 Aug 2021 05:20:30 -0700 (PDT) Received: by mail-pj1-x104a.google.com with SMTP id mi10-20020a17090b4b4ab0290178b6d7574aso7587187pjb.6 for ; Fri, 13 Aug 2021 05:20:30 -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=BvVBO9aCuApqAW803ra4S/QragqrXZCjWak6ZmBt8sE=; b=MJu7otQ+u4HfLussBhnpQOsFRGEGn9e4+UmaHcWHqavKWekMRxxXOM3LizFPoPofMj ZXiZd4n0fcV+kmDz9AfgGr0tbs/VxJ5OTAk3GSC3RNRKy9l5DlnjOKuu/SuhvI2tbSRh cvQ4iP6yEXzvXjmgjeG/53HaLGiWVQKRZkaMVhqWg8EDE1uc5GrMBDSO6qR01wiErMxp x3CMqJ2XydbrkqbbFDE5KTGUKk3S4NRmHda1FkSv3pyCOcwHdwYh2Pvja2RxSULfFo4B qQUDS6PpHYP3hr9x91Nf+q3NVy4xfQcohgV55So75sjU3JtmSpXWF6pXg8Iwfg/VSLVv MDnQ== 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=BvVBO9aCuApqAW803ra4S/QragqrXZCjWak6ZmBt8sE=; b=a7c0o+fByniJUQyUMTWuIwfdNFs37HxoJub2dk+NuYiU97Gu/YiJNQ71IWXaRUFzWA kQ3nJAQLNVwCnNIXunBRCJ55UWDvObh3fi8QSSomZi/5LGDJmp03zbDKtymVLY4p3gwt QrI2n8CjkzdpmmvW9pS23WLiEwDtpOqA2Nng421yilw6WfCI57K+Fxuf84qczTYS8jKf ep5EO/todxDjI0T0nbeRDDG37jIMvDzs+NmpA4XbXvmuAFNg2PpTW0bccFKQJPHiIx8M uZJ/zqfzq8jQUD8xS0v0b/3pFB0f3t2TXcGV1hjt9O+R6kippKC2BSyeePFnyRCNIoO5 EVRg== X-Gm-Message-State: AOAM533XlkaUL83N8fB0eMpGIs4ks4um7x0GtRx6hdd+cy6347D9nAkv XngAudCvcftMZXqUYs4W+mVMw+fQC26jP7Z9dCaXkzwrYqPu+FWvCFu/GMFy/m++y2FPo31k/9J 0zZeFr6+J0RoC0neR1fsFInpji2CpuZoDRz2qq2mCDKVKApLFSmyERgr4a3YGlaCp12ig6iAbME jd X-Google-Smtp-Source: ABdhPJy2jp/4q0pfOuB+EVRrcWn3KARk1iaBohLYZFMjA2gMpPnpRAi9iS70KoPtFHgGfdTbyWuvwA/glMg5 X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a17:90b:396:: with SMTP id ga22mr205729pjb.0.1628857229999; Fri, 13 Aug 2021 05:20:29 -0700 (PDT) Date: Fri, 13 Aug 2021 20:18:00 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.15.I3a4295a824570e92a9274f94e8b59025c3fba576@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 15/62] monitor: Inclusive language in LL feature 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 "peripheral" is preferred, as reflected in the BT core spec 5.3. --- monitor/bt.h | 4 ++-- monitor/ll.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/monitor/bt.h b/monitor/bt.h index 3d3073e462..888dbe3d89 100644 --- a/monitor/bt.h +++ b/monitor/bt.h @@ -88,8 +88,8 @@ struct bt_ll_reject_ind { uint8_t error; } __attribute__ ((packed)); -#define BT_LL_SLAVE_FEATURE_REQ 0x0e -struct bt_ll_slave_feature_req { +#define BT_LL_PERIPHERAL_FEATURE_REQ 0x0e +struct bt_ll_peripheral_feature_req { uint8_t features[8]; } __attribute__ ((packed)); diff --git a/monitor/ll.c b/monitor/ll.c index d1023c8a3e..d0db9194bd 100644 --- a/monitor/ll.c +++ b/monitor/ll.c @@ -449,9 +449,9 @@ static void reject_ind(const void *data, uint8_t size) packet_print_error("Error code", pdu->error); } -static void slave_feature_req(const void *data, uint8_t size) +static void peripheral_feature_req(const void *data, uint8_t size) { - const struct bt_ll_slave_feature_req *pdu = data; + const struct bt_ll_peripheral_feature_req *pdu = data; packet_print_features_ll(pdu->features); } @@ -702,7 +702,7 @@ static const struct llcp_data llcp_table[] = { { 0x0b, "LL_PAUSE_ENC_RSP", null_pdu, 0, true }, { 0x0c, "LL_VERSION_IND", version_ind, 5, true }, { 0x0d, "LL_REJECT_IND", reject_ind, 1, true }, - { 0x0e, "LL_SLAVE_FEATURE_REQ", slave_feature_req, 8, true }, + { 0x0e, "LL_PERIPHERAL_FEATURE_REQ", peripheral_feature_req, 8, true }, { 0x0f, "LL_CONNECTION_PARAM_REQ", NULL, 23, true }, { 0x10, "LL_CONNECTION_PARAM_RSP", NULL, 23, true }, { 0x11, "LL_REJECT_IND_EXT", reject_ind_ext, 2, true }, From patchwork Fri Aug 13 12:18:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 496660 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.2 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, URIBL_BLOCKED, 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 AF60AC4320A for ; Fri, 13 Aug 2021 12:20:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9A3F3610CF for ; Fri, 13 Aug 2021 12:20:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240353AbhHMMVC (ORCPT ); Fri, 13 Aug 2021 08:21:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240328AbhHMMVB (ORCPT ); Fri, 13 Aug 2021 08:21:01 -0400 Received: from mail-qt1-x84a.google.com (mail-qt1-x84a.google.com [IPv6:2607:f8b0:4864:20::84a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26167C061756 for ; Fri, 13 Aug 2021 05:20:35 -0700 (PDT) Received: by mail-qt1-x84a.google.com with SMTP id o11-20020ac85a4b0000b029028acd99a680so6260948qta.19 for ; Fri, 13 Aug 2021 05:20:35 -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=6XRTy1u6qcQ2jVTWezczK11htvvoo9E5OQO7JJGG20Y=; b=cy4d+NjRhbKqTxUkDWOUuvcGiYoYfj/gAZcLgY1NH7PMCkrF5lRI9iWbI4LkYghp/f ZTi7BEtIUBqV64otM00ZkIlKCWJsglQ/uY8OoHqDa5PuY2BQbx/5smdJVP6mX7rHGSNZ Oa1JGYmthfMTp7OJQ5D9IwJrmtBn/sDE52tS7wZA9DebV/QxGlQDdo9sQzDHz3demPaO FD9PxAi0/db8Qo2sqizUq5hal8oNtByK9UFo+HTsDL2fYFSN+/h/T4ilI+S8OAt3DSAm K000nX/7nyJ6qdKM5kf0NStvuJWeXioLSDjJDqnYMMTNLeDYCFx/TkBNJHv4Cs+B92Ry ertw== 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=6XRTy1u6qcQ2jVTWezczK11htvvoo9E5OQO7JJGG20Y=; b=ZWrPVOYAoIZ1TsuMcFyZz9XvCAw3E4olfRh8cXZBIu0jt9YnOgVK3BvefXNubkAoIT M3pW2gEll5nzVAhnqa3raaSkWgUvcwegarcx3zRPQoUh3qwTG3hW/kJW5ULbX22nzIgg hz89er4GnUlgEgeXuf4mE199dLW1eI9QEqh5Jy4ZyQmQM1Mi4Z8Vuopt20DoggdUP8sK NQmA/oEFqs61JoXaem18OIQxNfVarwvXPU5PRUlwyZDgfCtWk9QKz3bWz/sEwqPuNgtz Z7r1B6OL5uxbLWgVFy3hH/HLBvY3Db/TufKLIwSYkdj9UbB/nzxX3tqpFT2ZeS1l45Oq /N/Q== X-Gm-Message-State: AOAM531T7ge2ebTJ/6mPO9y5XpJS7r06xlJeX51vcaqEeYZbT/ROQVJ7 /mYFG4lOCC67RLm/FimmmJKqvR6hxr8WZWGjwWgdLdGLepTkaWmpJuJkwU1P7qPGwri74c39Kw3 qrTt1GkmJhFD710MhBEnF8GJYcTQ+89vCwB7OOLjgMm/rL9v+yU4raWBA++mS5iwf3pUqpV0/IC DI X-Google-Smtp-Source: ABdhPJytDB6VxXoZSXsIz6DEXI6IwO/Xl/izKQ6icXpco5v3lwDIgEvc81P//t4DO3g+Egly7JEL+iLkvbJ6 X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:ad4:5c62:: with SMTP id i2mr2413166qvh.32.1628857234285; Fri, 13 Aug 2021 05:20:34 -0700 (PDT) Date: Fri, 13 Aug 2021 20:18:01 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.16.I712b6ffc914c7a88acc173556e03021b31543e60@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 16/62] monitor: Inclusive language in link key transaction 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 "link key" or "temporary link key" are preferred, as reflected in the BT core spec 5.3. --- monitor/bt.h | 8 ++++---- monitor/packet.c | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/monitor/bt.h b/monitor/bt.h index 888dbe3d89..70e18cc171 100644 --- a/monitor/bt.h +++ b/monitor/bt.h @@ -628,8 +628,8 @@ struct bt_hci_cmd_change_conn_link_key { uint16_t handle; } __attribute__ ((packed)); -#define BT_HCI_CMD_MASTER_LINK_KEY 0x0417 -struct bt_hci_cmd_master_link_key { +#define BT_HCI_CMD_LINK_KEY_SELECTION 0x0417 +struct bt_hci_cmd_link_key_selection { uint8_t key_flag; } __attribute__ ((packed)); @@ -2931,8 +2931,8 @@ struct bt_hci_evt_change_conn_link_key_complete { uint16_t handle; } __attribute__ ((packed)); -#define BT_HCI_EVT_MASTER_LINK_KEY_COMPLETE 0x0a -struct bt_hci_evt_master_link_key_complete { +#define BT_HCI_EVT_LINK_KEY_TYPE_CHANGED 0x0a +struct bt_hci_evt_link_key_type_changed { uint8_t status; uint16_t handle; uint8_t key_flag; diff --git a/monitor/packet.c b/monitor/packet.c index 3609235d06..5c0fe400da 100644 --- a/monitor/packet.c +++ b/monitor/packet.c @@ -2901,7 +2901,7 @@ static const struct bitfield_data events_table[] = { { 6, "Remote Name Request Complete" }, { 7, "Encryption Change" }, { 8, "Change Connection Link Key Complete" }, - { 9, "Master Link Key Complete" }, + { 9, "Link Key Type Changed" }, { 10, "Read Remote Supported Features Complete" }, { 11, "Read Remote Version Information Complete" }, { 12, "QoS Setup Complete" }, @@ -4253,9 +4253,9 @@ static void change_conn_link_key_cmd(const void *data, uint8_t size) print_handle(cmd->handle); } -static void master_link_key_cmd(const void *data, uint8_t size) +static void link_key_selection_cmd(const void *data, uint8_t size) { - const struct bt_hci_cmd_master_link_key *cmd = data; + const struct bt_hci_cmd_link_key_selection *cmd = data; print_key_flag(cmd->key_flag); } @@ -8416,8 +8416,8 @@ static const struct opcode_data opcode_table[] = { set_conn_encrypt_cmd, 3, true }, { 0x0415, 17, "Change Connection Link Key", change_conn_link_key_cmd, 2, true }, - { 0x0417, 18, "Master Link Key", - master_link_key_cmd, 1, true }, + { 0x0417, 18, "Temporary Link Key", + link_key_selection_cmd, 1, true }, { 0x0419, 19, "Remote Name Request", remote_name_request_cmd, 10, true }, { 0x041a, 20, "Remote Name Request Cancel", @@ -9493,9 +9493,9 @@ static void change_conn_link_key_complete_evt(const void *data, uint8_t size) print_handle(evt->handle); } -static void master_link_key_complete_evt(const void *data, uint8_t size) +static void link_key_type_changed_evt(const void *data, uint8_t size) { - const struct bt_hci_evt_master_link_key_complete *evt = data; + const struct bt_hci_evt_link_key_type_changed *evt = data; print_status(evt->status); print_handle(evt->handle); @@ -11073,8 +11073,8 @@ static const struct event_data event_table[] = { encrypt_change_evt, 4, true }, { 0x09, "Change Connection Link Key Complete", change_conn_link_key_complete_evt, 3, true }, - { 0x0a, "Master Link Key Complete", - master_link_key_complete_evt, 4, true }, + { 0x0a, "Link Key Type Changed", + link_key_type_changed_evt, 4, true }, { 0x0b, "Read Remote Supported Features", remote_features_complete_evt, 11, true }, { 0x0c, "Read Remote Version Complete", From patchwork Fri Aug 13 12:18:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 497156 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.2 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, URIBL_BLOCKED, 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 1C5ABC4338F for ; Fri, 13 Aug 2021 12:20:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F3AC5610CF for ; Fri, 13 Aug 2021 12:20:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240377AbhHMMVG (ORCPT ); Fri, 13 Aug 2021 08:21:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240315AbhHMMVF (ORCPT ); Fri, 13 Aug 2021 08:21:05 -0400 Received: from mail-pl1-x649.google.com (mail-pl1-x649.google.com [IPv6:2607:f8b0:4864:20::649]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD3E5C061756 for ; Fri, 13 Aug 2021 05:20:38 -0700 (PDT) Received: by mail-pl1-x649.google.com with SMTP id p7-20020a170902b087b029012c2879a885so6021093plr.6 for ; Fri, 13 Aug 2021 05:20:38 -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=CmkMF2BsBS7wId7P5QUnYFG9FV3+VKC82WTwJjcGAxc=; b=a0uLJpM9cpRsJsfBJ/Ysvb7L7kvRP0VLBXKs0m8WYG1lZ5ZYojd6HgMmeRwPbmw3gq gERdsLqP+usfNuaaaPAWT9EB7t/ZEskE3h8/Nh5SkZCf9FU5o+GnjgRlhck5WPH/wXoD /dtKeQjHakcAx1rsPFpQWkhTjA7+Ywe5QTHq6oi4KOWOm74sZd1r5EJLoAaRb2dFBlPb dRPGxLaqXLrPuTuUUJTGsmhwKs09hL063NFPhSBW/mmYl3CX3/VXLYK6J9V3m9rKLKoO PA8DoYv7tomv/pWqCAmVepbF7+1A1Ap45ciPhPxxfhrv/j69M81II63z9dTrmjyXxv0u HCqg== 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=CmkMF2BsBS7wId7P5QUnYFG9FV3+VKC82WTwJjcGAxc=; b=n0K6HRHS4PVKxpDgYOCOYiKjEEOCd/OgEqC+hSjHKDr8X2Skq/2Bck/yAeYOIGVMC3 Z4sBa/zjeGn+h9rOal5gYWzo1M5g7mfJyidCdY7iY1qdDcJL7CMM+pZ4hyivcy6+yP/S HNj9Kp737hi3oetjlkL4clkAZ3bsbAGHF0LDPyD7fxorKnCcTnGM/lt0vZbbjZ77a67A P0iMq7C1a7FYuZIRyWNsq6RJ4mACCbmyuhwk4fq3yNVYOU9dGBFvjnL08d4VIQWrSwKz c73LCq9Iruk/hJzhD17pcOKI8T3RrO41esvwDbVLnet6JNMA2MI96bjGKmF+wKWyEK8n /9Eg== X-Gm-Message-State: AOAM531CzkmWnMzXoFwUMfldxDZo/0zvj7Kb0taVxIv27M7tRFu793U5 IPEq2kY8mouzjWVNLsEA2heOpOs0mJ7tPuq2MmyvtyMvSAUKSx18lboXvApbr4aX7+hGyA+Xw0S 97Hlh7UaNIVYkXeC/toKCJSGdGn1R67EjtBOQuhcA81FEyGXNvaJQIxDOPphR8tHy2HpfUiyeBD ZK X-Google-Smtp-Source: ABdhPJwTkKGgLCCsHmKAGDFCHd2E1+8N1ztm2AL2RK0leM2kztXwAMswnc5/aeuAI+Bq3Q7+SdgU6tL+aRvQ X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a62:6042:0:b029:3e0:86b4:51b with SMTP id u63-20020a6260420000b02903e086b4051bmr2202382pfb.62.1628857238068; Fri, 13 Aug 2021 05:20:38 -0700 (PDT) Date: Fri, 13 Aug 2021 20:18:02 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.17.I91ffb170f72b7d0a9d054ec97046a54ab06cc8d2@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 17/62] monitor: Inclusive language in peripheral broadcast 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 "peripheral" is preferred, as reflected in the BT core spec 5.3. --- monitor/bt.h | 30 +++++++-------- monitor/packet.c | 95 ++++++++++++++++++++++++------------------------ tools/3dsp.c | 31 ++++++++-------- 3 files changed, 79 insertions(+), 77 deletions(-) diff --git a/monitor/bt.h b/monitor/bt.h index 70e18cc171..4aa11e53a5 100644 --- a/monitor/bt.h +++ b/monitor/bt.h @@ -898,8 +898,8 @@ struct bt_hci_cmd_truncated_page_cancel { uint8_t bdaddr[6]; } __attribute__ ((packed)); -#define BT_HCI_CMD_SET_SLAVE_BROADCAST 0x0441 -struct bt_hci_cmd_set_slave_broadcast { +#define BT_HCI_CMD_SET_PERIPHERAL_BROADCAST 0x0441 +struct bt_hci_cmd_set_peripheral_broadcast { uint8_t enable; uint8_t lt_addr; uint8_t lpo_allowed; @@ -908,14 +908,14 @@ struct bt_hci_cmd_set_slave_broadcast { uint16_t max_interval; uint16_t timeout; } __attribute__ ((packed)); -struct bt_hci_rsp_set_slave_broadcast { +struct bt_hci_rsp_set_peripheral_broadcast { uint8_t status; uint8_t lt_addr; uint16_t interval; } __attribute__ ((packed)); -#define BT_HCI_CMD_SET_SLAVE_BROADCAST_RECEIVE 0x0442 -struct bt_hci_cmd_set_slave_broadcast_receive { +#define BT_HCI_CMD_SET_PERIPHERAL_BROADCAST_RECEIVE 0x0442 +struct bt_hci_cmd_set_peripheral_broadcast_receive { uint8_t enable; uint8_t bdaddr[6]; uint8_t lt_addr; @@ -928,7 +928,7 @@ struct bt_hci_cmd_set_slave_broadcast_receive { uint16_t pkt_type; uint8_t map[10]; } __attribute__ ((packed)); -struct bt_hci_rsp_set_slave_broadcast_receive { +struct bt_hci_rsp_set_peripheral_broadcast_receive { uint8_t status; uint8_t bdaddr[6]; uint8_t lt_addr; @@ -1599,13 +1599,13 @@ struct bt_hci_rsp_delete_reserved_lt_addr { uint8_t lt_addr; } __attribute__ ((packed)); -#define BT_HCI_CMD_SET_SLAVE_BROADCAST_DATA 0x0c76 -struct bt_hci_cmd_set_slave_broadcast_data { +#define BT_HCI_CMD_SET_PERIPHERAL_BROADCAST_DATA 0x0c76 +struct bt_hci_cmd_set_peripheral_broadcast_data { uint8_t lt_addr; uint8_t fragment; uint8_t length; } __attribute__ ((packed)); -struct bt_hci_rsp_set_slave_broadcast_data { +struct bt_hci_rsp_set_peripheral_broadcast_data { uint8_t status; uint8_t lt_addr; } __attribute__ ((packed)); @@ -3325,8 +3325,8 @@ struct bt_hci_evt_sync_train_received { uint8_t service_data; } __attribute__ ((packed)); -#define BT_HCI_EVT_SLAVE_BROADCAST_RECEIVE 0x51 -struct bt_hci_evt_slave_broadcast_receive { +#define BT_HCI_EVT_PERIPHERAL_BROADCAST_RECEIVE 0x51 +struct bt_hci_evt_peripheral_broadcast_receive { uint8_t bdaddr[6]; uint8_t lt_addr; uint32_t clock; @@ -3336,8 +3336,8 @@ struct bt_hci_evt_slave_broadcast_receive { uint8_t length; } __attribute__ ((packed)); -#define BT_HCI_EVT_SLAVE_BROADCAST_TIMEOUT 0x52 -struct bt_hci_evt_slave_broadcast_timeout { +#define BT_HCI_EVT_PERIPHERAL_BROADCAST_TIMEOUT 0x52 +struct bt_hci_evt_peripheral_broadcast_timeout { uint8_t bdaddr[6]; uint8_t lt_addr; } __attribute__ ((packed)); @@ -3350,8 +3350,8 @@ struct bt_hci_evt_truncated_page_complete { #define BT_HCI_EVT_SLAVE_PAGE_RESPONSE_TIMEOUT 0x54 -#define BT_HCI_EVT_SLAVE_BROADCAST_CHANNEL_MAP_CHANGE 0x55 -struct bt_hci_evt_slave_broadcast_channel_map_change { +#define BT_HCI_EVT_PERIPHERAL_BROADCAST_CHANNEL_MAP_CHANGE 0x55 +struct bt_hci_evt_peripheral_broadcast_channel_map_change { uint8_t map[10]; } __attribute__ ((packed)); diff --git a/monitor/packet.c b/monitor/packet.c index 5c0fe400da..a787cb2854 100644 --- a/monitor/packet.c +++ b/monitor/packet.c @@ -2584,17 +2584,17 @@ static const struct bitfield_data features_page1[] = { }; static const struct bitfield_data features_page2[] = { - { 0, "Connectionless Slave Broadcast - Master" }, - { 1, "Connectionless Slave Broadcast - Slave" }, - { 2, "Synchronization Train" }, - { 3, "Synchronization Scan" }, - { 4, "Inquiry Response Notification Event" }, - { 5, "Generalized interlaced scan" }, - { 6, "Coarse Clock Adjustment" }, - { 8, "Secure Connections (Controller Support)" }, - { 9, "Ping" }, - { 10, "Slot Availability Mask" }, - { 11, "Train nudging" }, + { 0, "Connectionless Peripheral Broadcast - Central" }, + { 1, "Connectionless Peripheral Broadcast - Peripheral"}, + { 2, "Synchronization Train" }, + { 3, "Synchronization Scan" }, + { 4, "Inquiry Response Notification Event" }, + { 5, "Generalized interlaced scan" }, + { 6, "Coarse Clock Adjustment" }, + { 8, "Secure Connections (Controller Support)" }, + { 9, "Ping" }, + { 10, "Slot Availability Mask" }, + { 11, "Train nudging" }, { } }; @@ -2982,11 +2982,11 @@ static const struct bitfield_data events_page2_table[] = { { 14, "Triggered Clock Capture" }, { 15, "Synchronization Train Complete" }, { 16, "Synchronization Train Received" }, - { 17, "Connectionless Slave Broadcast Receive" }, - { 18, "Connectionless Slave Broadcast Timeout" }, + { 17, "Connectionless Peripheral Broadcast Receive" }, + { 18, "Connectionless Peripheral Broadcast Timeout" }, { 19, "Truncated Page Complete" }, { 20, "Slave Page Response Timeout" }, - { 21, "Connectionless Slave Broadcast Channel Map Change" }, + { 21, "Connectionless Peripheral Broadcast Channel Map Change" }, { 22, "Inquiry Response Notification" }, { 23, "Authenticated Payload Timeout Expired" }, { 24, "SAM Status Change" }, @@ -4547,9 +4547,9 @@ static void truncated_page_cancel_cmd(const void *data, uint8_t size) print_bdaddr(cmd->bdaddr); } -static void set_slave_broadcast_cmd(const void *data, uint8_t size) +static void set_peripheral_broadcast_cmd(const void *data, uint8_t size) { - const struct bt_hci_cmd_set_slave_broadcast *cmd = data; + const struct bt_hci_cmd_set_peripheral_broadcast *cmd = data; print_field("Enable: 0x%2.2x", cmd->enable); print_lt_addr(cmd->lt_addr); @@ -4560,18 +4560,18 @@ static void set_slave_broadcast_cmd(const void *data, uint8_t size) print_slot_625("Supervision timeout", cmd->timeout); } -static void set_slave_broadcast_rsp(const void *data, uint8_t size) +static void set_peripheral_broadcast_rsp(const void *data, uint8_t size) { - const struct bt_hci_rsp_set_slave_broadcast *rsp = data; + const struct bt_hci_rsp_set_peripheral_broadcast *rsp = data; print_status(rsp->status); print_lt_addr(rsp->lt_addr); print_interval(rsp->interval); } -static void set_slave_broadcast_receive_cmd(const void *data, uint8_t size) +static void set_peripheral_broadcast_receive_cmd(const void *data, uint8_t size) { - const struct bt_hci_cmd_set_slave_broadcast_receive *cmd = data; + const struct bt_hci_cmd_set_peripheral_broadcast_receive *cmd = data; print_field("Enable: 0x%2.2x", cmd->enable); print_bdaddr(cmd->bdaddr); @@ -4587,9 +4587,9 @@ static void set_slave_broadcast_receive_cmd(const void *data, uint8_t size) print_channel_map(cmd->map); } -static void set_slave_broadcast_receive_rsp(const void *data, uint8_t size) +static void set_peripheral_broadcast_receive_rsp(const void *data, uint8_t size) { - const struct bt_hci_rsp_set_slave_broadcast_receive *rsp = data; + const struct bt_hci_rsp_set_peripheral_broadcast_receive *rsp = data; print_status(rsp->status); print_bdaddr(rsp->bdaddr); @@ -5658,9 +5658,9 @@ static void delete_reserved_lt_addr_rsp(const void *data, uint8_t size) print_lt_addr(rsp->lt_addr); } -static void set_slave_broadcast_data_cmd(const void *data, uint8_t size) +static void set_peripheral_broadcast_data_cmd(const void *data, uint8_t size) { - const struct bt_hci_cmd_set_slave_broadcast_data *cmd = data; + const struct bt_hci_cmd_set_peripheral_broadcast_data *cmd = data; print_lt_addr(cmd->lt_addr); print_broadcast_fragment(cmd->fragment); @@ -5673,9 +5673,9 @@ static void set_slave_broadcast_data_cmd(const void *data, uint8_t size) packet_hexdump(data + 3, size - 3); } -static void set_slave_broadcast_data_rsp(const void *data, uint8_t size) +static void set_peripheral_broadcast_data_rsp(const void *data, uint8_t size) { - const struct bt_hci_rsp_set_slave_broadcast_data *rsp = data; + const struct bt_hci_rsp_set_peripheral_broadcast_data *rsp = data; print_status(rsp->status); print_lt_addr(rsp->lt_addr); @@ -8490,12 +8490,12 @@ static const struct opcode_data opcode_table[] = { { 0x0440, 247, "Truncated Page Cancel", truncated_page_cancel_cmd, 6, true, status_bdaddr_rsp, 7, true }, - { 0x0441, 248, "Set Connectionless Slave Broadcast", - set_slave_broadcast_cmd, 11, true, - set_slave_broadcast_rsp, 4, true }, - { 0x0442, 249, "Set Connectionless Slave Broadcast Receive", - set_slave_broadcast_receive_cmd, 34, true, - set_slave_broadcast_receive_rsp, 8, true }, + { 0x0441, 248, "Set Connectionless Peripheral Broadcast", + set_peripheral_broadcast_cmd, 11, true, + set_peripheral_broadcast_rsp, 4, true }, + { 0x0442, 249, "Set Connectionless Peripheral Broadcast Receive", + set_peripheral_broadcast_receive_cmd, 34, true, + set_peripheral_broadcast_receive_rsp, 8, true }, { 0x0443, 250, "Start Synchronization Train", null_cmd, 0, true }, { 0x0444, 251, "Receive Synchronization Train", @@ -8796,9 +8796,9 @@ static const struct opcode_data opcode_table[] = { { 0x0c75, 253, "Delete Reserved LT_ADDR", delete_reserved_lt_addr_cmd, 1, true, delete_reserved_lt_addr_rsp, 2, true }, - { 0x0c76, 254, "Set Connectionless Slave Broadcast Data", - set_slave_broadcast_data_cmd, 3, false, - set_slave_broadcast_data_rsp, 2, true }, + { 0x0c76, 254, "Set Connectionless Peripheral Broadcast Data", + set_peripheral_broadcast_data_cmd, 3, false, + set_peripheral_broadcast_data_rsp, 2, true }, { 0x0c77, 255, "Read Synchronization Train Parameters", null_cmd, 0, true, read_sync_train_params_rsp, 8, true }, @@ -10200,9 +10200,9 @@ static void sync_train_received_evt(const void *data, uint8_t size) print_field("Service Data: 0x%2.2x", evt->service_data); } -static void slave_broadcast_receive_evt(const void *data, uint8_t size) +static void peripheral_broadcast_receive_evt(const void *data, uint8_t size) { - const struct bt_hci_evt_slave_broadcast_receive *evt = data; + const struct bt_hci_evt_peripheral_broadcast_receive *evt = data; print_bdaddr(evt->bdaddr); print_lt_addr(evt->lt_addr); @@ -10222,9 +10222,9 @@ static void slave_broadcast_receive_evt(const void *data, uint8_t size) packet_hexdump(data + 18, size - 18); } -static void slave_broadcast_timeout_evt(const void *data, uint8_t size) +static void peripheral_broadcast_timeout_evt(const void *data, uint8_t size) { - const struct bt_hci_evt_slave_broadcast_timeout *evt = data; + const struct bt_hci_evt_peripheral_broadcast_timeout *evt = data; print_bdaddr(evt->bdaddr); print_lt_addr(evt->lt_addr); @@ -10242,9 +10242,10 @@ static void slave_page_response_timeout_evt(const void *data, uint8_t size) { } -static void slave_broadcast_channel_map_change_evt(const void *data, uint8_t size) +static void peripheral_broadcast_channel_map_change_evt(const void *data, + uint8_t size) { - const struct bt_hci_evt_slave_broadcast_channel_map_change *evt = data; + const struct bt_hci_evt_peripheral_broadcast_channel_map_change *evt = data; print_channel_map(evt->map); } @@ -11190,16 +11191,16 @@ static const struct event_data event_table[] = { sync_train_complete_evt, 1, true }, { 0x50, "Synchronization Train Received", sync_train_received_evt, 29, true }, - { 0x51, "Connectionless Slave Broadcast Receive", - slave_broadcast_receive_evt, 18, false }, - { 0x52, "Connectionless Slave Broadcast Timeout", - slave_broadcast_timeout_evt, 7, true }, + { 0x51, "Connectionless Peripheral Broadcast Receive", + peripheral_broadcast_receive_evt, 18, false }, + { 0x52, "Connectionless Peripheral Broadcast Timeout", + peripheral_broadcast_timeout_evt, 7, true }, { 0x53, "Truncated Page Complete", truncated_page_complete_evt, 7, true }, { 0x54, "Slave Page Response Timeout", slave_page_response_timeout_evt, 0, true }, - { 0x55, "Connectionless Slave Broadcast Channel Map Change", - slave_broadcast_channel_map_change_evt, 10, true }, + { 0x55, "Connectionless Peripheral Broadcast Channel Map Change", + peripheral_broadcast_channel_map_change_evt, 10, true }, { 0x56, "Inquiry Response Notification", inquiry_response_notify_evt, 4, true }, { 0x57, "Authenticated Payload Timeout Expired", diff --git a/tools/3dsp.c b/tools/3dsp.c index 99c1ac82bc..4dd53478e1 100644 --- a/tools/3dsp.c +++ b/tools/3dsp.c @@ -122,7 +122,7 @@ static void sync_train_received(const void *data, uint8_t size, void *user_data) { const struct bt_hci_evt_sync_train_received *evt = data; - struct bt_hci_cmd_set_slave_broadcast_receive cmd; + struct bt_hci_cmd_set_peripheral_broadcast_receive cmd; if (evt->status) { printf("Failed to synchronize with 3D display\n"); @@ -147,7 +147,7 @@ static void sync_train_received(const void *data, uint8_t size, cmd.pkt_type = cpu_to_le16(PKT_TYPE); memcpy(cmd.map, evt->map, 10); - bt_hci_send(hci_dev, BT_HCI_CMD_SET_SLAVE_BROADCAST_RECEIVE, + bt_hci_send(hci_dev, BT_HCI_CMD_SET_PERIPHERAL_BROADCAST_RECEIVE, &cmd, sizeof(cmd), set_slave_broadcast_receive, NULL, NULL); } @@ -156,7 +156,7 @@ static void brcm_sync_train_received(const void *data, uint8_t size, void *user_data) { const struct brcm_evt_sync_train_received *evt = data; - struct bt_hci_cmd_set_slave_broadcast_receive cmd; + struct bt_hci_cmd_set_peripheral_broadcast_receive cmd; if (evt->status) { printf("Failed to synchronize with 3D display\n"); @@ -181,7 +181,7 @@ static void brcm_sync_train_received(const void *data, uint8_t size, cmd.pkt_type = cpu_to_le16(PKT_TYPE); memcpy(cmd.map, evt->map, 10); - bt_hci_send(hci_dev, BT_HCI_CMD_SET_SLAVE_BROADCAST_RECEIVE, + bt_hci_send(hci_dev, BT_HCI_CMD_SET_PERIPHERAL_BROADCAST_RECEIVE, &cmd, sizeof(cmd), set_slave_broadcast_receive, NULL, NULL); } @@ -212,7 +212,7 @@ static void truncated_page_complete(const void *data, uint8_t size, static void slave_broadcast_timeout(const void *data, uint8_t size, void *user_data) { - const struct bt_hci_evt_slave_broadcast_timeout *evt = data; + const struct bt_hci_evt_peripheral_broadcast_timeout *evt = data; struct bt_hci_cmd_receive_sync_train cmd; printf("Re-synchronizing with 3D display\n"); @@ -229,7 +229,7 @@ static void slave_broadcast_timeout(const void *data, uint8_t size, static void slave_broadcast_receive(const void *data, uint8_t size, void *user_data) { - const struct bt_hci_evt_slave_broadcast_receive *evt = data; + const struct bt_hci_evt_peripheral_broadcast_receive *evt = data; struct bt_hci_cmd_read_clock cmd; if (evt->status != 0x00) @@ -326,9 +326,9 @@ static void start_glasses(void) bt_hci_register(hci_dev, BT_HCI_EVT_TRUNCATED_PAGE_COMPLETE, truncated_page_complete, NULL, NULL); - bt_hci_register(hci_dev, BT_HCI_EVT_SLAVE_BROADCAST_TIMEOUT, + bt_hci_register(hci_dev, BT_HCI_EVT_PERIPHERAL_BROADCAST_TIMEOUT, slave_broadcast_timeout, NULL, NULL); - bt_hci_register(hci_dev, BT_HCI_EVT_SLAVE_BROADCAST_RECEIVE, + bt_hci_register(hci_dev, BT_HCI_EVT_PERIPHERAL_BROADCAST_RECEIVE, slave_broadcast_receive, NULL, NULL); start_inquiry(); @@ -443,13 +443,13 @@ static void read_clock(const void *data, uint8_t size, void *user_data) msg.frame_sync_period_fraction = 0; memcpy(bcastdata + 3, &msg, sizeof(msg)); - bt_hci_send(hci_dev, BT_HCI_CMD_SET_SLAVE_BROADCAST_DATA, + bt_hci_send(hci_dev, BT_HCI_CMD_SET_PERIPHERAL_BROADCAST_DATA, bcastdata, sizeof(bcastdata), NULL, NULL, NULL); } static void set_slave_broadcast(const void *data, uint8_t size, void *user_data) { - const struct bt_hci_rsp_set_slave_broadcast *rsp = data; + const struct bt_hci_rsp_set_peripheral_broadcast *rsp = data; struct bt_hci_cmd_read_clock cmd; if (rsp->status) { @@ -467,7 +467,7 @@ static void set_slave_broadcast(const void *data, uint8_t size, void *user_data) static void start_display(void) { - struct bt_hci_cmd_set_slave_broadcast cmd; + struct bt_hci_cmd_set_peripheral_broadcast cmd; uint8_t evtmask1[] = { 0x1c, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; uint8_t evtmask2[] = { 0x00, 0xc0, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00 }; uint8_t sspmode = 0x01; @@ -494,8 +494,9 @@ static void start_display(void) bt_hci_register(hci_dev, BT_HCI_EVT_SLAVE_PAGE_RESPONSE_TIMEOUT, slave_page_response_timeout, NULL, NULL); - bt_hci_register(hci_dev, BT_HCI_EVT_SLAVE_BROADCAST_CHANNEL_MAP_CHANGE, - slave_broadcast_channel_map_change, NULL, NULL); + bt_hci_register(hci_dev, + BT_HCI_EVT_PERIPHERAL_BROADCAST_CHANNEL_MAP_CHANGE, + slave_broadcast_channel_map_change, NULL, NULL); bt_hci_register(hci_dev, BT_HCI_EVT_SYNC_TRAIN_COMPLETE, sync_train_complete, NULL, NULL); @@ -510,8 +511,8 @@ static void start_display(void) cmd.max_interval = cpu_to_le16(0x00a0); /* 100 ms */ cmd.timeout = cpu_to_le16(0xfffe); - bt_hci_send(hci_dev, BT_HCI_CMD_SET_SLAVE_BROADCAST, &cmd, sizeof(cmd), - set_slave_broadcast, NULL, NULL); + bt_hci_send(hci_dev, BT_HCI_CMD_SET_PERIPHERAL_BROADCAST, &cmd, + sizeof(cmd), set_slave_broadcast, NULL, NULL); } static void signal_callback(int signum, void *user_data) From patchwork Fri Aug 13 12:18:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 496659 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.2 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, URIBL_BLOCKED, 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 8DDC6C432BE for ; Fri, 13 Aug 2021 12:20:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 78078610E9 for ; Fri, 13 Aug 2021 12:20:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240328AbhHMMVJ (ORCPT ); Fri, 13 Aug 2021 08:21:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240293AbhHMMVJ (ORCPT ); Fri, 13 Aug 2021 08:21:09 -0400 Received: from mail-pj1-x1049.google.com (mail-pj1-x1049.google.com [IPv6:2607:f8b0:4864:20::1049]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A61A9C061756 for ; Fri, 13 Aug 2021 05:20:42 -0700 (PDT) Received: by mail-pj1-x1049.google.com with SMTP id a12-20020a17090aa50cb0290178fef5c227so5192550pjq.1 for ; Fri, 13 Aug 2021 05:20:42 -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=tA769l60HUHyo6fM7OVi5B5wDNo4DDO5JlDqM1bdQgA=; b=cErS8Nnd/RnOgq3XkBHZCmi5DxllX3JwuuJFvkxgZW+zmW2MPv2t2nnHrTRnNl/Vkc knN7jVPZ4FmlltzJlzJKrqYo/td1ARCGC0jT2iyrrQ6vK3yn28Ai+R3DEvTeph0SrLNA uYxkAk89bon90t04rUG9vZGtDuGN345lpSsTzoXNx1qdqaeple4tS8a5EAPdb02DmxQC ZDAjwUR0p7Z9MQDqacHgNRVQkX+C22nPe0PwEhNhvw3fK0a/fBkKIn5nK5AnlHq8d2Uu JuQ5cP78EHHRBxUmMP6T4Lx4riW8/Zoap7M+pcZ6SOTgD5D308r3F5KhO008op3VmtVT OsOw== 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=tA769l60HUHyo6fM7OVi5B5wDNo4DDO5JlDqM1bdQgA=; b=QXceJqW5COL57kqc3E0nyViKfl5aYBebj+5gtNDCYqcoljZDZfAK1U/Z9IsSPf8Vy0 Efy/iCjEpqTlh/wGLJJ4h/czDZEnUBtHvMJu1P1ga38vkyImbFwFvRpKti77nAap39bl afLrInq27e4xQ7ww5SiogexOCeCpkDuVnYTAH/sHVwuqkH6XZLI2Lu2TpgprYlayDrQJ q/856RXgwMIcpzUPBS8er5zqBlrEfcuyuw/uwgtzFDYiS06He96vRZd3WK657if2Dk3o Frb7vLlQsbpNhjkfbuKPqf3UsoPxsWHHRc9IvDrTicmTaaeTzeDBuDEgWLHrRGtLEfhq NDOA== X-Gm-Message-State: AOAM530v0rvsh5yJQdyuiyIrqbsvf5UJSho+wHKlhORSt9lUOaOaRUTy Arb7SVZ8UhxzIflFsG3lnkywFjey+V1KKe40KQsqrxcKZZE4etOHyZshgREFwvPdOxM/QXWVhQh Wh7GrKV4zkfBwhQRGwyvNsmngPstTzrXz/gYvx8nrhMtrlUtRQvioL4zJpj/zGGvRvXccaKlUbO Yq X-Google-Smtp-Source: ABdhPJwuA6jNzd4C6moCos6T8+l8bfbp74xxMuXDcpATpLPvv6QRZVd9qA4dt5YlDRksMvUxTFMV9ew8m7Ub X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:aa7:80d9:0:b029:2ed:49fa:6dc5 with SMTP id a25-20020aa780d90000b02902ed49fa6dc5mr2153648pfn.3.1628857242107; Fri, 13 Aug 2021 05:20:42 -0700 (PDT) Date: Fri, 13 Aug 2021 20:18:03 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.18.I459ed503caa6f462dc67f27296d57889af13a864@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 18/62] monitor: Inclusive language in peripheral page response timeout 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 "peripheral" is preferred, as reflected in the BT core spec 5.3. --- monitor/bt.h | 2 +- monitor/packet.c | 8 ++++---- tools/3dsp.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/monitor/bt.h b/monitor/bt.h index 4aa11e53a5..3144c25ff0 100644 --- a/monitor/bt.h +++ b/monitor/bt.h @@ -3348,7 +3348,7 @@ struct bt_hci_evt_truncated_page_complete { uint8_t bdaddr[6]; } __attribute__ ((packed)); -#define BT_HCI_EVT_SLAVE_PAGE_RESPONSE_TIMEOUT 0x54 +#define BT_HCI_EVT_PERIPHERAL_PAGE_RESPONSE_TIMEOUT 0x54 #define BT_HCI_EVT_PERIPHERAL_BROADCAST_CHANNEL_MAP_CHANGE 0x55 struct bt_hci_evt_peripheral_broadcast_channel_map_change { diff --git a/monitor/packet.c b/monitor/packet.c index a787cb2854..55f275ab3a 100644 --- a/monitor/packet.c +++ b/monitor/packet.c @@ -2985,7 +2985,7 @@ static const struct bitfield_data events_page2_table[] = { { 17, "Connectionless Peripheral Broadcast Receive" }, { 18, "Connectionless Peripheral Broadcast Timeout" }, { 19, "Truncated Page Complete" }, - { 20, "Slave Page Response Timeout" }, + { 20, "Peripheral Page Response Timeout" }, { 21, "Connectionless Peripheral Broadcast Channel Map Change" }, { 22, "Inquiry Response Notification" }, { 23, "Authenticated Payload Timeout Expired" }, @@ -10238,7 +10238,7 @@ static void truncated_page_complete_evt(const void *data, uint8_t size) print_bdaddr(evt->bdaddr); } -static void slave_page_response_timeout_evt(const void *data, uint8_t size) +static void peripheral_page_response_timeout_evt(const void *data, uint8_t size) { } @@ -11197,8 +11197,8 @@ static const struct event_data event_table[] = { peripheral_broadcast_timeout_evt, 7, true }, { 0x53, "Truncated Page Complete", truncated_page_complete_evt, 7, true }, - { 0x54, "Slave Page Response Timeout", - slave_page_response_timeout_evt, 0, true }, + { 0x54, "Peripheral Page Response Timeout", + peripheral_page_response_timeout_evt, 0, true }, { 0x55, "Connectionless Peripheral Broadcast Channel Map Change", peripheral_broadcast_channel_map_change_evt, 10, true }, { 0x56, "Inquiry Response Notification", diff --git a/tools/3dsp.c b/tools/3dsp.c index 4dd53478e1..5227c30b63 100644 --- a/tools/3dsp.c +++ b/tools/3dsp.c @@ -492,7 +492,7 @@ static void start_display(void) bt_hci_register(hci_dev, BT_HCI_EVT_CONN_REQUEST, conn_request, NULL, NULL); - bt_hci_register(hci_dev, BT_HCI_EVT_SLAVE_PAGE_RESPONSE_TIMEOUT, + bt_hci_register(hci_dev, BT_HCI_EVT_PERIPHERAL_PAGE_RESPONSE_TIMEOUT, slave_page_response_timeout, NULL, NULL); bt_hci_register(hci_dev, BT_HCI_EVT_PERIPHERAL_BROADCAST_CHANNEL_MAP_CHANGE, From patchwork Fri Aug 13 12:18: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: 497155 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.2 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, URIBL_BLOCKED, 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 195D9C4338F for ; Fri, 13 Aug 2021 12:20:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F218E610CF for ; Fri, 13 Aug 2021 12:20:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240384AbhHMMVU (ORCPT ); Fri, 13 Aug 2021 08:21:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240385AbhHMMVN (ORCPT ); Fri, 13 Aug 2021 08:21:13 -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 B7A7EC061756 for ; Fri, 13 Aug 2021 05:20:46 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id w200-20020a25c7d10000b02905585436b530so9003452ybe.21 for ; Fri, 13 Aug 2021 05:20:46 -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=CmM64fNHZY9Yed14Z40B1/olix7ObnccUkDGcrE7PBE=; b=I+iP19G+b4eJ1lZldaQlWhex0fKgu+STwhAb2IhATpc1s8wWEdBOl/wXFY+3RQmXyI 3Ocv1rWJ1hPP9AHDC38WbVBNGWBFNQPCrcdE3Wdm/6NZAs6Cssy1IpKQRTrtZo4fkaHu q1yA5BP0QEtBQIePEENojxDWjLGz335LHa6pMSInFG5fUg8qE1Y8qCtVej5lt2tZJ72L zvrbM0M5XBHZ2xcY4SBcDEpSPDfJRBtrgn8PqVNcG6qiVNMWoklAUYdgo4AVZN2KelTr xR4qwGx10FL6E3bv8fxbmjjeeJ5TwN0JE+g+jIrXvJpW29xqZ6gTrXMnhbB2skJstuij dt5g== 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=CmM64fNHZY9Yed14Z40B1/olix7ObnccUkDGcrE7PBE=; b=bmP5wbq3LUwSxBbSgLkprcNU+6uiDWPUn2CG4XbqX+P5OjQjANPmBMXZ6VF+zzjgaj iexT6n8dzd5+BzDaAKrz1Nw+EcXONCE8kLRhv30V1lA0zmCJ0iaGqfejWbPMG2vupCBj OnVaNxbpYrtAoNyrX0uCrzO07pXcu2l3pIC0aSAoBWk6mMwnyspzwmg+47kX/7w6fF1I pDmjVOufkCXJZwZc9U8cC1ukxn37435whNyXwDmOGI+xSc5zDkxdcE84y1Jzu2IpUEk7 VxR1z9HcYEQ5Z17PNLEyPOb4B9m9d2j93lUZkahRdFf26t/IzVwQ7pz6qutVeY6esr9e pWJg== X-Gm-Message-State: AOAM5304l299amaDVvjAVLgknv1Iyh10dBO8rOYWP7tfyHk5qTZwjIf1 TN15Yow2FlNTjj2TNaOSO49Rt/92rnUApWje26CMragYD7hyGZit32uOIptZC69tF2PxHm7JlrE sIjTNuinOo3D6hoEuFuzuCyj0x01IEDlPN2n2Q2EFXYUndsZIHDHl5rjgrszMxcgyjE5Hjpu1d+ 8G X-Google-Smtp-Source: ABdhPJyTRML8SuVipV6BUqST69DYE+y2ocNsSDOCfdrUEVIDbOP8D3azb3JZH3aeprr2rF/G2LV7eaqZxjaE X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a25:9b03:: with SMTP id y3mr2491927ybn.264.1628857245913; Fri, 13 Aug 2021 05:20:45 -0700 (PDT) Date: Fri, 13 Aug 2021 20:18:04 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.19.Ie6d2c61363aea99e926343e7b4f6123062d00f83@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 19/62] monitor: Inclusive language in consts and strings 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 "central" and "peripheral" are preferred, as reflected in the BT core spec 5.3. --- monitor/broadcom.c | 8 ++-- monitor/control.c | 10 ++-- monitor/l2cap.c | 2 +- monitor/ll.c | 42 +++++++++-------- monitor/lmp.c | 2 +- monitor/packet.c | 114 +++++++++++++++++++++++---------------------- 6 files changed, 93 insertions(+), 85 deletions(-) diff --git a/monitor/broadcom.c b/monitor/broadcom.c index b144032c3e..e30116735b 100644 --- a/monitor/broadcom.c +++ b/monitor/broadcom.c @@ -120,10 +120,10 @@ static void print_sync_mode(uint8_t mode) switch (mode) { case 0x00: - str = "Slave"; + str = "Peripheral"; break; case 0x01: - str = "Master"; + str = "Central"; break; default: str = "Reserved"; @@ -139,10 +139,10 @@ static void print_clock_mode(uint8_t mode) switch (mode) { case 0x00: - str = "Slave"; + str = "Peripheral"; break; case 0x01: - str = "Master"; + str = "Central"; break; default: str = "Reserved"; diff --git a/monitor/control.c b/monitor/control.c index 97d7e789c4..fac1f8e1ff 100644 --- a/monitor/control.c +++ b/monitor/control.c @@ -305,19 +305,19 @@ static void mgmt_new_long_term_key(uint16_t len, const void *buf) return; } - /* LE SC keys are both for master and slave */ + /* LE SC keys are both for central and peripheral */ switch (ev->key.type) { case 0x00: if (ev->key.central) - type = "Master (Unauthenticated)"; + type = "Central (Unauthenticated)"; else - type = "Slave (Unauthenticated)"; + type = "Peripheral (Unauthenticated)"; break; case 0x01: if (ev->key.central) - type = "Master (Authenticated)"; + type = "Central (Authenticated)"; else - type = "Slave (Authenticated)"; + type = "Peripheral (Authenticated)"; break; case 0x02: type = "SC (Unauthenticated)"; diff --git a/monitor/l2cap.c b/monitor/l2cap.c index 109bc16b44..646f0f66cb 100644 --- a/monitor/l2cap.c +++ b/monitor/l2cap.c @@ -1280,7 +1280,7 @@ static void sig_conn_param_req(const struct l2cap_frame *frame) print_field("Min interval: %d", le16_to_cpu(pdu->min_interval)); print_field("Max interval: %d", le16_to_cpu(pdu->max_interval)); - print_field("Slave latency: %d", le16_to_cpu(pdu->latency)); + print_field("Peripheral latency: %d", le16_to_cpu(pdu->latency)); print_field("Timeout multiplier: %d", le16_to_cpu(pdu->timeout)); } diff --git a/monitor/ll.c b/monitor/ll.c index d0db9194bd..f588d5e992 100644 --- a/monitor/ll.c +++ b/monitor/ll.c @@ -186,7 +186,7 @@ static void advertising_packet(const void *data, uint8_t size) print_field("Transmit window size: %u", win_size); print_field("Transmit window offset: %u", win_offset); print_field("Connection interval: %u", interval); - print_field("Connection slave latency: %u", latency); + print_field("Connection peripheral latency: %u", latency); print_field("Connection supervision timeout: %u", timeout); packet_print_channel_map_ll(ptr + 30); @@ -371,8 +371,10 @@ static void conn_update_req(const void *data, uint8_t size) print_field("Transmit window size: %u", pdu->win_size); print_field("Transmit window offset: %u", le16_to_cpu(pdu->win_offset)); print_field("Connection interval: %u", le16_to_cpu(pdu->interval)); - print_field("Connection slave latency: %u", le16_to_cpu(pdu->latency)); - print_field("Connection supervision timeout: %u", le16_to_cpu(pdu->timeout)); + print_field("Connection peripheral latency: %u", + le16_to_cpu(pdu->latency)); + print_field("Connection supervision timeout: %u", + le16_to_cpu(pdu->timeout)); print_field("Connection instant: %u", le16_to_cpu(pdu->instant)); } @@ -397,16 +399,16 @@ static void enc_req(const void *data, uint8_t size) print_field("Rand: 0x%16.16" PRIx64, le64_to_cpu(pdu->rand)); print_field("EDIV: 0x%4.4x", le16_to_cpu(pdu->ediv)); - print_field("SKD (master): 0x%16.16" PRIx64, le64_to_cpu(pdu->skd)); - print_field("IV (master): 0x%8.8x", le32_to_cpu(pdu->iv)); + print_field("SKD (central): 0x%16.16" PRIx64, le64_to_cpu(pdu->skd)); + print_field("IV (central): 0x%8.8x", le32_to_cpu(pdu->iv)); } static void enc_rsp(const void *data, uint8_t size) { const struct bt_ll_enc_rsp *pdu = data; - print_field("SKD (slave): 0x%16.16" PRIx64, le64_to_cpu(pdu->skd)); - print_field("IV (slave): 0x%8.8x", le32_to_cpu(pdu->iv)); + print_field("SKD (peripheral): 0x%16.16" PRIx64, le64_to_cpu(pdu->skd)); + print_field("IV (peripheral): 0x%8.8x", le32_to_cpu(pdu->iv)); } static const char *opcode_to_string(uint8_t opcode); @@ -505,14 +507,14 @@ static void phy_update_ind(const void *data, uint8_t size) const struct bt_ll_phy_update_ind *pdu = data; uint8_t mask; - print_field("M_TO_S_PHY: 0x%2.2x", pdu->c_phy); + print_field("C_TO_P_PHY: 0x%2.2x", pdu->c_phy); mask = print_bitfield(2, pdu->c_phy, le_phys); if (mask) print_text(COLOR_UNKNOWN_OPTIONS_BIT, " Reserved" " (0x%2.2x)", mask); - print_field("S_TO_M_PHY: 0x%2.2x", pdu->p_phy); + print_field("P_TO_C_PHY: 0x%2.2x", pdu->p_phy); mask = print_bitfield(2, pdu->p_phy, le_phys); if (mask) @@ -596,38 +598,40 @@ static void cis_req(const void *data, uint8_t size) print_field("CIG ID: 0x%2.2x", cmd->cig); print_field("CIS ID: 0x%2.2x", cmd->cis); - print_field("Master to Slave PHY: 0x%2.2x", cmd->c_phy); + print_field("Central to Peripheral PHY: 0x%2.2x", cmd->c_phy); mask = print_bitfield(2, cmd->c_phy, le_phys); if (mask) print_text(COLOR_UNKNOWN_OPTIONS_BIT, " Reserved" " (0x%2.2x)", mask); - print_field("Slave To Master PHY: 0x%2.2x", cmd->p_phy); + print_field("Peripheral To Central PHY: 0x%2.2x", cmd->p_phy); mask = print_bitfield(2, cmd->p_phy, le_phys); if (mask) print_text(COLOR_UNKNOWN_OPTIONS_BIT, " Reserved" " (0x%2.2x)", mask); - print_field("Master to Slave Maximum SDU: %u", cmd->c_sdu); - print_field("Slave to Master Maximum SDU: %u", cmd->p_sdu); + print_field("Central to Peripheral Maximum SDU: %u", cmd->c_sdu); + print_field("Peripheral to Central Maximum SDU: %u", cmd->p_sdu); memcpy(&interval, cmd->c_interval, sizeof(cmd->c_interval)); - print_field("Master to Slave Interval: 0x%6.6x", le32_to_cpu(interval)); + print_field("Central to Peripheral Interval: 0x%6.6x", + le32_to_cpu(interval)); memcpy(&interval, cmd->p_interval, sizeof(cmd->p_interval)); - print_field("Slave to Master Interval: 0x%6.6x", le32_to_cpu(interval)); + print_field("Peripheral to Central Interval: 0x%6.6x", + le32_to_cpu(interval)); - print_field("Master to Slave Maximum PDU: %u", cmd->c_pdu); - print_field("Slave to Master Maximum PDU: %u", cmd->p_pdu); + print_field("Central to Peripheral Maximum PDU: %u", cmd->c_pdu); + print_field("Peripheral to Central Maximum PDU: %u", cmd->p_pdu); print_field("Burst Number: %u us", cmd->bn); memcpy(&interval, cmd->sub_interval, sizeof(cmd->sub_interval)); print_field("Sub-Interval: 0x%6.6x", le32_to_cpu(interval)); - print_field("Master to Slave Flush Timeout: %u", cmd->c_ft); - print_field("Slave to Master Flush Timeout: %u", cmd->p_ft); + print_field("Central to Peripheral Flush Timeout: %u", cmd->c_ft); + print_field("Peripheral to Central Flush Timeout: %u", cmd->p_ft); print_field("ISO Interval: 0x%4.4x", le16_to_cpu(cmd->iso_interval)); diff --git a/monitor/lmp.c b/monitor/lmp.c index 0d17f5c986..f6ad3f2568 100644 --- a/monitor/lmp.c +++ b/monitor/lmp.c @@ -839,7 +839,7 @@ void lmp_packet(const void *data, uint8_t size, bool padded) tid = ((const uint8_t *) data)[0] & 0x01; opcode = (((const uint8_t *) data)[0] & 0xfe) >> 1; - tid_str = tid == 0x00 ? "Master" : "Slave"; + tid_str = tid == 0x00 ? "Central" : "Peripheral"; switch (opcode) { case 127: diff --git a/monitor/packet.c b/monitor/packet.c index 55f275ab3a..17da5a08d9 100644 --- a/monitor/packet.c +++ b/monitor/packet.c @@ -2227,10 +2227,10 @@ static void print_role(uint8_t role) switch (role) { case 0x00: - str = "Master"; + str = "Central"; break; case 0x01: - str = "Slave"; + str = "Peripheral"; break; default: str = "Reserved"; @@ -2549,16 +2549,16 @@ static const struct bitfield_data features_page0[] = { { 31, "Extended SCO link (EV3 packets)" }, { 32, "EV4 packets" }, { 33, "EV5 packets" }, - { 35, "AFH capable slave" }, - { 36, "AFH classification slave" }, + { 35, "AFH capable peripheral" }, + { 36, "AFH classification peripheral" }, { 37, "BR/EDR Not Supported" }, { 38, "LE Supported (Controller)" }, { 39, "3-slot Enhanced Data Rate ACL packets" }, { 40, "5-slot Enhanced Data Rate ACL packets" }, { 41, "Sniff subrating" }, { 42, "Pause encryption" }, - { 43, "AFH capable master" }, - { 44, "AFH classification master" }, + { 43, "AFH capable central" }, + { 44, "AFH classification central" }, { 45, "Enhanced Data Rate eSCO 2 Mbps mode" }, { 46, "Enhanced Data Rate eSCO 3 Mbps mode" }, { 47, "3-slot Enhanced Data Rate eSCO packets" }, @@ -2602,7 +2602,7 @@ static const struct bitfield_data features_le[] = { { 0, "LE Encryption" }, { 1, "Connection Parameter Request Procedure" }, { 2, "Extended Reject Indication" }, - { 3, "Slave-initiated Features Exchange" }, + { 3, "Peripheral-initiated Features Exchange" }, { 4, "LE Ping" }, { 5, "LE Data Packet Length Extension" }, { 6, "LL Privacy" }, @@ -2627,8 +2627,8 @@ static const struct bitfield_data features_le[] = { { 25, "Periodic Advertising Sync Transfer - Recipient" }, { 26, "Sleep Clock Accuracy Updates" }, { 27, "Remote Public Key Validation" }, - { 28, "Connected Isochronous Stream - Master" }, - { 29, "Connected Isochronous Stream - Slave" }, + { 28, "Connected Isochronous Stream - Central" }, + { 29, "Connected Isochronous Stream - Peripheral" }, { 30, "Isochronous Broadcaster" }, { 31, "Synchronized Receiver" }, { 32, "Isochronous Channels (Host Support)" }, @@ -2737,11 +2737,11 @@ static const struct bitfield_data le_states_desc_table[] = { { 5, "Active Scanning State" }, { 6, "Passive Scanning State" }, { 7, "Initiating State" }, - { 8, "Connection State (Master Role)" }, - { 9, "Connection State (Slave Role)" }, - { 10, "Master Role & Master Role" }, - { 11, "Slave Role & Slave Role" }, - { 12, "Master Role & Slave Role" }, + { 8, "Connection State (Central Role)" }, + { 9, "Connection State (Peripheral Role)" }, + { 10, "Central Role & Central Role" }, + { 11, "Peripheral Role & Peripheral Role" }, + { 12, "Central Role & Peripheral Role" }, { } }; @@ -3058,7 +3058,7 @@ static void print_fec(uint8_t fec) #define BT_EIR_DEVICE_ID 0x10 #define BT_EIR_SMP_TK 0x10 #define BT_EIR_SMP_OOB_FLAGS 0x11 -#define BT_EIR_SLAVE_CONN_INTERVAL 0x12 +#define BT_EIR_PERIPHERAL_CONN_INTERVAL 0x12 #define BT_EIR_SERVICE_UUID16 0x14 #define BT_EIR_SERVICE_UUID128 0x15 #define BT_EIR_SERVICE_DATA 0x16 @@ -3668,10 +3668,10 @@ static void print_eir(const uint8_t *eir, uint8_t eir_len, bool le) print_field("SMP OOB Flags: 0x%2.2x", *data); break; - case BT_EIR_SLAVE_CONN_INTERVAL: + case BT_EIR_PERIPHERAL_CONN_INTERVAL: if (data_len < 4) break; - print_field("Slave Conn. Interval: 0x%4.4x - 0x%4.4x", + print_field("Peripheral Conn. Interval: 0x%4.4x - 0x%4.4x", get_le16(&data[0]), get_le16(&data[2])); break; @@ -4140,10 +4140,10 @@ static void create_conn_cmd(const void *data, uint8_t size) switch (cmd->role_switch) { case 0x00: - str = "Stay master"; + str = "Stay central"; break; case 0x01: - str = "Allow slave"; + str = "Allow peripheral"; break; default: str = "Reserved"; @@ -8023,15 +8023,15 @@ static void print_cis_params(const void *data, int i) const struct bt_hci_cis_params *cis = data; print_field("CIS ID: 0x%2.2x", cis->cis_id); - print_field("Master to Slave Maximum SDU Size: %u", + print_field("Central to Peripheral Maximum SDU Size: %u", le16_to_cpu(cis->c_sdu)); - print_field("Slave to Master Maximum SDU Size: %u", + print_field("Peripheral to Central Maximum SDU Size: %u", le16_to_cpu(cis->p_sdu)); - print_le_phy("Master to Slave PHY", cis->c_phy); - print_le_phy("Slave to Master PHY", cis->p_phy); - print_field("Master to Slave Retransmission attempts: 0x%2.2x", + print_le_phy("Central to Peripheral PHY", cis->c_phy); + print_le_phy("Peripheral to Central PHY", cis->p_phy); + print_field("Central to Peripheral Retransmission attempts: 0x%2.2x", cis->c_rtn); - print_field("Slave to Master Retransmission attempts: 0x%2.2x", + print_field("Peripheral to Central Retransmission attempts: 0x%2.2x", cis->p_rtn); } @@ -8040,14 +8040,16 @@ static void le_set_cig_params_cmd(const void *data, uint8_t size) const struct bt_hci_cmd_le_set_cig_params *cmd = data; print_field("CIG ID: 0x%2.2x", cmd->cig_id); - print_usec_interval("Master to Slave SDU Interval", cmd->c_interval); - print_usec_interval("Slave to Master SDU Interval", cmd->p_interval); + print_usec_interval("Central to Peripheral SDU Interval", + cmd->c_interval); + print_usec_interval("Peripheral to Central SDU Interval", + cmd->p_interval); print_sca(cmd->sca); print_packing(cmd->packing); print_framing(cmd->framing); - print_field("Master to Slave Maximum Latency: %d ms (0x%4.4x)", + print_field("Central to Peripheral Maximum Latency: %d ms (0x%4.4x)", le16_to_cpu(cmd->c_latency), le16_to_cpu(cmd->c_latency)); - print_field("Slave to Master Maximum Latency: %d ms (0x%4.4x)", + print_field("Peripheral to Central Maximum Latency: %d ms (0x%4.4x)", le16_to_cpu(cmd->p_latency), le16_to_cpu(cmd->p_latency)); print_field("Number of CIS: %u", cmd->num_cis); @@ -8063,16 +8065,16 @@ static void print_cis_params_test(const void *data, int i) print_field("CIS ID: 0x%2.2x", cis->cis_id); print_field("NSE: 0x%2.2x", cis->nse); - print_field("Master to Slave Maximum SDU: 0x%4.4x", cis->c_sdu); - print_field("Slave to Master Maximum SDU: 0x%4.4x", + print_field("Central to Peripheral Maximum SDU: 0x%4.4x", cis->c_sdu); + print_field("Peripheral to Central Maximum SDU: 0x%4.4x", le16_to_cpu(cis->p_sdu)); - print_field("Master to Slave Maximum PDU: 0x%2.2x", + print_field("Central to Peripheral Maximum PDU: 0x%2.2x", le16_to_cpu(cis->c_pdu)); - print_field("Slave to Master Maximum PDU: 0x%2.2x", cis->p_pdu); - print_le_phy("Master to Slave PHY", cis->c_phy); - print_le_phy("Slave to Master PHY", cis->p_phy); - print_field("Master to Slave Burst Number: 0x%2.2x", cis->c_bn); - print_field("Slave to Master Burst Number: 0x%2.2x", cis->p_bn); + print_field("Peripheral to Central Maximum PDU: 0x%2.2x", cis->p_pdu); + print_le_phy("Central to Peripheral PHY", cis->c_phy); + print_le_phy("Peripheral to Central PHY", cis->p_phy); + print_field("Central to Peripheral Burst Number: 0x%2.2x", cis->c_bn); + print_field("Peripheral to Central Burst Number: 0x%2.2x", cis->p_bn); } static void le_set_cig_params_test_cmd(const void *data, uint8_t size) @@ -8080,10 +8082,12 @@ static void le_set_cig_params_test_cmd(const void *data, uint8_t size) const struct bt_hci_cmd_le_set_cig_params_test *cmd = data; print_field("CIG ID: 0x%2.2x", cmd->cig_id); - print_usec_interval("Master to Slave SDU Interval", cmd->c_interval); - print_usec_interval("Master to Slave SDU Interval", cmd->p_interval); - print_field("Master to Slave Flush Timeout: 0x%2.2x", cmd->c_ft); - print_field("Slave to Master Flush Timeout: 0x%2.2x", cmd->p_ft); + print_usec_interval("Central to Peripheral SDU Interval", + cmd->c_interval); + print_usec_interval("Peripheral to Central SDU Interval", + cmd->p_interval); + print_field("Central to Peripheral Flush Timeout: 0x%2.2x", cmd->c_ft); + print_field("Peripheral to Central Flush Timeout: 0x%2.2x", cmd->p_ft); print_field("ISO Interval: %.2f ms (0x%4.4x)", le16_to_cpu(cmd->iso_interval) * 1.25, le16_to_cpu(cmd->iso_interval)); @@ -10279,7 +10283,7 @@ static void le_conn_complete_evt(const void *data, uint8_t size) print_field("Supervision timeout: %d msec (0x%4.4x)", le16_to_cpu(evt->supv_timeout) * 10, le16_to_cpu(evt->supv_timeout)); - print_field("Master clock accuracy: 0x%2.2x", evt->clock_accuracy); + print_field("Central clock accuracy: 0x%2.2x", evt->clock_accuracy); if (evt->status == 0x00) assign_handle(le16_to_cpu(evt->handle), 0x01); @@ -10400,7 +10404,7 @@ static void le_enhanced_conn_complete_evt(const void *data, uint8_t size) print_field("Supervision timeout: %d msec (0x%4.4x)", le16_to_cpu(evt->supv_timeout) * 10, le16_to_cpu(evt->supv_timeout)); - print_field("Master clock accuracy: 0x%2.2x", evt->clock_accuracy); + print_field("Central clock accuracy: 0x%2.2x", evt->clock_accuracy); if (evt->status == 0x00) assign_handle(le16_to_cpu(evt->handle), 0x01); @@ -10776,17 +10780,17 @@ static void le_cis_established_evt(const void *data, uint8_t size) print_field("Connection Handle: %d", le16_to_cpu(evt->conn_handle)); print_usec_interval("CIG Synchronization Delay", evt->cig_sync_delay); print_usec_interval("CIS Synchronization Delay", evt->cis_sync_delay); - print_usec_interval("Master to Slave Latency", evt->c_latency); - print_usec_interval("Slave to Master Latency", evt->p_latency); - print_le_phy("Master to Slave PHY", evt->c_phy); - print_le_phy("Slave to Master PHY", evt->p_phy); + print_usec_interval("Central to Peripheral Latency", evt->c_latency); + print_usec_interval("Peripheral to Central Latency", evt->p_latency); + print_le_phy("Central to Peripheral PHY", evt->c_phy); + print_le_phy("Peripheral to Central PHY", evt->p_phy); print_field("Number of Subevents: %u", evt->nse); - print_field("Master to Slave Burst Number: %u", evt->c_bn); - print_field("Slave to Master Burst Number: %u", evt->p_bn); - print_field("Master to Slave Flush Timeout: %u", evt->c_ft); - print_field("Slave to Master Flush Timeout: %u", evt->p_ft); - print_field("Master to Slave MTU: %u", le16_to_cpu(evt->c_mtu)); - print_field("Slave to Master MTU: %u", le16_to_cpu(evt->p_mtu)); + print_field("Central to Peripheral Burst Number: %u", evt->c_bn); + print_field("Peripheral to Central Burst Number: %u", evt->p_bn); + print_field("Central to Peripheral Flush Timeout: %u", evt->c_ft); + print_field("Peripheral to Central Flush Timeout: %u", evt->p_ft); + print_field("Central to Peripheral MTU: %u", le16_to_cpu(evt->c_mtu)); + print_field("Peripheral to Central MTU: %u", le16_to_cpu(evt->p_mtu)); print_field("ISO Interval: %u", le16_to_cpu(evt->interval)); } @@ -12163,7 +12167,7 @@ static void mgmt_print_long_term_key(const void *data) { uint8_t address_type = get_u8(data + 6); uint8_t key_type = get_u8(data + 7); - uint8_t master = get_u8(data + 8); + uint8_t central = get_u8(data + 8); uint8_t enc_size = get_u8(data + 9); const char *str; @@ -12191,7 +12195,7 @@ static void mgmt_print_long_term_key(const void *data) } print_field("Key type: %s (0x%2.2x)", str, key_type); - print_field("Master: 0x%2.2x", master); + print_field("Central: 0x%2.2x", central); print_field("Encryption size: %u", enc_size); print_hex_field("Diversifier", data + 10, 2); print_hex_field("Randomizer", data + 12, 8); From patchwork Fri Aug 13 12:18: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: 496658 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.2 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, URIBL_BLOCKED, 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 C448BC432BE for ; Fri, 13 Aug 2021 12:20:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ABC3F600CC for ; Fri, 13 Aug 2021 12:20:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240368AbhHMMVV (ORCPT ); Fri, 13 Aug 2021 08:21:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240404AbhHMMVR (ORCPT ); Fri, 13 Aug 2021 08:21:17 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EE48C0617AD for ; Fri, 13 Aug 2021 05:20:50 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id w200-20020a25c7d10000b02905585436b530so9003576ybe.21 for ; Fri, 13 Aug 2021 05:20:50 -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=qX0op0RwNnb4SfUwmWelLnu1NmagbazjMSr5aFn1x1M=; b=ZPZbxqcTod1mXB8Rd2argXY5uRt8ZOYSaclKG7SMXtWOIfBXzF1RDpkgeAVx4/nuw6 1Re+TqUVJgWrhLK7I90i+mWjidtqc/fcUOxZ3Ws/wgo4xNGAqUgBEL/IK+NNjEwTLaT+ KY6op28RMZnkep8n8iTYMbDbcqzzmXkIhbWnfluo+cegpsNus4r8pzCWCAEbZ1Qd4r4s x95TuVGSOpJMqzoNCtxHWI7QAhh2+C9RrJOrWGON4lTXmXH9Ny3TLwHzygpIKb11B4fF PpK+eLXV5plXj5TKw27rDtu2U3lkdAheWvkkICOOy+7q+2mbN4BxPIytlAzpEtyXuIyE foOw== 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=qX0op0RwNnb4SfUwmWelLnu1NmagbazjMSr5aFn1x1M=; b=jV4imWs72k3ou0rGUqWu8PXh59GyxPqkv+LZrHuJNJElAoQzaWFUJdGt1UCtVtPJjW ZATYLVNtFuyh7Y9UwSNfBFKlLa8l+5UuRzmthEia+ht/W24YV5T+eErGYtn2tq342BEg a+5UyxzqxyFi0uJPviDeQT3sbGUIcaI7fqXfhQ8tAC33r7D9ZSFYPoeDJUkmM8200ZT6 wjUlH858/A/NSSyzVFKFUoqmajWO4pedkZh/q8goEALWWvR1j3P0WAEorjXMPToD6nYr jKwjn52B86CkszsxYcrMbtYHOVbJR2hkGoMnt+GlOSahQIZe0BiLFxI7Afyve2I8IbQj La2g== X-Gm-Message-State: AOAM533puw3bD1GczbvFdu5J/nW8IS4Mo6WGmSYSLBgXniiwHtUORgpD 6A3AjCu6g3qskesGthbUkjJcTKyaRprPBfKDtMhHcnb47hwGABnGu0Gb3k7PcRnYYf7BX5zxon0 mzjKwQuzB1x7n3tF6m9HWIgfEBKeeQAhPkgK6ZQnnnmI9yLpg5KhQlGgFCf2i5bJo8RTTNYFCzw qg X-Google-Smtp-Source: ABdhPJwAJpvnIFufGrREMgX7+yNFqZQq9S24RZojX4M7MP32+05EL9aLrDTvRnF97b0BLopiOfGmjwaVUX8I X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a25:7497:: with SMTP id p145mr2660406ybc.338.1628857249767; Fri, 13 Aug 2021 05:20:49 -0700 (PDT) Date: Fri, 13 Aug 2021 20:18:05 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.20.I63cb796d677d5bd085fc77cb1cb7164278b8e1cd@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 20/62] monitor: Inclusive language in filtering devices 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 "accept list" is preferred, as reflected in the BT core spec 5.3. --- emulator/btdev.c | 24 +++++++++++------------ emulator/le.c | 32 +++++++++++++++---------------- monitor/bt.h | 14 +++++++------- monitor/packet.c | 46 ++++++++++++++++++++++----------------------- tools/hci-tester.c | 4 ++-- tools/mgmt-tester.c | 4 ++-- 6 files changed, 62 insertions(+), 62 deletions(-) diff --git a/emulator/btdev.c b/emulator/btdev.c index 159ebe6ec5..89f7701714 100644 --- a/emulator/btdev.c +++ b/emulator/btdev.c @@ -3492,11 +3492,11 @@ static int cmd_le_create_conn_complete(struct btdev *dev, const void *data, static int cmd_read_wl_size(struct btdev *dev, const void *data, uint8_t len) { - struct bt_hci_rsp_le_read_white_list_size rsp; + struct bt_hci_rsp_le_read_accept_list_size rsp; rsp.status = BT_HCI_ERR_SUCCESS; rsp.size = WL_SIZE; - cmd_complete(dev, BT_HCI_CMD_LE_READ_WHITE_LIST_SIZE, &rsp, + cmd_complete(dev, BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE, &rsp, sizeof(rsp)); return 0; @@ -3544,7 +3544,7 @@ static int cmd_wl_clear(struct btdev *dev, const void *data, uint8_t len) wl_clear(dev); status = BT_HCI_ERR_SUCCESS; - cmd_complete(dev, BT_HCI_CMD_LE_CLEAR_WHITE_LIST, &status, + cmd_complete(dev, BT_HCI_CMD_LE_CLEAR_ACCEPT_LIST, &status, sizeof(status)); return 0; @@ -3561,7 +3561,7 @@ static void wl_add(struct btdev_wl *wl, uint8_t type, bdaddr_t *addr) static int cmd_add_wl(struct btdev *dev, const void *data, uint8_t len) { - const struct bt_hci_cmd_le_add_to_white_list *cmd = data; + const struct bt_hci_cmd_le_add_to_accept_list *cmd = data; uint8_t status; bool exists = false; int i, pos = -1; @@ -3597,14 +3597,14 @@ static int cmd_add_wl(struct btdev *dev, const void *data, uint8_t len) if (pos < 0) { cmd_status(dev, BT_HCI_ERR_MEM_CAPACITY_EXCEEDED, - BT_HCI_CMD_LE_ADD_TO_WHITE_LIST); + BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST); return 0; } wl_add(&dev->le_wl[pos], cmd->addr_type, (bdaddr_t *)&cmd->addr); status = BT_HCI_ERR_SUCCESS; - cmd_complete(dev, BT_HCI_CMD_LE_ADD_TO_WHITE_LIST, + cmd_complete(dev, BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST, &status, sizeof(status)); return 0; @@ -3612,7 +3612,7 @@ static int cmd_add_wl(struct btdev *dev, const void *data, uint8_t len) static int cmd_remove_wl(struct btdev *dev, const void *data, uint8_t len) { - const struct bt_hci_cmd_le_remove_from_white_list *cmd = data; + const struct bt_hci_cmd_le_remove_from_accept_list *cmd = data; uint8_t status; int i; char addr[18]; @@ -3652,7 +3652,7 @@ static int cmd_remove_wl(struct btdev *dev, const void *data, uint8_t len) return -EINVAL; status = BT_HCI_ERR_SUCCESS; - cmd_complete(dev, BT_HCI_CMD_LE_REMOVE_FROM_WHITE_LIST, + cmd_complete(dev, BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST, &status, sizeof(status)); return 0; @@ -4237,10 +4237,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_WHITE_LIST_SIZE, cmd_read_wl_size, NULL), \ - CMD(BT_HCI_CMD_LE_CLEAR_WHITE_LIST, cmd_wl_clear, NULL), \ - CMD(BT_HCI_CMD_LE_ADD_TO_WHITE_LIST, cmd_add_wl, NULL), \ - CMD(BT_HCI_CMD_LE_REMOVE_FROM_WHITE_LIST, cmd_remove_wl, NULL), \ + 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_CONN_UPDATE, cmd_conn_update, \ cmd_conn_update_complete), \ CMD(BT_HCI_CMD_LE_READ_REMOTE_FEATURES, cmd_le_read_remote_features, \ diff --git a/emulator/le.c b/emulator/le.c index 4ffe3b16db..23f2579426 100644 --- a/emulator/le.c +++ b/emulator/le.c @@ -1211,12 +1211,12 @@ static void cmd_le_create_conn_cancel(struct bt_le *hci, static void cmd_le_read_white_list_size(struct bt_le *hci, const void *data, uint8_t size) { - struct bt_hci_rsp_le_read_white_list_size rsp; + struct bt_hci_rsp_le_read_accept_list_size rsp; rsp.status = BT_HCI_ERR_SUCCESS; rsp.size = hci->le_white_list_size; - cmd_complete(hci, BT_HCI_CMD_LE_READ_WHITE_LIST_SIZE, + cmd_complete(hci, BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE, &rsp, sizeof(rsp)); } @@ -1228,14 +1228,14 @@ static void cmd_le_clear_white_list(struct bt_le *hci, clear_white_list(hci); status = BT_HCI_ERR_SUCCESS; - cmd_complete(hci, BT_HCI_CMD_LE_CLEAR_WHITE_LIST, + 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, const void *data, uint8_t size) { - const struct bt_hci_cmd_le_add_to_white_list *cmd = data; + const struct bt_hci_cmd_le_add_to_accept_list *cmd = data; uint8_t status; bool exists = false; int i, pos = -1; @@ -1243,7 +1243,7 @@ static void cmd_le_add_to_white_list(struct bt_le *hci, /* Valid range for address type is 0x00 to 0x01 */ if (cmd->addr_type > 0x01) { cmd_status(hci, BT_HCI_ERR_INVALID_PARAMETERS, - BT_HCI_CMD_LE_ADD_TO_WHITE_LIST); + BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST); return; } @@ -1259,13 +1259,13 @@ static void cmd_le_add_to_white_list(struct bt_le *hci, if (exists) { cmd_status(hci, BT_HCI_ERR_UNSPECIFIED_ERROR, - BT_HCI_CMD_LE_ADD_TO_WHITE_LIST); + BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST); return; } if (pos < 0) { cmd_status(hci, BT_HCI_ERR_MEM_CAPACITY_EXCEEDED, - BT_HCI_CMD_LE_ADD_TO_WHITE_LIST); + BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST); return; } @@ -1273,21 +1273,21 @@ static void cmd_le_add_to_white_list(struct bt_le *hci, memcpy(&hci->le_white_list[pos][1], cmd->addr, 6); status = BT_HCI_ERR_SUCCESS; - cmd_complete(hci, BT_HCI_CMD_LE_ADD_TO_WHITE_LIST, + 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, const void *data, uint8_t size) { - const struct bt_hci_cmd_le_remove_from_white_list *cmd = data; + const struct bt_hci_cmd_le_remove_from_accept_list *cmd = data; uint8_t status; int i, pos = -1; /* Valid range for address type is 0x00 to 0x01 */ if (cmd->addr_type > 0x01) { cmd_status(hci, BT_HCI_ERR_INVALID_PARAMETERS, - BT_HCI_CMD_LE_REMOVE_FROM_WHITE_LIST); + BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST); return; } @@ -1302,7 +1302,7 @@ static void cmd_le_remove_from_white_list(struct bt_le *hci, if (pos < 0) { cmd_status(hci, BT_HCI_ERR_INVALID_PARAMETERS, - BT_HCI_CMD_LE_REMOVE_FROM_WHITE_LIST); + BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST); return; } @@ -1310,7 +1310,7 @@ static void cmd_le_remove_from_white_list(struct bt_le *hci, memset(&hci->le_white_list[pos][1], 0, 6); status = BT_HCI_ERR_SUCCESS; - cmd_complete(hci, BT_HCI_CMD_LE_REMOVE_FROM_WHITE_LIST, + cmd_complete(hci, BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST, &status, sizeof(status)); } @@ -1830,13 +1830,13 @@ static const struct { cmd_le_create_conn, 25, true }, { BT_HCI_CMD_LE_CREATE_CONN_CANCEL, cmd_le_create_conn_cancel, 0, true }, - { BT_HCI_CMD_LE_READ_WHITE_LIST_SIZE, + { BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE, cmd_le_read_white_list_size, 0, true }, - { BT_HCI_CMD_LE_CLEAR_WHITE_LIST, + { BT_HCI_CMD_LE_CLEAR_ACCEPT_LIST, cmd_le_clear_white_list, 0, true }, - { BT_HCI_CMD_LE_ADD_TO_WHITE_LIST, + { BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST, cmd_le_add_to_white_list, 7, true }, - { BT_HCI_CMD_LE_REMOVE_FROM_WHITE_LIST, + { BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST, cmd_le_remove_from_white_list, 7, true }, { BT_HCI_CMD_LE_ENCRYPT, cmd_le_encrypt, 32, true }, diff --git a/monitor/bt.h b/monitor/bt.h index 3144c25ff0..3150e82f3a 100644 --- a/monitor/bt.h +++ b/monitor/bt.h @@ -2072,22 +2072,22 @@ struct bt_hci_cmd_le_create_conn { #define BT_HCI_CMD_LE_CREATE_CONN_CANCEL 0x200e -#define BT_HCI_CMD_LE_READ_WHITE_LIST_SIZE 0x200f -struct bt_hci_rsp_le_read_white_list_size { +#define BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE 0x200f +struct bt_hci_rsp_le_read_accept_list_size { uint8_t status; uint8_t size; } __attribute__ ((packed)); -#define BT_HCI_CMD_LE_CLEAR_WHITE_LIST 0x2010 +#define BT_HCI_CMD_LE_CLEAR_ACCEPT_LIST 0x2010 -#define BT_HCI_CMD_LE_ADD_TO_WHITE_LIST 0x2011 -struct bt_hci_cmd_le_add_to_white_list { +#define BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST 0x2011 +struct bt_hci_cmd_le_add_to_accept_list { uint8_t addr_type; uint8_t addr[6]; } __attribute__ ((packed)); -#define BT_HCI_CMD_LE_REMOVE_FROM_WHITE_LIST 0x2012 -struct bt_hci_cmd_le_remove_from_white_list { +#define BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST 0x2012 +struct bt_hci_cmd_le_remove_from_accept_list { uint8_t addr_type; uint8_t addr[6]; } __attribute__ ((packed)); diff --git a/monitor/packet.c b/monitor/packet.c index 17da5a08d9..82763cc27b 100644 --- a/monitor/packet.c +++ b/monitor/packet.c @@ -2164,16 +2164,16 @@ static void print_adv_filter_policy(const char *label, uint8_t value) "Allow Connect Request from Any"; break; case 0x01: - str = "Allow Scan Request from White List Only, " + str = "Allow Scan Request from Accept List Only, " "Allow Connect Request from Any"; break; case 0x02: str = "Allow Scan Request from Any, " - "Allow Connect Request from White List Only"; + "Allow Connect Request from Accept List Only"; break; case 0x03: - str = "Allow Scan Request from White List Only, " - "Allow Connect Request from White List Only"; + str = "Allow Scan Request from Accept List Only, " + "Allow Connect Request from Accept List Only"; break; default: str = "Reserved"; @@ -6534,13 +6534,13 @@ static void print_scan_filter_policy(uint8_t policy) str = "Accept all advertisement"; break; case 0x01: - str = "Ignore not in white list"; + str = "Ignore not in accept list"; break; case 0x02: str = "Accept all advertisement, inc. directed unresolved RPA"; break; case 0x03: - str = "Ignore not in white list, exc. directed unresolved RPA"; + str = "Ignore not in accept list, exc. directed unresolved RPA"; break; default: str = "Reserved"; @@ -6579,10 +6579,10 @@ static void le_create_conn_cmd(const void *data, uint8_t size) switch (cmd->filter_policy) { case 0x00: - str = "White list is not used"; + str = "Accept list is not used"; break; case 0x01: - str = "White list is used"; + str = "Accept list is used"; break; default: str = "Reserved"; @@ -6605,25 +6605,25 @@ static void le_create_conn_cmd(const void *data, uint8_t size) print_slot_625("Max connection length", cmd->max_length); } -static void le_read_white_list_size_rsp(const void *data, uint8_t size) +static void le_read_accept_list_size_rsp(const void *data, uint8_t size) { - const struct bt_hci_rsp_le_read_white_list_size *rsp = data; + const struct bt_hci_rsp_le_read_accept_list_size *rsp = data; print_status(rsp->status); print_field("Size: %u", rsp->size); } -static void le_add_to_white_list_cmd(const void *data, uint8_t size) +static void le_add_to_accept_list_cmd(const void *data, uint8_t size) { - const struct bt_hci_cmd_le_add_to_white_list *cmd = data; + const struct bt_hci_cmd_le_add_to_accept_list *cmd = data; print_addr_type("Address type", cmd->addr_type); print_addr("Address", cmd->addr, cmd->addr_type); } -static void le_remove_from_white_list_cmd(const void *data, uint8_t size) +static void le_remove_from_accept_list_cmd(const void *data, uint8_t size) { - const struct bt_hci_cmd_le_remove_from_white_list *cmd = data; + const struct bt_hci_cmd_le_remove_from_accept_list *cmd = data; print_addr_type("Address type", cmd->addr_type); print_addr("Address", cmd->addr, cmd->addr_type); @@ -7562,10 +7562,10 @@ static void le_ext_create_conn_cmd(const void *data, uint8_t size) switch (cmd->filter_policy) { case 0x00: - str = "White list is not used"; + str = "Accept list is not used"; break; case 0x01: - str = "White list is used"; + str = "Accept list is used"; break; default: str = "Reserved"; @@ -8990,17 +8990,17 @@ static const struct opcode_data opcode_table[] = { { 0x200e, 213, "LE Create Connection Cancel", null_cmd, 0, true, status_rsp, 1, true }, - { 0x200f, 214, "LE Read White List Size", + { 0x200f, 214, "LE Read Accept List Size", null_cmd, 0, true, - le_read_white_list_size_rsp, 2, true }, - { 0x2010, 215, "LE Clear White List", + le_read_accept_list_size_rsp, 2, true }, + { 0x2010, 215, "LE Clear Accept List", null_cmd, 0, true, status_rsp, 1, true }, - { 0x2011, 216, "LE Add Device To White List", - le_add_to_white_list_cmd, 7, true, + { 0x2011, 216, "LE Add Device To Accept List", + le_add_to_accept_list_cmd, 7, true, status_rsp, 1, true }, - { 0x2012, 217, "LE Remove Device From White List", - le_remove_from_white_list_cmd, 7, true, + { 0x2012, 217, "LE Remove Device From Accept List", + le_remove_from_accept_list_cmd, 7, true, status_rsp, 1, true }, { 0x2013, 218, "LE Connection Update", le_conn_update_cmd, 14, true }, diff --git a/tools/hci-tester.c b/tools/hci-tester.c index 0fb74e69c7..645d89e721 100644 --- a/tools/hci-tester.c +++ b/tools/hci-tester.c @@ -337,12 +337,12 @@ static void test_read_local_supported_codecs(const void *test_data) static void test_le_read_white_list_size(const void *test_data) { - test_command(BT_HCI_CMD_LE_READ_WHITE_LIST_SIZE); + test_command(BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE); } static void test_le_clear_white_list(const void *test_data) { - test_command(BT_HCI_CMD_LE_CLEAR_WHITE_LIST); + test_command(BT_HCI_CMD_LE_CLEAR_ACCEPT_LIST); } static void test_le_encrypt_complete(const void *data, uint8_t size, diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index e369d7488b..26d78360d7 100644 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -4248,7 +4248,7 @@ static const struct generic_data add_device_success_6 = { .expect_alt_ev = MGMT_EV_DEVICE_ADDED, .expect_alt_ev_param = add_device_success_param_6, .expect_alt_ev_len = sizeof(add_device_success_param_6), - .expect_hci_command = BT_HCI_CMD_LE_ADD_TO_WHITE_LIST, + .expect_hci_command = BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST, .expect_hci_param = le_add_to_white_list_param, .expect_hci_len = sizeof(le_add_to_white_list_param), }; @@ -4418,7 +4418,7 @@ static const struct generic_data remove_device_success_7 = { .expect_param = remove_device_param_2, .expect_len = sizeof(remove_device_param_2), .expect_status = MGMT_STATUS_SUCCESS, - .expect_hci_command = BT_HCI_CMD_LE_REMOVE_FROM_WHITE_LIST, + .expect_hci_command = BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST, .expect_hci_param = le_add_to_white_list_param, .expect_hci_len = sizeof(le_add_to_white_list_param), .expect_alt_ev = MGMT_EV_DEVICE_REMOVED, From patchwork Fri Aug 13 12:18:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 497154 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.4 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, URIBL_BLOCKED, 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 96540C4320E for ; Fri, 13 Aug 2021 12:20:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 80D4160F00 for ; Fri, 13 Aug 2021 12:20:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240391AbhHMMVX (ORCPT ); Fri, 13 Aug 2021 08:21:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240385AbhHMMVU (ORCPT ); Fri, 13 Aug 2021 08:21:20 -0400 Received: from mail-qk1-x74a.google.com (mail-qk1-x74a.google.com [IPv6:2607:f8b0:4864:20::74a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B6BAC061756 for ; Fri, 13 Aug 2021 05:20:54 -0700 (PDT) Received: by mail-qk1-x74a.google.com with SMTP id h186-20020a37b7c30000b02903b914d9e335so7008260qkf.17 for ; Fri, 13 Aug 2021 05:20: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; bh=9YbHZD8oFVJ4SyQ7U1LgzwXlC0VCGcs2qhoFwmYqzP0=; b=pMf5jEoNP+d7XwVMe3v0SnuqHC4rL6g37xgKsDk5/Mx0diZ0ol+uXNXYZyDOUdbFMA mEnj1f2rB3VjnNQ/Ju8snCmziKdVJIb5+VfmIY2foSs3Zyk9XKqnvirUXN3c827DkVBH Vdsau80H7ItOIDhQu0YhPVwKqxkB6y8A5WzAYJFq9oX6WzP6VfRwM/kiZBNTCKCtR0BA 7gHofn568U9e/pL8Mq+OgpSRRT6aErfRqXbu1eB2Pr4GqabXgwaSO2vJspjVVtYVpYAL ENh0R517p3j5Q8hm+Kc4n3nB9yHN8Xn2x2pUQCHmO6rA7lD8Id+LVTKkzyyU0KVtlb4Q uBFg== 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=9YbHZD8oFVJ4SyQ7U1LgzwXlC0VCGcs2qhoFwmYqzP0=; b=R36hinukvGp9UnaFxbLmDD/tSGB8Ua8aXZRtS4WOtuh578ZCEJ0NTO5zqFZmIoW7zM JwX6yKxOe/NknVPi/2uXC8brf5i7CRfLnA2cpXhWUKQxWr8ULe3qH/LP4aOJgk4dRkiE E8BAZRqa3S9iEIR+iw0+4OIuJ23RHICvVjCRKUk7nBDLmhKnyhzybgOF+9+IXCxsGY17 warvbyGEgYdtlHtMA3TDaDxfspf1C6V05Qcj6PFQRFoGQZdGNK07OVU2VJ4xkDejGaT3 libIexaW1l8i59PA6VkXJr7zdpld8hIG9wW1tPMarwr+3v4UMWujOWwICTo3HAITuzVA HNgw== X-Gm-Message-State: AOAM532xxl7oHscO5xtGiShKXe9k/X/5+rpk6wAwr/ScDRF6edg47X+m I8zaq9X/1WV/j95p9vSfJJIjQ36c7vinhItVKuuQOHR9NmbEMTktQx04XP50ycysnqYEJELfa0z 8/ekFYg0cnYjkti6T+Buvi+N2hC9HScuZYli9EePOiZcgpLuHD0i/mBctL6ISkNr/cCTwZ7y5bv uY X-Google-Smtp-Source: ABdhPJyYSQ4YrZMQu7bdqlerbjr54d8OILLv1hHfAFpY9hRFVXpnOv+Y+4aBtrj+AVgiNVosiXeAMLDeqjy/ X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:ad4:580e:: with SMTP id dd14mr2401767qvb.2.1628857253249; Fri, 13 Aug 2021 05:20:53 -0700 (PDT) Date: Fri, 13 Aug 2021 20:18:06 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.21.Idde74d908204ede645812e49623e367d27c50e58@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 21/62] emulator: Inclusive language in naming 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 "central" is preferred, as reflected in the BT core spec 5.3. --- android/tester-main.c | 2 +- emulator/hciemu.c | 21 +++++++++++---------- emulator/hciemu.h | 12 ++++++------ 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 +++--- 8 files changed, 42 insertions(+), 41 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/hciemu.c b/emulator/hciemu.c index a3ec44243c..402d689d3c 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_debug(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/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 26d78360d7..30db2b2179 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) @@ -7098,7 +7098,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); } @@ -7164,7 +7164,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); } @@ -9487,7 +9487,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); @@ -9644,7 +9644,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); } @@ -9678,13 +9678,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; @@ -9775,7 +9775,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(); @@ -9840,7 +9840,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(); @@ -9919,7 +9919,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 Fri Aug 13 12:18: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: 496657 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.2 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, URIBL_BLOCKED, 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 178F6C4338F for ; Fri, 13 Aug 2021 12:21:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 01BE760F46 for ; Fri, 13 Aug 2021 12:20:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240403AbhHMMVZ (ORCPT ); Fri, 13 Aug 2021 08:21:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240378AbhHMMVZ (ORCPT ); Fri, 13 Aug 2021 08:21:25 -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 E7980C061756 for ; Fri, 13 Aug 2021 05:20:57 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id o3-20020a2541030000b0290557cf3415f8so9130295yba.1 for ; Fri, 13 Aug 2021 05:20:57 -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=RqKChP3cmEAG5YhvPP5S+0jh/xfXTrFO1SopCyOlNiI=; b=s5baCrpVBA7jMdLoBSa/LGL8Jj/HJ82ip5JCGgm3ivy+hxxkIxG9IXq+oL15+jSWn/ 78aJRv3D7qnKTDESEl9PnyaHs1TbrlDG+F4kxfJlkKpFpmzvPAYrp5I7M7kdEb+vZKYR 06qDwg2A6ieNLB6cJ0Q35bDRO7y8evofiM/J2XgV46zP1AAVuCl5eagzwV3v2BzBrit0 irt70z1RfQL5IkYBd2JNsCOzQM9mbi+s5rUYHTxf3Qlzl90ac/ucJBDNy1qiDFqd2k/v NOWptgAwNfcZSGT/rTomFTK3y3cmd8IW+srFIw3NMVccOtuwDGCr6RLOJVo8oKeH4ljc roRg== 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=RqKChP3cmEAG5YhvPP5S+0jh/xfXTrFO1SopCyOlNiI=; b=iJ5Zbk1ynNe7sITFK4gAZOcb8jVZPZDTz1SzFJwXbh+e2bylMUIyQ170hnAE2Vpo29 tE5hCc5dMse+6XRc8QzluUhMkAlQoSLBGrsRewGlU/AqtupjceqTEQvFOwXJQc79s8rQ 9+QpkRZJJXg5txMpIBGmRB4SBfeC+muyHeU3vgiNJyfuQDaehdfD+e2Vp2DeFW4W95+Q 1nirLRarNKYAtrrPvgfRBOhBd3q3h/o9p1OlT5EPSQdN8ZsUQZnNPsdVIhHo9n9u3jrA V+LCIrXknIKD3U6P+gjz6FuaVe58pWNCQ8DL+upf29EppSyxEl24RIIz172kgJU65fWt AjFw== X-Gm-Message-State: AOAM530s1SE46vJlJUvtSregqIA7d/QhYVrybFdHp0+XcuaVfJtBkOdW VAmIWpn3zzerQjf8kRxTYoSEvlwhKOKH6Qaw2iT/rG1xeSJg0gGRW5Xn65yWn87khFKUKZqKgIV Cao8JX9NIn4+gVRWPypCpWLZv7LKiK1LMCuPAPtNrWcbwVwy3x5EMliUaEenVms+gzONwwPT9Qk g0 X-Google-Smtp-Source: ABdhPJzOXqFOK6hD9SpeDTeGzJVPloUhYcPXrxLSwC0etN7EMa/qGu2GgGRdQECHJDEqSSaerexY4NeC3HMr X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a25:3c8:: with SMTP id 191mr2627421ybd.406.1628857257072; Fri, 13 Aug 2021 05:20:57 -0700 (PDT) Date: Fri, 13 Aug 2021 20:18:07 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.22.I81306d92f461ddd3012624a96eeab1663ac757d6@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 22/62] emulator: Inclusive language in strings 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 "central" and "peripheral" are preferred, as reflected in the BT core spec 5.3. --- emulator/btdev.c | 34 +++++++++++++++++----------------- emulator/le.c | 6 +++--- emulator/serial.c | 6 +++--- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/emulator/btdev.c b/emulator/btdev.c index 89f7701714..14c7016ea6 100644 --- a/emulator/btdev.c +++ b/emulator/btdev.c @@ -5949,13 +5949,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 */ @@ -5985,15 +5985,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 */ @@ -6011,12 +6011,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 */ @@ -6037,12 +6037,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; @@ -6057,7 +6057,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) diff --git a/emulator/le.c b/emulator/le.c index 23f2579426..31186ce1a1 100644 --- a/emulator/le.c +++ b/emulator/le.c @@ -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 */ @@ -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 */ 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; From patchwork Fri Aug 13 12:18:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 497153 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.2 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, URIBL_BLOCKED, 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 1FDF5C4338F for ; Fri, 13 Aug 2021 12:21:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0864360F46 for ; Fri, 13 Aug 2021 12:21:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240395AbhHMMV3 (ORCPT ); Fri, 13 Aug 2021 08:21:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240385AbhHMMV2 (ORCPT ); Fri, 13 Aug 2021 08:21:28 -0400 Received: from mail-pl1-x64a.google.com (mail-pl1-x64a.google.com [IPv6:2607:f8b0:4864:20::64a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAA24C061756 for ; Fri, 13 Aug 2021 05:21:01 -0700 (PDT) Received: by mail-pl1-x64a.google.com with SMTP id p21-20020a1709028a95b029012c31764588so6010011plo.12 for ; Fri, 13 Aug 2021 05:21: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:content-transfer-encoding; bh=nzrONIA7bH3137cq7XvGKbnJDxWYiVMJ/GxdDPVyZTQ=; b=rKO8fMnm7hV2RaZs1ePzSEWilZXfdXpj8q/vGOj7v56MVJrNZ1Aam+IaHj7xoiZeON YrVeToieskmkUpT0cEQOb0gQG+vxjWzn+eqRWBmLguUxR3LCHCSqO0b6kdpZZ0x3Xlep pBaqwFERq3ez6vMgimImCA6G75NHFt4qjrMzxeZIO4aW7m+xRvljEblTBU6QYEmoU9aJ 7KhNmYU/IzwsR4eD/Mt6Sgm3jFvcmgpfLt2niZBM+9PZVYI64CZ1Zi2lhzvc0Tcc5Acd 216h9KFzX2AoeEPwbhYUL4h9fX4Ne3bJbpi5oEtonZCUgKPVQrXGAXQ3FBMWmD/nyOk8 MZGQ== 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=nzrONIA7bH3137cq7XvGKbnJDxWYiVMJ/GxdDPVyZTQ=; b=drRkr7s3YP1VuzBlTibPo+gxwvyi0eWPpybdBCLN1zyBWrQC85gW36Minxs2+u3u2l acj/wvWyDZtiFoRFVUkmFPOfdqW62lSzkNSRRDllysEy3rLqHLhL6recuJ+OyYUSiN86 iSHKQo1nYqj1KRx7X2ffbUcpydhlhKRTPnPXHrg2gOeB0rXElkyPkLv4LObjhkVWfFAy n99LEX5qf+O81u12Z6uBPzbVE46oJ7zfBSQl2+HRSHFsoMrde2lEGYwD+TfE6BkEXrKl C1JpNCVHeijdui0v7ZDvu+GMNGSzvc6acyYbhD9B8Y6D/BqGqwajpiVFC/tG2JCPGBJn ONBw== X-Gm-Message-State: AOAM533bvfkMgC3BaTYo9BD6Df5s8jhytnZGpkDJb/Zl0QW4XtPtKviT wUv+LhIdQnuptWq0mftg/Ib9xLgDp9Gs8mhdnoLyO0hI42NYZg9jYjjMxOxpl8nVR9wYtxO0EU+ 1usARYsPKhJrTph3NkyndYKCpVe1O/stRJ3tTGtakVNL9dzySS1V0MLOFPPk475dr+3QNHPF5tw 0G X-Google-Smtp-Source: ABdhPJyTBMDHBqHlfaJ1aqPj2NYi8ArW37mvCLdcOjVw/zhHM7Wfh019X6s0gZE9E0ZA4H7IzGnvW5hjrK2S X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a62:e50c:0:b029:2f9:b9b1:d44f with SMTP id n12-20020a62e50c0000b02902f9b9b1d44fmr2256978pff.42.1628857261045; Fri, 13 Aug 2021 05:21:01 -0700 (PDT) Date: Fri, 13 Aug 2021 20:18:08 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.23.I59a47b0cbace5a852aa6b4a2021d9fb02ab9afcf@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 23/62] emulator: Inclusive language in filtering device 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 "accept list" is preferred, as reflected in the BT core spec 5.3. --- emulator/btdev.c | 114 +++++++++++++++++++++++------------------------ emulator/le.c | 78 ++++++++++++++++---------------- 2 files changed, 96 insertions(+), 96 deletions(-) diff --git a/emulator/btdev.c b/emulator/btdev.c index 14c7016ea6..ed79a827f8 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; }; @@ -190,7 +190,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; @@ -426,18 +426,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) @@ -465,7 +465,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); } @@ -3490,25 +3490,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: @@ -3525,23 +3525,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, @@ -3550,16 +3550,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; @@ -3567,28 +3567,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; } @@ -3601,7 +3601,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, @@ -3610,7 +3610,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; @@ -3618,37 +3618,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; @@ -4237,10 +4237,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, \ @@ -5759,10 +5759,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 */ @@ -6070,7 +6070,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/le.c b/emulator/le.c index 31186ce1a1..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 */ @@ -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 */ @@ -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; } From patchwork Fri Aug 13 12:18: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: 496656 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.2 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, URIBL_BLOCKED, 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 DCC7FC4338F for ; Fri, 13 Aug 2021 12:21:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C921560F46 for ; Fri, 13 Aug 2021 12:21:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240407AbhHMMVc (ORCPT ); Fri, 13 Aug 2021 08:21:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240385AbhHMMVc (ORCPT ); Fri, 13 Aug 2021 08:21:32 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B954AC061756 for ; Fri, 13 Aug 2021 05:21:05 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id x5-20020a0569020505b0290592c25b8c59so8956230ybs.18 for ; Fri, 13 Aug 2021 05:21: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=0PJBxrqEpDZD83Ayh9AokOZtgqrEoGdAMrmW3WZWTak=; b=EoWiVjjfHVQc8jDmb0yXXriGtYfebVzl1BjwaBL+IEETkJAAFRO0Tfn8K8Os47gw8O n2PaDeGa9B3YKc5YFohmpjIDMCEy9QCSagZGDHoQmeNnl15q0DZd38ILd7n3ghcwKMsI Lyo0dtNMoeo+BuEyZS2eyGAOrZU0G1g6d6m3CE/8n9H08p0BMQCby0aGlcGK0/L0D+F2 +K3buDjpamc9zOAVALZR3GIltwtIskwqbC3N6p8mRpK4FGdws0A8feDVMdSVis4NYIAP istPDuw7n7pf+ItiFP4OfHU2wdhUKRi+w4gwBbGqtCn4nkKT02PlBzKlE9ItQbTzsmU1 235A== 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=0PJBxrqEpDZD83Ayh9AokOZtgqrEoGdAMrmW3WZWTak=; b=TAJmSl+//ipaUBz0qDsgrxYt0N436Ce02EQTP6dcYviG+TjKd3bYJ8VAr+ddjNsHUS nZCgLEPMkp2IGxDM9FigwOs/KwaJZY8fJCXNSIIxUT99HT+7K9nX+N2H+yzaZUDkJ3t9 94aL7wYn4zFOVFfmEhwDSoEuI5SXrUayRzPU4AXFGqpdpiv47e3LhyFv7tudsNDAauK2 zUFMKidNQgQBdDtj6gnbonVLG27Gy0tutlfwj+VTc9QGA8Rj2KNOjHVJ0GsrS4DvJVyj dACZ0tpUNxJMxj9G21mjdbnxhrKQeu81ZMghC/HfskIdN6xv+jsyCTieTk3Ta+Dn7phU zk+w== X-Gm-Message-State: AOAM5300tOmj1nE7CxGDpryybqd9TfPn2c8G4P0fxgiYjOlf8vjAw3PA yJrbqwoq9WW9RunMhEtaf6bmlIE6deUf8rtcQg5gh46YHokOb3UQH/xDiddsNZ+SQJr9MXFN7R1 hBYmRZJcu9+R+5m2TddLvUKUin6sLc6dNs2JGtLP0JVeSDbtmyl8yxjj9s5lgyIhQ9vGoF7T+qL oY X-Google-Smtp-Source: ABdhPJzRI4sZXWRYvVV9+VAlOrsZHo/YXb/GOVGUSt4X2Tap+3iBoUmYVfX4n5XRt8w/ZjrSNA9fNA8fqI5M X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a25:ea51:: with SMTP id o17mr2518123ybe.192.1628857264963; Fri, 13 Aug 2021 05:21:04 -0700 (PDT) Date: Fri, 13 Aug 2021 20:18:09 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.24.Ifc20410999700c0b9377e6f8e368076d5917cd06@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 24/62] tools: Inclusive language in referring the central address 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 "central" is preferred, as reflected in the BT core spec 5.3. --- tools/l2cap-tester.c | 20 ++++++++++---------- tools/mgmt-tester.c | 33 +++++++++++++++++---------------- tools/rfcomm-tester.c | 14 +++++++------- tools/sco-tester.c | 10 +++++----- tools/smp-tester.c | 12 ++++++------ 5 files changed, 45 insertions(+), 44 deletions(-) diff --git a/tools/l2cap-tester.c b/tools/l2cap-tester.c index 169a989f54..db662117e0 100644 --- a/tools/l2cap-tester.c +++ b/tools/l2cap-tester.c @@ -1103,7 +1103,7 @@ static int create_l2cap_sock(struct test_data *data, uint16_t psm, uint16_t cid, int sec_level, uint8_t mode) { const struct l2cap_data *l2data = data->test_data; - const uint8_t *master_bdaddr; + const uint8_t *central_bdaddr; struct sockaddr_l2 addr; int sk, err; @@ -1116,9 +1116,9 @@ static int create_l2cap_sock(struct test_data *data, uint16_t psm, return err; } - master_bdaddr = hciemu_get_central_bdaddr(data->hciemu); - if (!master_bdaddr) { - tester_warn("No master bdaddr"); + central_bdaddr = hciemu_get_central_bdaddr(data->hciemu); + if (!central_bdaddr) { + tester_warn("No central bdaddr"); close(sk); return -ENODEV; } @@ -1127,7 +1127,7 @@ static int create_l2cap_sock(struct test_data *data, uint16_t psm, addr.l2_family = AF_BLUETOOTH; addr.l2_psm = htobs(psm); addr.l2_cid = htobs(cid); - bacpy(&addr.l2_bdaddr, (void *) master_bdaddr); + bacpy(&addr.l2_bdaddr, (void *) central_bdaddr); if (l2data && l2data->addr_type_avail) addr.l2_bdaddr_type = l2data->addr_type; @@ -1836,7 +1836,7 @@ static void test_server(const void *test_data) { struct test_data *data = tester_get_data(); const struct l2cap_data *l2data = data->test_data; - const uint8_t *master_bdaddr; + const uint8_t *central_bdaddr; uint8_t addr_type; struct bthost *bthost; GIOChannel *io; @@ -1869,9 +1869,9 @@ static void test_server(const void *test_data) tester_print("Listening for connections"); } - master_bdaddr = hciemu_get_central_bdaddr(data->hciemu); - if (!master_bdaddr) { - tester_warn("No master bdaddr"); + central_bdaddr = hciemu_get_central_bdaddr(data->hciemu); + if (!central_bdaddr) { + tester_warn("No central bdaddr"); tester_test_failed(); return; } @@ -1884,7 +1884,7 @@ static void test_server(const void *test_data) else addr_type = BDADDR_LE_PUBLIC; - bthost_hci_connect(bthost, master_bdaddr, addr_type); + bthost_hci_connect(bthost, central_bdaddr, addr_type); } static void test_getpeername_not_connected(const void *test_data) diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index 30db2b2179..04c4393a09 100644 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -9759,7 +9759,7 @@ static void test_pairing_acceptor(const void *test_data) { struct test_data *data = tester_get_data(); const struct generic_data *test = data->test_data; - const uint8_t *master_bdaddr; + const uint8_t *central_bdaddr; struct bthost *bthost; uint8_t addr_type; @@ -9775,9 +9775,9 @@ static void test_pairing_acceptor(const void *test_data) test_add_condition(data); } - master_bdaddr = hciemu_get_central_bdaddr(data->hciemu); - if (!master_bdaddr) { - tester_warn("No master bdaddr"); + central_bdaddr = hciemu_get_central_bdaddr(data->hciemu); + if (!central_bdaddr) { + tester_warn("No central bdaddr"); tester_test_failed(); return; } @@ -9790,7 +9790,7 @@ static void test_pairing_acceptor(const void *test_data) else addr_type = BDADDR_LE_PUBLIC; - bthost_hci_connect(bthost, master_bdaddr, addr_type); + bthost_hci_connect(bthost, central_bdaddr, addr_type); } static void connected_event(uint16_t index, uint16_t length, const void *param, @@ -9828,7 +9828,7 @@ static void test_command_generic_connect(const void *test_data) { struct test_data *data = tester_get_data(); unsigned int id; - const uint8_t *master_bdaddr; + const uint8_t *central_bdaddr; uint8_t addr_type; struct bthost *bthost; @@ -9840,9 +9840,9 @@ static void test_command_generic_connect(const void *test_data) data->mgmt_alt_ev_id = id; test_add_condition(data); - master_bdaddr = hciemu_get_central_bdaddr(data->hciemu); - if (!master_bdaddr) { - tester_warn("No master bdaddr"); + central_bdaddr = hciemu_get_central_bdaddr(data->hciemu); + if (!central_bdaddr) { + tester_warn("No central bdaddr"); tester_test_failed(); return; } @@ -9851,7 +9851,7 @@ static void test_command_generic_connect(const void *test_data) BDADDR_LE_PUBLIC; tester_print("ADDR TYPE: %d", addr_type); bthost = hciemu_client_get_host(data->hciemu); - bthost_hci_connect(bthost, master_bdaddr, addr_type); + bthost_hci_connect(bthost, central_bdaddr, addr_type); } static bool test_adv_enable_hook(const void *data, uint16_t len, @@ -9904,7 +9904,7 @@ static void add_device_callback(uint8_t status, uint16_t len, const void *param, struct test_data *data = user_data; const struct generic_data *test = data->test_data; struct bthost *bthost; - const uint8_t *master_bdaddr; + const uint8_t *central_bdaddr; if (status != 0) { tester_test_failed(); @@ -9919,18 +9919,19 @@ static void add_device_callback(uint8_t status, uint16_t len, const void *param, if (test->client_enable_adv) return; - master_bdaddr = hciemu_get_central_bdaddr(data->hciemu); - if (!master_bdaddr) { - tester_warn("No master bdaddr"); + central_bdaddr = hciemu_get_central_bdaddr(data->hciemu); + if (!central_bdaddr) { + tester_warn("No central bdaddr"); tester_test_failed(); return; } bthost = hciemu_client_get_host(data->hciemu); if (data->hciemu_type >= HCIEMU_TYPE_BREDRLE50) - bthost_hci_ext_connect(bthost, master_bdaddr, BDADDR_LE_PUBLIC); + bthost_hci_ext_connect(bthost, central_bdaddr, + BDADDR_LE_PUBLIC); else - bthost_hci_connect(bthost, master_bdaddr, BDADDR_LE_PUBLIC); + bthost_hci_connect(bthost, central_bdaddr, BDADDR_LE_PUBLIC); } static void test_connected_and_advertising(const void *test_data) diff --git a/tools/rfcomm-tester.c b/tools/rfcomm-tester.c index 78b08663bd..ef47904de0 100644 --- a/tools/rfcomm-tester.c +++ b/tools/rfcomm-tester.c @@ -534,7 +534,7 @@ static void test_connect(const void *test_data) struct test_data *data = tester_get_data(); struct bthost *bthost = hciemu_client_get_host(data->hciemu); const struct rfcomm_client_data *cli = data->test_data; - const uint8_t *client_addr, *master_addr; + const uint8_t *client_addr, *central_addr; GIOChannel *io; int sk; @@ -542,10 +542,10 @@ static void test_connect(const void *test_data) bthost_add_rfcomm_server(bthost, cli->server_channel, rfcomm_connect_cb, NULL); - master_addr = hciemu_get_central_bdaddr(data->hciemu); + central_addr = hciemu_get_central_bdaddr(data->hciemu); client_addr = hciemu_get_client_bdaddr(data->hciemu); - sk = create_rfcomm_sock((bdaddr_t *) master_addr, 0); + sk = create_rfcomm_sock((bdaddr_t *) central_addr, 0); if (connect_rfcomm_sock(sk, (const bdaddr_t *) client_addr, cli->client_channel) < 0) { @@ -675,14 +675,14 @@ static void test_server(const void *test_data) { struct test_data *data = tester_get_data(); const struct rfcomm_server_data *srv = data->test_data; - const uint8_t *master_addr; + const uint8_t *central_addr; struct bthost *bthost; GIOChannel *io; int sk; - master_addr = hciemu_get_central_bdaddr(data->hciemu); + central_addr = hciemu_get_central_bdaddr(data->hciemu); - sk = create_rfcomm_sock((bdaddr_t *) master_addr, srv->server_channel); + sk = create_rfcomm_sock((bdaddr_t *) central_addr, srv->server_channel); if (sk < 0) { tester_test_failed(); return; @@ -707,7 +707,7 @@ static void test_server(const void *test_data) bthost = hciemu_client_get_host(data->hciemu); bthost_set_connect_cb(bthost, client_new_conn, data); - bthost_hci_connect(bthost, master_addr, BDADDR_BREDR); + bthost_hci_connect(bthost, central_addr, BDADDR_BREDR); } #define test_rfcomm(name, data, setup, func) \ diff --git a/tools/sco-tester.c b/tools/sco-tester.c index 7c83aee195..3e7bfc5e3a 100644 --- a/tools/sco-tester.c +++ b/tools/sco-tester.c @@ -413,7 +413,7 @@ end: static int create_sco_sock(struct test_data *data) { - const uint8_t *master_bdaddr; + const uint8_t *central_bdaddr; struct sockaddr_sco addr; int sk, err; @@ -426,15 +426,15 @@ static int create_sco_sock(struct test_data *data) return err; } - master_bdaddr = hciemu_get_central_bdaddr(data->hciemu); - if (!master_bdaddr) { - tester_warn("No master bdaddr"); + central_bdaddr = hciemu_get_central_bdaddr(data->hciemu); + if (!central_bdaddr) { + tester_warn("No central bdaddr"); return -ENODEV; } memset(&addr, 0, sizeof(addr)); addr.sco_family = AF_BLUETOOTH; - bacpy(&addr.sco_bdaddr, (void *) master_bdaddr); + bacpy(&addr.sco_bdaddr, (void *) central_bdaddr); if (bind(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) { err = -errno; diff --git a/tools/smp-tester.c b/tools/smp-tester.c index b075c5df8a..16fe0dfd7a 100644 --- a/tools/smp-tester.c +++ b/tools/smp-tester.c @@ -765,11 +765,11 @@ static void smp_new_conn(uint16_t handle, void *user_data) static void init_bdaddr(struct test_data *data) { - const uint8_t *master_bdaddr, *client_bdaddr; + const uint8_t *central_bdaddr, *client_bdaddr; - master_bdaddr = hciemu_get_central_bdaddr(data->hciemu); - if (!master_bdaddr) { - tester_warn("No master bdaddr"); + central_bdaddr = hciemu_get_central_bdaddr(data->hciemu); + if (!central_bdaddr) { + tester_warn("No central bdaddr"); tester_test_failed(); return; } @@ -786,9 +786,9 @@ static void init_bdaddr(struct test_data *data) if (data->out) { memcpy(data->ia, client_bdaddr, sizeof(data->ia)); - memcpy(data->ra, master_bdaddr, sizeof(data->ra)); + memcpy(data->ra, central_bdaddr, sizeof(data->ra)); } else { - memcpy(data->ia, master_bdaddr, sizeof(data->ia)); + memcpy(data->ia, central_bdaddr, sizeof(data->ia)); memcpy(data->ra, client_bdaddr, sizeof(data->ra)); } } From patchwork Fri Aug 13 12:18: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: 497152 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.2 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, URIBL_BLOCKED, 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 24211C4338F for ; Fri, 13 Aug 2021 12:21:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0C56D60F46 for ; Fri, 13 Aug 2021 12:21:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240399AbhHMMVh (ORCPT ); Fri, 13 Aug 2021 08:21:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240376AbhHMMVg (ORCPT ); Fri, 13 Aug 2021 08:21:36 -0400 Received: from mail-qv1-xf49.google.com (mail-qv1-xf49.google.com [IPv6:2607:f8b0:4864:20::f49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 744B3C061756 for ; Fri, 13 Aug 2021 05:21:09 -0700 (PDT) Received: by mail-qv1-xf49.google.com with SMTP id f10-20020a0ccc8a0000b02903521ac3b9d7so6898503qvl.15 for ; Fri, 13 Aug 2021 05:21:09 -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=TSakmXxYNz60sRpGrBjFC3E27vaNVe7RhhaeT4jEkoc=; b=HNwtj4+4syuqQMJXsuEuLkWABTDE2kRfvyRenn0wZft0V5YmuXDuLvm+NdxrT/4M9v 2iw3Uld6pApONbbv3+gr4OawRsSb00NHG/38dYI1H1HUeL+Dttgd4Ej7pKpcr6pPN2v8 X3X0EfB1oEnIsL+1kE+Cj9HbvfZi+C8MPc1qbOI/tQogoSd2NSbzB3ClqhUocaFJJ5KZ IWhPHcKTSAehLzh4WUJVdip8FxiUU5JEArdLOC/e3ANYlhwfPBbWFbTib1rHCIQvWZF8 mVS0Q8NC1x1Wj6h1qNF7RMnqmcKQwq2KGH56Di8Pc6s8xjeBFXD+xeDOfswYXMx4B22a rq9Q== 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=TSakmXxYNz60sRpGrBjFC3E27vaNVe7RhhaeT4jEkoc=; b=AfPIUrV3Ougx3u6R0i2POpnvKVYlqVbmZotSp/KRICSJLlLUdrvtV1mBpEOm2Ykmsw CDVLlniqt/nmTOTtrY6oV3pEuaY7hjdb1XBu+PbJkTorp3d2blE7Wmmh1xLxDnTEMMXj 1Antp5iowOmMP4/wiMm95KyvE+oKQ/Bgujr4lzGBUnNsztCle9Pr1CANqxohno28NBvu X/5WH2ZJCotf+O0sJJMoeiRtuBsRyyP/csGw150AGkP51XHhEbduNYxA2/KaD9zOVQ4x 8aKTKg4dl5qfdvBezt6tOem/SJJyjHZrtpOnMnAmcm0a5EbEwY1VmyX3rHEYLrLuYQFW jeLQ== X-Gm-Message-State: AOAM530+ILZmhbouoMI2f9X6K+r/wryaAAGHOoadDxcaaJ2Bvo1s0Aji zHNBHXmhgH/UiRPCobbg80Xfk4+e2zMxjvAWS6G7tHSEVBzj3VndPCACQqD7ls5R8w7TOkC+kk5 iw7hLwREuFKx8lLrSpRKlsxBa7HlRfZ02rzbwzZ1DFGgWJbZ23NrswD3qYh6r6bGcuYK3dXi/F9 VN X-Google-Smtp-Source: ABdhPJwDJprs+CeJS9yvlJWvABe9bFqjh2bM2ddy9cisGj28BFPagoGABaeSwLNMwu0vNzd74WHLiieJje1f X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a05:6214:19e9:: with SMTP id q9mr2256110qvc.28.1628857268363; Fri, 13 Aug 2021 05:21:08 -0700 (PDT) Date: Fri, 13 Aug 2021 20:18:10 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.25.I9a93140745548fed5a09fba82cabb27b2a3d4d02@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 25/62] tools/parser/hci: 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 "central", "peripheral", "accept list", and "temporary link key", are the preferred terms, as reflected in the BT core spec 5.3. --- tools/parser/hci.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/tools/parser/hci.c b/tools/parser/hci.c index 02ebcfc442..7b3ffa6cb9 100644 --- a/tools/parser/hci.c +++ b/tools/parser/hci.c @@ -45,7 +45,7 @@ static char *event_str[EVENT_NUM + 1] = { "Remote Name Req Complete", "Encrypt Change", "Change Connection Link Key Complete", - "Master Link Key Complete", + "Temporary Link Key Complete", "Read Remote Supported Features", "Read Remote Ver Info Complete", "QoS Setup Complete", @@ -150,7 +150,7 @@ static char *cmd_linkctl_str[CMD_LINKCTL_NUM + 1] = { "Unknown", "Change Connection Link Key", "Unknown", - "Master Link Key", + "Temporary Link Key", "Unknown", "Remote Name Request", "Remote Name Request Cancel", @@ -383,10 +383,10 @@ static char *cmd_le_str[CMD_LE_NUM + 1] = { "LE Set Scan Enable", "LE Create Connection", "LE Create Connection Cancel", - "LE Read White List Size", - "LE Clear White List", - "LE Add Device To White List", - "LE Remove Device From White List", + "LE Read Accept List Size", + "LE Clear Accept List", + "LE Add Device To Accept List", + "LE Remove Device From Accept List", "LE Connection Update", "LE Set Host Channel Classification", "LE Read Channel Map", @@ -568,9 +568,9 @@ static char *role2str(uint8_t role) { switch (role) { case 0x00: - return "Master"; + return "Central"; case 0x01: - return "Slave"; + return "Peripheral"; default: return "Unknown"; } @@ -739,11 +739,11 @@ static char *filterpolicy2str(uint8_t policy) case 0x00: return "Allow scan from any, connection from any"; case 0x01: - return "Allow scan from white list, connection from any"; + return "Allow scan from accept list, connection from any"; case 0x02: - return "Allow scan from any, connection from white list"; + return "Allow scan from any, connection from accept list"; case 0x03: - return "Allow scan and connection from white list"; + return "Allow scan and connection from accept list"; default: return "Reserved"; } @@ -1082,7 +1082,7 @@ static inline void remote_name_req_dump(int level, struct frame *frm) clkoffset & 0x7fff, clkoffset & 0x8000 ? " (valid)" : ""); } -static inline void master_link_key_dump(int level, struct frame *frm) +static inline void temporary_link_key_dump(int level, struct frame *frm) { central_link_key_cp *cp = frm->ptr; @@ -1640,7 +1640,7 @@ static inline void le_set_scan_parameters_dump(int level, struct frame *frm) printf("own address: 0x%02x (%s) policy: %s\n", cp->own_bdaddr_type, bdaddrtype2str(cp->own_bdaddr_type), (cp->filter == 0x00 ? "All" : - (cp->filter == 0x01 ? "white list only" : "reserved"))); + (cp->filter == 0x01 ? "accept list only" : "reserved"))); } static inline void le_set_scan_enable_dump(int level, struct frame *frm) @@ -1772,7 +1772,7 @@ static inline void command_dump(int level, struct frame *frm) generic_command_dump(level + 1, frm); return; case OCF_CENTRAL_LINK_KEY: - master_link_key_dump(level + 1, frm); + temporary_link_key_dump(level + 1, frm); return; case OCF_READ_REMOTE_EXT_FEATURES: read_remote_ext_features_dump(level + 1, frm); @@ -3114,7 +3114,8 @@ 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) +static inline void temporary_link_key_complete_dump(int level, + struct frame *frm) { evt_central_link_key_complete *evt = frm->ptr; @@ -3565,7 +3566,7 @@ static inline void evt_le_conn_complete_dump(int level, struct frame *frm) p_indent(level, frm); printf("status 0x%2.2x handle %d, role %s\n", evt->status, btohs(evt->handle), - evt->role ? "slave" : "master"); + evt->role ? "peripheral" : "central"); p_indent(level, frm); p_ba2str(&evt->peer_bdaddr, addr); @@ -3875,7 +3876,7 @@ static inline void event_dump(int level, struct frame *frm) generic_response_dump(level + 1, frm); break; case EVT_CENTRAL_LINK_KEY_COMPLETE: - master_link_key_complete_dump(level + 1, frm); + temporary_link_key_complete_dump(level + 1, frm); break; case EVT_REMOTE_NAME_REQ_COMPLETE: remote_name_req_complete_dump(level + 1, frm); From patchwork Fri Aug 13 12:18:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 496655 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.2 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, URIBL_BLOCKED, 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 46D3EC4320A for ; Fri, 13 Aug 2021 12:21:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 29D52610E9 for ; Fri, 13 Aug 2021 12:21:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240408AbhHMMVk (ORCPT ); Fri, 13 Aug 2021 08:21:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240376AbhHMMVj (ORCPT ); Fri, 13 Aug 2021 08:21:39 -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 AAC46C061756 for ; Fri, 13 Aug 2021 05:21:12 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id f64-20020a2538430000b0290593bfc4b046so8977769yba.9 for ; Fri, 13 Aug 2021 05:21: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=hF8RZ+lwlsVO7aNYeX/pFo55jlbe6V8EAjnVo1l7jlA=; b=I+ouHjB49XVR13XOL8tvXYOqv+/sfhM6LPeU6zC05BT8/4vB4uKrb+G4FDzFB8Qk7b U6Q4xBoTm6givijZxH1BovgGtVRFPEkCCDMS3lMwsK1KppvuL1+v25xuabiVzkkNgEbl U5xG9MyY+jYSVvE2mosMVvbonljjAjFYI/sBZMJNo5MJd4jgTtvEWGUmTXKm1RtBTbEJ PSjBfvTNYQHvjEMC+s6e6k2n+NOOG6H3SHXrD4yrnWNHbjBOf9gn60jVPmfV3DTPoGjv IlDyeHAvC7NNqECgANYiRzd/QxPLdsbsMlWg3+hFL+0h/eI3ck7rGSPWQfjD5C3zivZ9 w5uQ== 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=hF8RZ+lwlsVO7aNYeX/pFo55jlbe6V8EAjnVo1l7jlA=; b=efDb8eadeWaIlFHbvupfEZABMLtScN++aSJ7uyjbql0AF4TC6oZG0phTs56DYYIQC0 SJK4fyARw4Xi1QDTF3ZMSd/LQ8TNi7DX23cJOus6GnjhPPK3uFBn7pVbs2joZmAgm87T DqeyQnfOL8cf7MrZOjuLYSkfWlwFBuzvDW2tWonjqaNeAp+P0hOOBxS1B8GCegDXHPqD /nd+rnDC87zu+tIbu4y43JTfPLbhkYlGBD1ITIMcdY3S/1UA9QrxpworY8ePaY2ci6YK XanbYKZvl0g71sRnAcZWmEMaDJEnB9rlm52ain++WZbLmifTFyunRB02Kil+HW1jd6g1 3UUQ== X-Gm-Message-State: AOAM530lwbtzOT9M8aL5xcftmZpSNO3rsklxrhJdsmY/9qoomt4iYnZH Tt3DJVFOJ25fA3skhDqUQY1gmJGDtuW0dZ/Vw5p8USjm74GFukWDeIKY//YDlM4JGQfOCkUscjn Rij5qnV5uYgi9SsElCSdW7vjqTQFl6t3AQH4XHqURPiecyffu+NWU7+AKnxX2SYmQJolyTOSxPo v3 X-Google-Smtp-Source: ABdhPJxeexE5FOMVMAnlw6j3XKWF2nyy126zcg5xss+T878Y0A93XZa8e1DIx2KI6VbE2c1wadS/zAtwqymL X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a25:c2:: with SMTP id 185mr2869004yba.148.1628857271839; Fri, 13 Aug 2021 05:21:11 -0700 (PDT) Date: Fri, 13 Aug 2021 20:18:11 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.26.Ifdcbf84befab89586ac37d683227d61e8df73395@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 26/62] tools/parser/smp: 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 "central" is preferred, as reflected in the BT core spec 5.3. --- tools/parser/smp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/parser/smp.c b/tools/parser/smp.c index a372e5e5ff..733795ac68 100644 --- a/tools/parser/smp.c +++ b/tools/parser/smp.c @@ -28,7 +28,7 @@ #define SMP_CMD_PAIRING_RANDOM 0x04 #define SMP_CMD_PAIRING_FAILED 0x05 #define SMP_CMD_ENCRYPT_INFO 0x06 -#define SMP_CMD_MASTER_IDENT 0x07 +#define SMP_CMD_CENTRAL_IDENT 0x07 #define SMP_CMD_IDENT_INFO 0X08 #define SMP_CMD_IDENT_ADDR_INFO 0x09 #define SMP_CMD_SIGN_INFO 0x0a @@ -78,8 +78,8 @@ static const char *smpcmd2str(uint8_t cmd) return "Pairing Failed"; case SMP_CMD_ENCRYPT_INFO: return "Encryption Information"; - case SMP_CMD_MASTER_IDENT: - return "Master Identification"; + case SMP_CMD_CENTRAL_IDENT: + return "Central Identification"; case SMP_CMD_IDENT_INFO: return "Identity Information"; case SMP_CMD_IDENT_ADDR_INFO: @@ -221,7 +221,7 @@ static void smp_cmd_encrypt_info_dump(int level, struct frame *frm) printf("\n"); } -static void smp_cmd_master_ident_dump(int level, struct frame *frm) +static void smp_cmd_central_ident_dump(int level, struct frame *frm) { uint16_t ediv = btohs(htons(p_get_u16(frm))); int i; @@ -303,8 +303,8 @@ void smp_dump(int level, struct frame *frm) case SMP_CMD_ENCRYPT_INFO: smp_cmd_encrypt_info_dump(level + 1, frm); break; - case SMP_CMD_MASTER_IDENT: - smp_cmd_master_ident_dump(level + 1, frm); + case SMP_CMD_CENTRAL_IDENT: + smp_cmd_central_ident_dump(level + 1, frm); break; case SMP_CMD_IDENT_INFO: smp_cmd_ident_info_dump(level + 1, frm); From patchwork Fri Aug 13 12:18:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 497151 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.4 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, URIBL_BLOCKED, 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 1E49EC4338F for ; Fri, 13 Aug 2021 12:21:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EC47560F00 for ; Fri, 13 Aug 2021 12:21:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240444AbhHMMVn (ORCPT ); Fri, 13 Aug 2021 08:21:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240421AbhHMMVm (ORCPT ); Fri, 13 Aug 2021 08:21:42 -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 0F956C061756 for ; Fri, 13 Aug 2021 05:21:16 -0700 (PDT) Received: by mail-qt1-x849.google.com with SMTP id o11-20020ac85a4b0000b029028acd99a680so6261701qta.19 for ; Fri, 13 Aug 2021 05:21:16 -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=nSdtwf8edjqkvQpKOKp6xr2CCq6fB+GF7AwcpC/+Jpk=; b=KyLjd0ru4w7yVJLNDiNfXI6o1n7o15y16AilMV3RucZKe6cODe2B/c0MXTeK5RmjeZ qmWkNpXuz7Gxk3i/Xx91RSqI+W4fLeafBzZLXPl6FEEk0omq9yEISdDA4e6DAhWoEpfA OkNV0ZxJqHTM0gct3g4fo4ixsNExVwPSymdcML71lb/FI6Hnuwev1S3YX5WZiFuNFoyr Kh/TO1ohOBPGdyNeViXv1oXqo8ZYFYZU/IKpMWRggGpSkDTdueMJ//fRP3DJfxhIBbjY SOYGJE3GI1WyfFo5sAqmtcUOH0ExWrzwhNx4UtsXVJNgWwZEB/D25lvs9ijWEHl+AEPp RSwA== 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=nSdtwf8edjqkvQpKOKp6xr2CCq6fB+GF7AwcpC/+Jpk=; b=ChqWtT77jufd8dgz8JrF6PfxPjdiJ9AJ6BTSxSjA5cFUGpFqrUJwbqpKg8V4qLgZ4v xsPgXcMBLgL1xzbqgL+swkvqC9jlEelSem4d7B1VB1oRwalgj9JlWN2cS4kAgvag/k9F UQu0nrdeIXwIwQ68KmQIZqqNwmnguXFWjWvwPBhtDPgD4Jls8W4Klo9zuQFsfUCCsdvz H3IgczyWeqq3xt+1/L+KBmVCAWyJN7APkggyPJt2MyuiKz4HO8TiiYcs6WGSmO93u16X XPCNJSCSio0dOk69NImvRn5uczWDPYukVxG6YaQEmFzjkz0why/GQk34OxidIxaqevyi DUXQ== X-Gm-Message-State: AOAM532OK5PzLTMwLQKT7WRO2habmtmip5qr9rSsQ0yd7z/o+bwwqwTW Lx0XWm+LdXITluKvnQbG3P4Uj8c8vQ3HSTI1mA4oJQrwZhS0fXF+5Zyli6B2vlMN89HPmNeONTr Jb3vTiSvpw1o+F9JmmrzYTHtPOCzzi1ahQH/NR1TpVVnepT4OFHji5PtP3AjJSRfag1rJtIGLEP vQ X-Google-Smtp-Source: ABdhPJxIU9pchhWJF+KSFIDxvP6uMjm2uIrIqG03g0c6Je82fDA9/cIOkWDbrEhR/LkCqup7QD3ehfDDMQtW X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a05:6214:e4d:: with SMTP id o13mr2352142qvc.62.1628857275215; Fri, 13 Aug 2021 05:21:15 -0700 (PDT) Date: Fri, 13 Aug 2021 20:18:12 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.27.I993304df2b51028719fee894c1c78c320719096a@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 27/62] tools/3dsp: 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 "peripheral" is preferred, as reflected in the BT core spec 5.3. --- tools/3dsp.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/tools/3dsp.c b/tools/3dsp.c index 5227c30b63..267a39e904 100644 --- a/tools/3dsp.c +++ b/tools/3dsp.c @@ -112,10 +112,10 @@ static void start_inquiry(void) inquiry_started, NULL, NULL); } -static void set_slave_broadcast_receive(const void *data, uint8_t size, +static void set_peripheral_broadcast_receive(const void *data, uint8_t size, void *user_data) { - printf("Slave broadcast receiption enabled\n"); + printf("Peripheral broadcast reception enabled\n"); } static void sync_train_received(const void *data, uint8_t size, @@ -149,7 +149,7 @@ static void sync_train_received(const void *data, uint8_t size, bt_hci_send(hci_dev, BT_HCI_CMD_SET_PERIPHERAL_BROADCAST_RECEIVE, &cmd, sizeof(cmd), - set_slave_broadcast_receive, NULL, NULL); + set_peripheral_broadcast_receive, NULL, NULL); } static void brcm_sync_train_received(const void *data, uint8_t size, @@ -183,7 +183,7 @@ static void brcm_sync_train_received(const void *data, uint8_t size, bt_hci_send(hci_dev, BT_HCI_CMD_SET_PERIPHERAL_BROADCAST_RECEIVE, &cmd, sizeof(cmd), - set_slave_broadcast_receive, NULL, NULL); + set_peripheral_broadcast_receive, NULL, NULL); } static void truncated_page_complete(const void *data, uint8_t size, @@ -209,7 +209,7 @@ static void truncated_page_complete(const void *data, uint8_t size, NULL, NULL, NULL); } -static void slave_broadcast_timeout(const void *data, uint8_t size, +static void peripheral_broadcast_timeout(const void *data, uint8_t size, void *user_data) { const struct bt_hci_evt_peripheral_broadcast_timeout *evt = data; @@ -226,7 +226,7 @@ static void slave_broadcast_timeout(const void *data, uint8_t size, NULL, NULL, NULL); } -static void slave_broadcast_receive(const void *data, uint8_t size, +static void peripheral_broadcast_receive(const void *data, uint8_t size, void *user_data) { const struct bt_hci_evt_peripheral_broadcast_receive *evt = data; @@ -327,9 +327,9 @@ static void start_glasses(void) bt_hci_register(hci_dev, BT_HCI_EVT_TRUNCATED_PAGE_COMPLETE, truncated_page_complete, NULL, NULL); bt_hci_register(hci_dev, BT_HCI_EVT_PERIPHERAL_BROADCAST_TIMEOUT, - slave_broadcast_timeout, NULL, NULL); + peripheral_broadcast_timeout, NULL, NULL); bt_hci_register(hci_dev, BT_HCI_EVT_PERIPHERAL_BROADCAST_RECEIVE, - slave_broadcast_receive, NULL, NULL); + peripheral_broadcast_receive, NULL, NULL); start_inquiry(); } @@ -381,7 +381,7 @@ static void conn_request(const void *data, uint8_t size, void *user_data) start_sync_train(); } -static void slave_page_response_timeout(const void *data, uint8_t size, +static void peripheral_page_response_timeout(const void *data, uint8_t size, void *user_data) { printf("Incoming truncated page received\n"); @@ -389,8 +389,8 @@ static void slave_page_response_timeout(const void *data, uint8_t size, start_sync_train(); } -static void slave_broadcast_channel_map_change(const void *data, uint8_t size, - void *user_data) +static void peripheral_broadcast_channel_map_change(const void *data, + uint8_t size, void *user_data) { printf("Broadcast channel map changed\n"); @@ -447,13 +447,14 @@ static void read_clock(const void *data, uint8_t size, void *user_data) bcastdata, sizeof(bcastdata), NULL, NULL, NULL); } -static void set_slave_broadcast(const void *data, uint8_t size, void *user_data) +static void set_peripheral_broadcast(const void *data, uint8_t size, + void *user_data) { const struct bt_hci_rsp_set_peripheral_broadcast *rsp = data; struct bt_hci_cmd_read_clock cmd; if (rsp->status) { - printf("Failed to set slave broadcast transmission\n"); + printf("Failed to set peripheral broadcast transmission\n"); shutdown_device(); return; } @@ -493,10 +494,10 @@ static void start_display(void) conn_request, NULL, NULL); bt_hci_register(hci_dev, BT_HCI_EVT_PERIPHERAL_PAGE_RESPONSE_TIMEOUT, - slave_page_response_timeout, NULL, NULL); + peripheral_page_response_timeout, NULL, NULL); bt_hci_register(hci_dev, BT_HCI_EVT_PERIPHERAL_BROADCAST_CHANNEL_MAP_CHANGE, - slave_broadcast_channel_map_change, NULL, NULL); + peripheral_broadcast_channel_map_change, NULL, NULL); bt_hci_register(hci_dev, BT_HCI_EVT_SYNC_TRAIN_COMPLETE, sync_train_complete, NULL, NULL); @@ -512,7 +513,7 @@ static void start_display(void) cmd.timeout = cpu_to_le16(0xfffe); bt_hci_send(hci_dev, BT_HCI_CMD_SET_PERIPHERAL_BROADCAST, &cmd, - sizeof(cmd), set_slave_broadcast, NULL, NULL); + sizeof(cmd), set_peripheral_broadcast, NULL, NULL); } static void signal_callback(int signum, void *user_data) From patchwork Fri Aug 13 12:18:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 496654 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.2 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, URIBL_BLOCKED, 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 4F859C4338F for ; Fri, 13 Aug 2021 12:21:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3885C610A4 for ; Fri, 13 Aug 2021 12:21:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240446AbhHMMVs (ORCPT ); Fri, 13 Aug 2021 08:21:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240449AbhHMMVq (ORCPT ); Fri, 13 Aug 2021 08:21:46 -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 6CC25C0617AE for ; Fri, 13 Aug 2021 05:21:19 -0700 (PDT) Received: by mail-pj1-x104a.google.com with SMTP id w13-20020a17090a8a0d00b00179486bdfe9so702469pjn.9 for ; Fri, 13 Aug 2021 05:21: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=x2iqq46sI5isY1ui4xMROkakG4OluQ0GLwjzevnswfo=; b=hY46A3Eb/z2StqtEamiPRhsMrnaLmd0Rh8Amgp+LlXoaj/UBds3oWAzbC4PTqCZ10e b1mtvgpr8t80Me1BIyItfvkyQO5J18BeKCDzEqsu47lY5wQPRpkDGm8ap+x2IIKH9jaE u09Tc/agnyJDt8QsB3xrMd/XYh2GhaBZkhOGVfOsltgltPVZNBR7Hrue2xy5PuPgArSr R4SJjzV7VxOIguCWaOT+Tal3omXVtoZrd0yLaDByF71SxEn9/CrzG/Z+VakmX3xZc+DB UXEtMPuYvSPH0Gr5ahpR76925JS3de5UuwZrgSAM6CYcbi3P0R7/iWMy0d+fl13v1eiB al8Q== 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=x2iqq46sI5isY1ui4xMROkakG4OluQ0GLwjzevnswfo=; b=de8zh4GnR/drBMf0FArddDq64I6bcca42sYk2clk3unIX1YqhCya0PIxyym0tW2NgA xCyRHCjX7wHZbZ98m6OqTh2julV0ZmIabnL+dZoyEX8OLFU5pNBQnsSs9DUFM48JWE6p WaXWNQhjJI9rvRwiNm4k6wfhCTXvnGUH/eRftnbXH2Et0GOLjuaV2ie/8Wl9sdE3lLFr EJN43EHtuvP2IH9o9AJzELYVvMoPuyxrW0C0HsL6Sgn29s5AyuOfQZjDsmG2gSjLh9JC mvp43e5ctCIO4Ttsc5kZXXQ3spevI/C96w1ftkylH6Je2+jX8nAAyuUue4V1ycaTxKcP 7XTQ== X-Gm-Message-State: AOAM5317KIiCOHKs8SeZGOU5m001R4BiA39LiXBMK6OPtV1RWqPsKHYp OS1BysGV3itAqGfPh4GniXIuLbOO0WXlUjEY8+2y+LzUsMDN5s6dSDnXOqazTPLYJ8IB7KuRVne I7gmgtsbkVeoYAuBlpWTyAj6IIMAFqb00jSnaC2xnQoNn6Aqv3W7oHYIOW9RlKSFxW7l836cZeG K+ X-Google-Smtp-Source: ABdhPJxo5OFPSslaAazQ6uFSE+7CjV74XOXXijzeo2he7QaVu5NNxEBZ52txdtdodkHPpbN68Dj+sSTb2zhJ X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a17:903:2301:b029:12c:b19a:9d40 with SMTP id d1-20020a1709032301b029012cb19a9d40mr1952868plh.33.1628857278815; Fri, 13 Aug 2021 05:21:18 -0700 (PDT) Date: Fri, 13 Aug 2021 20:18:13 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.28.I188456b533753f56c46362ab5268053090cb26f0@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 28/62] tools/mgmt-tester: 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 "central", "peripheral", and "accept list" are the preferred terms, as reflected in the BT core spec 5.3. --- tools/mgmt-tester.c | 87 +++++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 43 deletions(-) diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index 04c4393a09..7f067cfbc5 100644 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -2698,20 +2698,20 @@ static const char load_ltks_invalid_param_2[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, /* bdaddr */ 0x00, /* addr type */ 0x00, /* authenticated */ - 0x00, /* master */ + 0x00, /* central */ 0x00, /* encryption size */ 0x00, 0x00, /* diversifier */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* rand */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* value (1/2) */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* value (2/2) */ }; -/* Invalid master value */ +/* Invalid central value */ static const char load_ltks_invalid_param_3[] = { 0x01, 0x00, /* count */ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, /* bdaddr */ 0x01, /* addr type */ 0x00, /* authenticated */ - 0x02, /* master */ + 0x02, /* central */ 0x00, /* encryption size */ 0x00, 0x00, /* diversifier */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* rand */ @@ -4233,7 +4233,7 @@ static const uint8_t add_device_success_param_6[] = { 0x02, }; -static const uint8_t le_add_to_white_list_param[] = { +static const uint8_t le_add_to_accept_list_param[] = { 0x00, /* Type */ 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, /* Address */ }; @@ -4249,8 +4249,8 @@ static const struct generic_data add_device_success_6 = { .expect_alt_ev_param = add_device_success_param_6, .expect_alt_ev_len = sizeof(add_device_success_param_6), .expect_hci_command = BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST, - .expect_hci_param = le_add_to_white_list_param, - .expect_hci_len = sizeof(le_add_to_white_list_param), + .expect_hci_param = le_add_to_accept_list_param, + .expect_hci_len = sizeof(le_add_to_accept_list_param), }; static const uint8_t le_add_to_resolv_list_param[] = { @@ -4419,8 +4419,8 @@ static const struct generic_data remove_device_success_7 = { .expect_len = sizeof(remove_device_param_2), .expect_status = MGMT_STATUS_SUCCESS, .expect_hci_command = BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST, - .expect_hci_param = le_add_to_white_list_param, - .expect_hci_len = sizeof(le_add_to_white_list_param), + .expect_hci_param = le_add_to_accept_list_param, + .expect_hci_len = sizeof(le_add_to_accept_list_param), .expect_alt_ev = MGMT_EV_DEVICE_REMOVED, .expect_alt_ev_param = remove_device_param_2, .expect_alt_ev_len = sizeof(remove_device_param_2), @@ -4434,8 +4434,8 @@ static const struct generic_data remove_device_success_8 = { .expect_len = sizeof(remove_device_param_2), .expect_status = MGMT_STATUS_SUCCESS, .expect_hci_command = BT_HCI_CMD_LE_REMOVE_FROM_RESOLV_LIST, - .expect_hci_param = le_add_to_white_list_param, - .expect_hci_len = sizeof(le_add_to_white_list_param), + .expect_hci_param = le_add_to_accept_list_param, + .expect_hci_len = sizeof(le_add_to_accept_list_param), .expect_alt_ev = MGMT_EV_DEVICE_REMOVED, .expect_alt_ev_param = remove_device_param_2, .expect_alt_ev_len = sizeof(remove_device_param_2), @@ -5336,40 +5336,40 @@ static const struct generic_data read_local_oob_success_sc_test = { .expect_hci_command = BT_HCI_CMD_READ_LOCAL_OOB_EXT_DATA, }; -static const uint8_t le_states_conn_slave_adv_connectable[] = { +static const uint8_t le_states_conn_peripheral_adv_connectable[] = { 0x00, 0x00, 0x20, 0x00, 0x40, 0x00, 0x00, 0x00}; -static const uint8_t le_states_conn_slave_adv_non_connectable[] = { +static const uint8_t le_states_conn_peripheral_adv_non_connectable[] = { 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}; -static const uint8_t le_states_conn_master_adv_connectable[] = { +static const uint8_t le_states_conn_central_adv_connectable[] = { 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00}; -static const uint8_t le_states_conn_master_adv_non_connectable[] = { +static const uint8_t le_states_conn_central_adv_non_connectable[] = { 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00}; -static const struct generic_data conn_slave_adv_conneactable_test = { +static const struct generic_data conn_peripheral_adv_connectable_test = { .setup_le_states = true, - .le_states = le_states_conn_slave_adv_connectable, + .le_states = le_states_conn_peripheral_adv_connectable, .setup_settings = settings_powered_le, .client_enable_le = true }; -static const struct generic_data conn_slave_adv_non_conneactable_test = { +static const struct generic_data conn_peripheral_adv_non_connectable_test = { .setup_le_states = true, - .le_states = le_states_conn_slave_adv_non_connectable, + .le_states = le_states_conn_peripheral_adv_non_connectable, .setup_settings = settings_powered_le, .client_enable_le = true }; -static const struct generic_data conn_master_adv_conneactable_test = { +static const struct generic_data conn_central_adv_connectable_test = { .setup_le_states = true, - .le_states = le_states_conn_master_adv_connectable, + .le_states = le_states_conn_central_adv_connectable, .setup_settings = settings_powered_le, .client_enable_le = true, .client_enable_adv = 1 }; -static const struct generic_data conn_master_adv_non_conneactable_test = { +static const struct generic_data conn_central_adv_non_connectable_test = { .setup_le_states = true, - .le_states = le_states_conn_master_adv_non_connectable, + .le_states = le_states_conn_central_adv_non_connectable, .setup_settings = settings_powered_le, .client_enable_le = true, .client_enable_adv = 1 @@ -10874,9 +10874,9 @@ int main(int argc, char *argv[]) &add_device_success_5, NULL, test_command_generic); /* MGMT_OP_ADD_DEVICE - * Add device and check the device is added to the whitelist + * Add device and check the device is added to the accept list */ - test_bredrle50("Add Device - Success 6 - Add to whitelist", + test_bredrle50("Add Device - Success 6 - Add to accept list", &add_device_success_6, NULL, test_command_generic); /* MGMT_OP_ADD_DEVICE @@ -10928,7 +10928,7 @@ int main(int argc, char *argv[]) * Remove the device and check the device is removed from the whilte * list as well. */ - test_bredrle50("Remove Device - Success 7 - Remove from whitelist", + test_bredrle50("Remove Device - Success 7 - Remove from accept list", &remove_device_success_7, setup_ll_privacy_device2, test_command_generic); /* MGMT_OP_REMOVE_DEVICE @@ -11135,23 +11135,24 @@ int main(int argc, char *argv[]) &add_advertising_name_data_appear, setup_command_generic, test_command_generic); - test_le_full("Adv. connectable & connected (slave) - Success", - &conn_slave_adv_conneactable_test, - setup_advertise_while_connected, - test_connected_and_advertising, 10); - test_le_full("Adv. non-connectable & connected (slave) - Success", - &conn_slave_adv_non_conneactable_test, + test_le_full("Adv. connectable & connected (peripheral) - Success", + &conn_peripheral_adv_connectable_test, setup_advertise_while_connected, test_connected_and_advertising, 10); - test_le_full("Adv. connectable & connected (master) - Success", - &conn_master_adv_conneactable_test, + test_le_full("Adv. non-connectable & connected (peripheral) - Success", + &conn_peripheral_adv_non_connectable_test, + setup_advertise_while_connected, + test_connected_and_advertising, 10); + + test_le_full("Adv. connectable & connected (central) - Success", + &conn_central_adv_connectable_test, setup_advertise_while_connected, test_connected_and_advertising, 10); - test_le_full("Adv. non-connectable & connected (master) - Success", - &conn_master_adv_non_conneactable_test, + test_le_full("Adv. non-connectable & connected (central) - Success", + &conn_central_adv_non_connectable_test, setup_advertise_while_connected, test_connected_and_advertising, 10); @@ -11547,23 +11548,23 @@ int main(int argc, char *argv[]) &device_found_invalid_field, NULL, test_device_found); - test_bredrle50_full("Ext Adv. connectable & connected (slave) - Success", - &conn_slave_adv_conneactable_test, + test_bredrle50_full("Ext Adv. connectable & connected (peripheral) - Success", + &conn_peripheral_adv_connectable_test, setup_advertise_while_connected, test_connected_and_advertising, 10); - test_bredrle50_full("Ext Adv. non-connectable & connected (slave) - Success", - &conn_slave_adv_non_conneactable_test, + test_bredrle50_full("Ext Adv. non-connectable & connected (peripheral) - Success", + &conn_peripheral_adv_non_connectable_test, setup_advertise_while_connected, test_connected_and_advertising, 10); - test_bredrle50_full("Ext Adv. connectable & connected (master) - Success", - &conn_master_adv_conneactable_test, + test_bredrle50_full("Ext Adv. connectable & connected (central) - Success", + &conn_central_adv_connectable_test, setup_advertise_while_connected, test_connected_and_advertising, 10); - test_bredrle50_full("Ext Adv. non-connectable & connected (master) - Success", - &conn_master_adv_non_conneactable_test, + test_bredrle50_full("Ext Adv. non-connectable & connected (central) - Success", + &conn_central_adv_non_connectable_test, setup_advertise_while_connected, test_connected_and_advertising, 10); From patchwork Fri Aug 13 12:18:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 497150 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.2 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, URIBL_BLOCKED, 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 BCBDFC432BE for ; Fri, 13 Aug 2021 12:21:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A0A08610FA for ; Fri, 13 Aug 2021 12:21:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240452AbhHMMVu (ORCPT ); Fri, 13 Aug 2021 08:21:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240445AbhHMMVt (ORCPT ); Fri, 13 Aug 2021 08:21:49 -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 522D3C0617AD for ; Fri, 13 Aug 2021 05:21:23 -0700 (PDT) Received: by mail-qv1-xf4a.google.com with SMTP id ay14-20020a056214048eb0290357469934easo6910292qvb.8 for ; Fri, 13 Aug 2021 05:21: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=KYlyQQIN3E7Rj0f5GSG7xn2rJTGXll0Q+fAMZgpIuSo=; b=mFMuqbqmAiquxpaO3cyqiZvW2l3rzKMhY4wiHsoZ0OHWc8k+ViJIVAs6kIHrh+Iyq7 bXIDE81tVpyWIj4S4MZZ6cY6xOR8YiVxj1d7ChWVOAbgk5TEex5LgoRnCh8pW3Zfh6h6 EOzGVKtmc7UgQWGGxBrT+aaCasTovixqTa9ifH7itd5ewjUB6SECgHRU7MIR87GcMgWH uJL/Aja2UyXUKlVIwtkrRN1SdKLKfVQzQdWmdJrkj377Yh6JqkSHl50/Cinxvis7HwCn 8xN2+j0ShGR6Z/rV1C9CdI5vqWPsz7zsNx3q/GAsaCJKHO7z7GXRxzLvgrxcRunfoJMp 8SRA== 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=KYlyQQIN3E7Rj0f5GSG7xn2rJTGXll0Q+fAMZgpIuSo=; b=GVPaax1Lu7hUxwDC6tEKLb2n0TyWqYd54XFfY3KJcp9iZPEf8f2HasCVdOUrE2T53q USLDczUpmQOGdMDKxCxK/rBM9FbnjXx/uyJLr3Zfpl5WpRICxLDgKbR7zt64gjT+IAgr Kz+K06jgETmXfLRq4IuUDQTZU3BFwZu1qUea2oCMrmKgkVQ8N2lmRPpg+LHqaWFQtYO8 a0xV8z+YRLUnMII2vEvWzNTMJ807gDG6lNKjX1wh8e8QoczD6I1+d/xYcszsVfPAKb57 7nAcQY6ALgKpgsT7ONbzs1Ds5xK7TwVcfL3RDtWs8wM8D0nzOgZrzrIWhoyUNUWchabT j3fA== X-Gm-Message-State: AOAM5311Id4dNBUbOQtsRC9k4HtO+W4gWA7bP/FFAzl9/ABuRB0FfMrf RSNxmCxLdjaZ0pdJSAGTCKGkZbN7Vg7KdDtMuPHdAWIcxbgLZp3XedAEq4gZcCXHgr3g5D6v9E9 G4RnUwWCmJWRByNinFSpdLT2xy7O75t5+fFvtrkULuMQ5dSrENWG4p1iQzL+ripFBdCQPwTGlUg do X-Google-Smtp-Source: ABdhPJxkXTzWyFtjcY8wY1wdJXgzqIVWPVQyKmpOwPXNco19bUU+IYxkcM0LGEWmX6Sg5BTh704aIhBLU/NT X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a05:6214:21ed:: with SMTP id p13mr1834350qvj.49.1628857282384; Fri, 13 Aug 2021 05:21:22 -0700 (PDT) Date: Fri, 13 Aug 2021 20:18:14 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.29.I2516e9e453733ffe40e7c0cb090cddb842a36730@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 29/62] tools/bdaddr: 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 "consolidated file", to follow the usage of "consolidated table" in BT core spec 5.3. --- tools/bdaddr.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bdaddr.rst b/tools/bdaddr.rst index 1d21e2ca39..a84950bc35 100644 --- a/tools/bdaddr.rst +++ b/tools/bdaddr.rst @@ -61,7 +61,7 @@ FILES ===== /usr/share/misc/oui.txt - IEEE Organizationally Unique Identifier master file. + IEEE Organizationally Unique Identifier consolidated file. Manually update from: http://standards.ieee.org/regauth/oui/oui.txt From patchwork Fri Aug 13 12:18:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 496653 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.2 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, URIBL_BLOCKED, 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 2E5A9C4338F for ; Fri, 13 Aug 2021 12:21:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0E4EF610A4 for ; Fri, 13 Aug 2021 12:21:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240449AbhHMMVy (ORCPT ); Fri, 13 Aug 2021 08:21:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240445AbhHMMVx (ORCPT ); Fri, 13 Aug 2021 08:21:53 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAEFCC061756 for ; Fri, 13 Aug 2021 05:21:26 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id x5-20020a0569020505b0290592c25b8c59so8956948ybs.18 for ; Fri, 13 Aug 2021 05:21:26 -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=7BkEGxjBIFv6NdrePU/6M5vHMKKs9MONg7YK1ajPNFc=; b=UvvdT3JIBhzHCsVY+WublSyOCk5SA94hLNU+naC4dsODNyDbUF1Z5IAkrxChsYF95D RKZryxFtd/30IhyI35mIqaZh3fjvJhZuVYQPjVq8NRLB4xCVnV69yx5d9m+XFSNF2/UM JvsWLLBT/45TftRMIF91BDeSA4ffBxKFGmXBug3r/Rhdt0Q5DeedVVyQ0acV4RJfvody VRb+y1MXRNfQs0MW7BV8K37bpQ8f2d1mX+bCHQuvxyeKW/TyptmVIdcHJaMUsq88gBsb N76uuj4cs5suISYvVh+1w80oo1kECGElt20UKPfcpS5NrmxnmmIKLaZeoHpXT+XOMtkg Updg== 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=7BkEGxjBIFv6NdrePU/6M5vHMKKs9MONg7YK1ajPNFc=; b=ZhXoH7Jj+igTLpMutX6tboZh21QF0supiIQ8++dVBF+9znExRE2YP9qs0LZlU2sV2m jN874Kpmtz1YdV2BmgTqVMdsw3ivJ7Wlao2neCX2DdKHkSHa++0SaF63Jr9AAqVMOobU Fgs6/Mo7naTpMjOWoC9sTMK8gD7Nw5IhkqECjsIC5Sm7GKnKiviRiJYCWWe//3+9lG1n sACysOMITRJg2mPBcp0OKTQ3IE7RkCqxFgPx2sn7UcuedKL9F25+ZFhaY3QdJXszslM8 WWOhAeAm/1YQCtcwEoo2X5PsIk47jD+KYZvobwN2iPFhW1293clQnIQm9h3n4zyUu/6B fbYA== X-Gm-Message-State: AOAM533g/RgTam3W0BicpaeKoRVJQGNRlc07ploCMa5RtBjJU6VK8O8J DxesaktIh2F4tjWSleyvoPhOOZ7PjMt93eSjatmSWSxRlOBIFd3Bv1gxeE/c/Cdwx5IqN8CuJx6 MpOzwWrwGKkiKne1VeckLeMWPQf3GJjbjBVBbiAOsd3TSp1yOu0fsNQUXuu2YlYlesjyjnC11uH ie X-Google-Smtp-Source: ABdhPJwk1qVeIh8j5jRchL3iozR4vZ5QkWmC0VycU8XCcvYv1TcaG8nWPuLQVzyzGco3u/cOVNtxqHPFXYb5 X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a25:4086:: with SMTP id n128mr2495813yba.247.1628857286133; Fri, 13 Aug 2021 05:21:26 -0700 (PDT) Date: Fri, 13 Aug 2021 20:18:15 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.30.I89b23b8f5038b24df78e7108c9bfc7fef9aee423@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 30/62] tools/hciconfig: 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 "central", "peripheral", and "reject list" are the preferred terms, as reflected in the BT core spec 5.3 and https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf --- tools/hciconfig.c | 26 +++++++++++++------------- tools/hciconfig.rst | 4 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tools/hciconfig.c b/tools/hciconfig.c index 491f216135..2bc9fe84c3 100644 --- a/tools/hciconfig.c +++ b/tools/hciconfig.c @@ -116,8 +116,8 @@ static void print_le_states(uint64_t states) "Directed Advertising State", "Passive Scanning State", "Active Scanning State", - "Initiating State/Connection State in Master Role", - "Connection State in the Slave Role", + "Initiating State/Connection State in Central Role", + "Connection State in the Peripheral Role", "Non-connectable Advertising State and Passive Scanning State combination", "Scannable Advertising State and Passive Scanning State combination", "Connectable Advertising State and Passive Scanning State combination", @@ -128,17 +128,17 @@ static void print_le_states(uint64_t states) "Directed Advertising State and Active Scanning State combination", "Non-connectable Advertising State and Initiating State combination", "Scannable Advertising State and Initiating State combination", - "Non-connectable Advertising State and Master Role combination", - "Scannable Advertising State and Master Role combination", - "Non-connectable Advertising State and Slave Role combination", - "Scannable Advertising State and Slave Role combination", + "Non-connectable Advertising State and Central Role combination", + "Scannable Advertising State and Central Role combination", + "Non-connectable Advertising State and Peripheral Role combination", + "Scannable Advertising State and Peripheral Role combination", "Passive Scanning State and Initiating State combination", "Active Scanning State and Initiating State combination", - "Passive Scanning State and Master Role combination", - "Active Scanning State and Master Role combination", - "Passive Scanning State and Slave Role combination", - "Active Scanning State and Slave Role combination", - "Initiating State and Master Role combination/Master Role and Master Role combination", + "Passive Scanning State and Central Role combination", + "Active Scanning State and Central Role combination", + "Passive Scanning State and Peripheral Role combination", + "Active Scanning State and Peripheral Role combination", + "Initiating State and Central Role combination/Central Role and Central Role combination", NULL }; @@ -1922,8 +1922,8 @@ static struct { { "features", cmd_features, 0, "Display device features" }, { "version", cmd_version, 0, "Display version information" }, { "revision", cmd_revision, 0, "Display revision information" }, - { "block", cmd_block, "", "Add a device to the blacklist" }, - { "unblock", cmd_unblock, "", "Remove a device from the blacklist" }, + { "block", cmd_block, "", "Add a device to the reject list" }, + { "unblock", cmd_unblock, "", "Remove a device from the reject list" }, { "lerandaddr", cmd_le_addr, "", "Set LE Random Address" }, { "leadv", cmd_le_adv, "[type]", "Enable LE advertising" "\n\t\t\t0 - Connectable undirected advertising (default)" diff --git a/tools/hciconfig.rst b/tools/hciconfig.rst index 6141fc2be7..2d56eeb413 100644 --- a/tools/hciconfig.rst +++ b/tools/hciconfig.rst @@ -230,10 +230,10 @@ lm [*mode*] sockets. block <*bdaddr*> - Add a device to the blacklist + Add a device to the reject list unblock <*bdaddr*> - Remove a device from the blacklist + Remove a device from the reject list lerandaddr <*bdaddr*> Set LE Random Address From patchwork Fri Aug 13 12:18:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 497149 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.2 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, URIBL_BLOCKED, 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 322B7C432BE for ; Fri, 13 Aug 2021 12:21:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1BB4760F00 for ; Fri, 13 Aug 2021 12:21:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240454AbhHMMV6 (ORCPT ); Fri, 13 Aug 2021 08:21:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240455AbhHMMV5 (ORCPT ); Fri, 13 Aug 2021 08:21:57 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA73AC0617AE for ; Fri, 13 Aug 2021 05:21:30 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id p71-20020a25424a0000b029056092741626so8938086yba.19 for ; Fri, 13 Aug 2021 05:21:30 -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=0K76jy7xQ+CS7QZZBof7U3SDrGmRBJr5J4axI2I3BAI=; b=fl8DyJyk7GlyyKUSW7ydxbKkBroi7M395JGxopCNqvarZt2/xbYsjmfBHAtXkaugrh NR1MkldtcfekzUOVEEGXdTh4cDO59zC+dpgCD387ZwSfS5YuGzhnSw+QZXje/AiVqu8Y JepU6vnQYQHrOAX7lJIl3Zd+Dcd5DuAF77tjgW9uDfS4bvP8AdGhNyl6L6R96p4uTJNA 2XlB2be8YADSc9cffQuyJrPIEP3rV8M1XWOitv0V88UfGJ1EIR8H74QGbbuH/8z8s1uP cSE3CQLNoc7J+MCjZ0EVQBCEtdlmsv5D2PdGtrs1f27luAQORZQnbMTg0TWbceRjYZhM XKjw== 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=0K76jy7xQ+CS7QZZBof7U3SDrGmRBJr5J4axI2I3BAI=; b=Oe7aMSHHVocqp7+bdW4upCE4bYGppdsOEtW5uca27A4GWOIme6Y3V1BMgVKv5apMgH 5g7W6hCOGHFvkP016Rmkc4dnjjVMb279ndOBrxS5ceMK+1ZzR3kf7xcAr1J/ARCvGDbE NeV1DTcY8m1LNr23rRUvkA87hKECqV37NYFIvUKoFP72X1gfqWxj07eY/qCNmbCzEiW6 am/E/QjvPNAaEHF21m5haeEYb3XdP2EyBgOxBj/RZLH2n076/t201O10yGKqdYUaiUFc J08uOklI+FVp5kulUY9cAZswsZIHe5l4uhinIOF6Jt2nM6jhTcW9gr6aU26NfHM9wT3r Qs7A== X-Gm-Message-State: AOAM531v+z2LhLxhWiZ0WfgpVibSqjkHgdo1Y7mYWrHn+VPT0IatR0Xe P7W/b9Y7TBEOmh7PcpbfbQm9chypB+CRm40dqBVZoZ//H70ClPUyj8Xz1O/7NozfPP7qIBIRBlg jC+E8ERCB9xCFdDno5SAjwBr8Zcr0DG7BTiZ9rHkmyLct4j4GPEN5FXWb6S+NuyWgoT+PbFQ+na tB X-Google-Smtp-Source: ABdhPJxIqJz9fXOR7gWpqbGEcSYlTppifXGvi9Crj2DUtwZrdmHwQw6C6nzv+cm5nNhcCwe3i4XniQp2ozxU X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a25:cf82:: with SMTP id f124mr2817024ybg.58.1628857290120; Fri, 13 Aug 2021 05:21:30 -0700 (PDT) Date: Fri, 13 Aug 2021 20:18:16 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.31.Ib8aef56c04854b18342a791302d3460a40fff3e2@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 31/62] tools/meshctl: 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 the hierarchy. --- tools/meshctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/meshctl.c b/tools/meshctl.c index 9d7df2ccdc..18e20c40d2 100644 --- a/tools/meshctl.c +++ b/tools/meshctl.c @@ -541,19 +541,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 Fri Aug 13 12:18:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 496652 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.2 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, URIBL_BLOCKED, 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 D45F9C4320E for ; Fri, 13 Aug 2021 12:21:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B600460F46 for ; Fri, 13 Aug 2021 12:21:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240467AbhHMMWB (ORCPT ); Fri, 13 Aug 2021 08:22:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240473AbhHMMWA (ORCPT ); Fri, 13 Aug 2021 08:22:00 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E498C061756 for ; Fri, 13 Aug 2021 05:21:34 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id f3-20020a25cf030000b029055a2303fc2dso9025479ybg.11 for ; Fri, 13 Aug 2021 05:21:34 -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=m6PNpVn9SnFo5vrFodpmglO6Nfvo+NAI8KogPbsCQck=; b=qZn/SwIbhFwSPnZ3O04tW8EGeuN5wJHazJ1NdOMSS0zrI1rj0YYAb2XUeA3qqDianU /V06/06K1/FRwfU843sOXQGGhWKh6l4qlDC4sqP1kxK210w8zdcylNciNRvGHWWHTRpK Ggo1g5jXoK05tmwnfbv+fP/czOVRqVS53BV38n7Y3Cs8UhSqiDLdcb/zCnMNV2MHbxne gc6iGUFxuCkaby0XL9X++Blyfp2F4WWqZpmkZasKzbx17ZaS5FLdaAiP/tPcWWj0XoB9 rXNRwgcfiiEuib5VFJP+9MjQ9K4Y3ZEEC7Y8COaT5Nrl3t350l7cOZssKvYZhHlmmRSA 6txg== 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=m6PNpVn9SnFo5vrFodpmglO6Nfvo+NAI8KogPbsCQck=; b=IoNSrzwvSVxryXQfT7bodfi8CTpjLrNSS+vFnuGpTnY9ito/FobpvxL6DuPS5ZeYFo EpDO2xOWDMMUsoT5F4Dra+JUGrsZXIHGkpFKBDTuRX650KZla55QBxQMW7MJEbeMKPeh qkYaOaETL2/mNr6I/DVdgwetDvzpcfOjy7nVRZYvjb+KDfvUauW3zn/pZnzAoeyJVw6R p3PRUQnos8TzREYZTAEyeE8h327bmSN2L+k0x7ps14YmDYVG5hQHzMUFHgUGb4tRxaP/ na2cpl/xvck2H6etx8KJkNzCSxAeyirgSK1EAEaSYRE62DfYGPFn+hPhX7wCkzZi2FIr Zc7w== X-Gm-Message-State: AOAM532QBZJT8yY/+DMaFYOM2ERLIAchXl8S1fnV/60CRa37Ph003nbW ibh5wgc8ggLluZk5WdosnkQamrQ5DKnKZWL1i/aiVpY6Oml6DmZWLLx0DWCbhrau8wlYM2IeQZY BTQ7lA3jrP+VzZtnMAwrnoA1vnAszF6scU6qoYCl7oG3dRqRWCVrVskByi4TN5ALvTuvQyxviS7 rG X-Google-Smtp-Source: ABdhPJzhG3nh8m3vVBR/hCsC0dw6fJoGhcEGhcj8LfKzxKRiSjk1l1+w1wr627Ib2FnfMYUsL0f/O5EXPsS4 X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a25:ef04:: with SMTP id g4mr2482227ybd.287.1628857293298; Fri, 13 Aug 2021 05:21:33 -0700 (PDT) Date: Fri, 13 Aug 2021 20:18:17 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.32.I8ac883404f7e143bba977d10f1657eaf8096af31@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 32/62] tools/mgmt-tester: 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 "central" and "peripheral" are the preferred terms, as reflected in the BT core spec 5.3. --- tools/oobtest.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/oobtest.c b/tools/oobtest.c index 0368bc3865..eed765af02 100644 --- a/tools/oobtest.c +++ b/tools/oobtest.c @@ -134,15 +134,15 @@ static void new_long_term_key_event(uint16_t index, uint16_t len, switch (ev->key.type) { case 0x00: if (ev->key.central) - type = "Unauthenticated, Master"; + type = "Unauthenticated, Central"; else - type = "Unauthenticated, Slave"; + type = "Unauthenticated, Peripheral"; break; case 0x01: if (ev->key.central) - type = "Authenticated, Master"; + type = "Authenticated, Central"; else - type = "Authenticated, Slave"; + type = "Authenticated, Peripheral"; break; case 0x02: type = "Unauthenticated, P-256"; From patchwork Fri Aug 13 12:18:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 497148 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.2 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, URIBL_BLOCKED, 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 30227C4338F for ; Fri, 13 Aug 2021 12:21:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1471760F46 for ; Fri, 13 Aug 2021 12:21:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240477AbhHMMWE (ORCPT ); Fri, 13 Aug 2021 08:22:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240473AbhHMMWE (ORCPT ); Fri, 13 Aug 2021 08:22:04 -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 BBE44C061756 for ; Fri, 13 Aug 2021 05:21:37 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id p71-20020a25424a0000b029056092741626so8938350yba.19 for ; Fri, 13 Aug 2021 05:21:37 -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=mV/a07kESpiok3ffMQFxsbU4zefr2YbKZwOmfiHNvKU=; b=e9MWzrAUDDlTtAJ3jj+LtUNiFx+GgV88UPB3xH2PzlmtgAK/Jb/ImTnBgVAj3mT7de zkIW7oqS14FHbV6ERA7f1QdyV0EhD2LFWz50lBvgPYRUzM3FzxdDtHJnrNLClbufz5kZ /O98VTbY0SUzMrnKfzRTklJRXpsswRSr1PP5lqamZ58d9i0ysyZDd8Z+kCmLaHHoV58T /2EDJyyDaVMsE0v5jHtpxW4/zUbv/S1GvNYfjcrBZoYZPaiudytrpcfR8+j58Y8p9t2Z VbHZbhJhbsdOzcJDV8OinsmsHI0AUmbEDB/oDXmB5ALwTBxz30Hx2L8YX/w//Gk0njtm bZyg== 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=mV/a07kESpiok3ffMQFxsbU4zefr2YbKZwOmfiHNvKU=; b=mA6RArVbqW67vP9/Yh5F0dsXW/BKNqs0wkoE4HPIiWZyY8F3yfWORoUylp5uTdjU7g 7F0Eiz87sxl288DJ+Sr2D5SarkbmhYfTJ5XwVa5kZLKIQ/SUKvSKq+gq2cES7qI/0u18 SEvmj01k/E0gnUqmXd1u4+6u4IM+1/lDlOGQhgPctNmK182KT6FncWi4dKMhawShbOq6 ZJ8Fs1af5DZHOn1penLrgsk3NCOSceYS8Oqhf+PKAZ9Bh9Wfb1TcrWfpT3Alk2IshVCi rJfaNizvn3fHbzxdDqcxA2lVzc6MnAwyFvs8Us3bs2Dd9C+7cusnPMqG+d38kA1KgPEs vJ1w== X-Gm-Message-State: AOAM533BW+8Hd5hPhIfVHBO2ErX0ftbHICeT4Kgg+V/JaI0LeDVJ4NNC 7ybShl8Myy7uddHPBUeJXa9hdlxZU05iEWQ3brBM60cmgzh6NcBc+eIJui/TwWRQmeRpGCZr+fZ MSZqmLd0ZcQpAnwsrPTb3VCBnxWkraAtjfHFyMsPrMkXrakS6lMPgFoPWXY7uEFcfo3XVbmvIUf sm X-Google-Smtp-Source: ABdhPJwW0w0+51cQoHokgPShgRGn4KWBT4IhpH1j+0na+eCvm4d8MiC74DXJ1AwtJ2lOWaCjwe72o+tE3OsN X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a25:1056:: with SMTP id 83mr2679013ybq.52.1628857296961; Fri, 13 Aug 2021 05:21:36 -0700 (PDT) Date: Fri, 13 Aug 2021 20:18:18 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.33.Icc03248573f06536dd4fa98d04510491d07538ed@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 33/62] tools/parser: Inclusive language in struct member 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 "central" is preferred, as reflected in the BT core spec 5.3. --- tools/parser/csr.c | 4 ++-- tools/parser/ericsson.c | 2 +- tools/parser/lmp.c | 2 +- tools/parser/parser.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/parser/csr.c b/tools/parser/csr.c index c112e138b1..36efc46332 100644 --- a/tools/parser/csr.c +++ b/tools/parser/csr.c @@ -564,13 +564,13 @@ void csr_dump(int level, struct frame *frm) switch (type) { case 0x0f: frm->handle = ((uint8_t *) frm->ptr)[17]; - frm->master = 0; + frm->central = 0; frm->len--; lmp_dump(level, frm); return; case 0x10: frm->handle = ((uint8_t *) frm->ptr)[17]; - frm->master = 1; + frm->central = 1; frm->len--; lmp_dump(level, frm); return; diff --git a/tools/parser/ericsson.c b/tools/parser/ericsson.c index 09b7cec68f..b2807eca59 100644 --- a/tools/parser/ericsson.c +++ b/tools/parser/ericsson.c @@ -29,7 +29,7 @@ void ericsson_dump(int level, struct frame *frm) raw_dump(level, frm); } - frm->master = !(buf[0] & 0x01); + frm->central = !(buf[0] & 0x01); frm->handle = buf[1] | (buf[2] << 8); buf[5] = (buf[5] << 1) | (buf[3] & 0x01); diff --git a/tools/parser/lmp.c b/tools/parser/lmp.c index e99902b0e6..8c5a228c03 100644 --- a/tools/parser/lmp.c +++ b/tools/parser/lmp.c @@ -1141,7 +1141,7 @@ void lmp_dump(int level, struct frame *frm) opcode += tmp << 7; } - printf("LMP(%c): %s(%c): ", frm->master ? 's' : 'r', + printf("LMP(%c): %s(%c): ", frm->central ? 's' : 'r', opcode2str(opcode), tid ? 's' : 'm'); if (opcode > 123) diff --git a/tools/parser/parser.h b/tools/parser/parser.h index c5d9cf9a6d..5f65f16894 100644 --- a/tools/parser/parser.h +++ b/tools/parser/parser.h @@ -26,7 +26,7 @@ struct frame { uint32_t len; uint16_t dev_id; uint8_t in; - uint8_t master; + uint8_t central; uint16_t handle; uint16_t cid; uint16_t num; From patchwork Fri Aug 13 12:18:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 496651 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.4 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, URIBL_BLOCKED, 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 9A748C432BE for ; Fri, 13 Aug 2021 12:21:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7CBD6610CF for ; Fri, 13 Aug 2021 12:21:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240479AbhHMMWI (ORCPT ); Fri, 13 Aug 2021 08:22:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240473AbhHMMWI (ORCPT ); Fri, 13 Aug 2021 08:22:08 -0400 Received: from mail-qt1-x84a.google.com (mail-qt1-x84a.google.com [IPv6:2607:f8b0:4864:20::84a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24AEEC061756 for ; Fri, 13 Aug 2021 05:21:41 -0700 (PDT) Received: by mail-qt1-x84a.google.com with SMTP id r13-20020ac85c8d0000b029028efef0404cso6244809qta.14 for ; Fri, 13 Aug 2021 05:21:41 -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=XZFWy9TOkPrvVn11dZ4GTupHAWciKtSoivOHsfSA9io=; b=hxuuKd0KfZDHayUrThdlCy47rTC9wYxGvaou+6YoumJ3tljCkQz4EU+DBm6Cw7PSzU XkM20qcbNIfnBhoP6/+nAeWlFlTSLmaIgosqLPjzH+LlMZydMsQX/FHGJzd8jHhXKM6N 1vbivO6MDEKiRNd/Tv9T0CdULsiaG6KPCBJsYKleV0svRv3CbQhAh/f2b7wMNRFK8kqt I/0dT2/BRyh34zOz0Gwv9rDrV521zxAXOy5fQB/KQuRLd6ozwdFh2mBGHovMNAoA6ZVp GSOCrVHW3M904TRps0+r2gRjjqkjfc7fBt49s3wuFMyVlhQ1j/G7AkLlbTnGIv+5bSq5 lWHQ== 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=XZFWy9TOkPrvVn11dZ4GTupHAWciKtSoivOHsfSA9io=; b=riGd+mQWtqBc7fFF19qMPIuk5Kx2nWKepiv1j9yka6BeDWFp7gfFuCpcXRNfxNcFeF wtGu9beNRPpw9a/GJZuIFF4AbI05HYcQZ5FJ2/G98O5/I46jFAqNbHcDdaaSxSKrUMPd XWIE9911gMqIh+/vPZMQ/zX4YaCHb/XoJaBQif6YfALeWByzs1Va6aGZ/KoPkcnsVBiz MwMgRODx+8Xk0UtAxJKbji320DzVG4bxx6elDwO/Y/Be8axQVi0bXCysewNAEgWTqgtr mFFZStKddQjAle9Mcbfz2DfU4b2lyl6LCI+/FgV++wMtTckKREf5uK22JG+dN2qxk1aG RHUw== X-Gm-Message-State: AOAM530q6eLAxA7Tx54WN13SHOvSNPSHVFPqeL6vkd8YXbl1NmrOeR6G eFJY1TkO3Y2DmIC0N+M4xldiMuUTMwt2opr9MurMVzgnF/Ee4WsZTTjEOU079x+H2mxjxPOV31C jzUybpHLPWpIpYp7HrIQHtj/qUouL8TuicmDWjS/ChBYtmTq0OfnuRHOcJDYp7HZAHQAje8i6tu lv X-Google-Smtp-Source: ABdhPJz2+ao4IEF6IGK4hCoayt43EsP3axlso/ievdP3kZZZ4bg/bTYMNsOAzu6vzJJRnxZrp84/QCif7vx6 X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a0c:ecc4:: with SMTP id o4mr2390240qvq.18.1628857300245; Fri, 13 Aug 2021 05:21:40 -0700 (PDT) Date: Fri, 13 Aug 2021 20:18:19 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.34.I591bcabb26f8262dbc8f3607d457a2e2a9ad844d@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 34/62] tools/parser/lmp: 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 "central" and "peripheral" are the preferred terms, as reflected in the BT core spec 5.3. --- tools/parser/lmp.c | 110 ++++++++++++++++++++++----------------------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/tools/parser/lmp.c b/tools/parser/lmp.c index 8c5a228c03..94b6428967 100644 --- a/tools/parser/lmp.c +++ b/tools/parser/lmp.c @@ -28,22 +28,22 @@ static enum { IN_RAND, - COMB_KEY_M, - COMB_KEY_S, - AU_RAND_M, - AU_RAND_S, - SRES_M, - SRES_S, + COMB_KEY_C, + COMB_KEY_P, + AU_RAND_C, + AU_RAND_P, + SRES_C, + SRES_P, } pairing_state = IN_RAND; static struct { uint8_t in_rand[16]; - uint8_t comb_key_m[16]; - uint8_t comb_key_s[16]; - uint8_t au_rand_m[16]; - uint8_t au_rand_s[16]; - uint8_t sres_m[4]; - uint8_t sres_s[4]; + uint8_t comb_key_c[16]; + uint8_t comb_key_p[16]; + uint8_t au_rand_c[16]; + uint8_t au_rand_p[16]; + uint8_t sres_c[4]; + uint8_t sres_p[4]; } pairing_data; static inline void pairing_data_dump(void) @@ -59,31 +59,31 @@ static inline void pairing_data_dump(void) p_indent(6, NULL); printf("COMB_KEY "); for (i = 0; i < 16; i++) - printf("%2.2x", pairing_data.comb_key_m[i]); + printf("%2.2x", pairing_data.comb_key_c[i]); printf(" (M)\n"); p_indent(6, NULL); printf("COMB_KEY "); for (i = 0; i < 16; i++) - printf("%2.2x", pairing_data.comb_key_s[i]); + printf("%2.2x", pairing_data.comb_key_p[i]); printf(" (S)\n"); p_indent(6, NULL); printf("AU_RAND "); for (i = 0; i < 16; i++) - printf("%2.2x", pairing_data.au_rand_m[i]); + printf("%2.2x", pairing_data.au_rand_c[i]); printf(" SRES "); for (i = 0; i < 4; i++) - printf("%2.2x", pairing_data.sres_m[i]); + printf("%2.2x", pairing_data.sres_c[i]); printf(" (M)\n"); p_indent(6, NULL); printf("AU_RAND "); for (i = 0; i < 16; i++) - printf("%2.2x", pairing_data.au_rand_s[i]); + printf("%2.2x", pairing_data.au_rand_p[i]); printf(" SRES "); for (i = 0; i < 4; i++) - printf("%2.2x", pairing_data.sres_s[i]); + printf("%2.2x", pairing_data.sres_p[i]); printf(" (S)\n"); } @@ -92,7 +92,7 @@ static inline void in_rand(struct frame *frm) uint8_t *val = frm->ptr; memcpy(pairing_data.in_rand, val, 16); - pairing_state = COMB_KEY_M; + pairing_state = COMB_KEY_C; } static inline void comb_key(struct frame *frm) @@ -100,19 +100,19 @@ static inline void comb_key(struct frame *frm) uint8_t *val = frm->ptr; switch (pairing_state) { - case COMB_KEY_M: - memcpy(pairing_data.comb_key_m, val, 16); - pairing_state = COMB_KEY_S; + case COMB_KEY_C: + memcpy(pairing_data.comb_key_c, val, 16); + pairing_state = COMB_KEY_P; break; - case COMB_KEY_S: - memcpy(pairing_data.comb_key_s, val, 16); - pairing_state = AU_RAND_M; + case COMB_KEY_P: + memcpy(pairing_data.comb_key_p, val, 16); + pairing_state = AU_RAND_C; break; case IN_RAND: - case AU_RAND_M: - case AU_RAND_S: - case SRES_M: - case SRES_S: + case AU_RAND_C: + case AU_RAND_P: + case SRES_C: + case SRES_P: default: pairing_state = IN_RAND; break; @@ -124,19 +124,19 @@ static inline void au_rand(struct frame *frm) uint8_t *val = frm->ptr; switch (pairing_state) { - case AU_RAND_M: - memcpy(pairing_data.au_rand_m, val, 16); - pairing_state = SRES_M; + case AU_RAND_C: + memcpy(pairing_data.au_rand_c, val, 16); + pairing_state = SRES_C; break; - case AU_RAND_S: - memcpy(pairing_data.au_rand_s, val, 16); - pairing_state = SRES_S; + case AU_RAND_P: + memcpy(pairing_data.au_rand_p, val, 16); + pairing_state = SRES_P; break; - case COMB_KEY_M: - case COMB_KEY_S: + case COMB_KEY_C: + case COMB_KEY_P: case IN_RAND: - case SRES_M: - case SRES_S: + case SRES_C: + case SRES_P: default: pairing_state = IN_RAND; break; @@ -148,20 +148,20 @@ static inline void sres(struct frame *frm) uint8_t *val = frm->ptr; switch (pairing_state) { - case SRES_M: - memcpy(pairing_data.sres_m, val, 4); - pairing_state = AU_RAND_S; + case SRES_C: + memcpy(pairing_data.sres_c, val, 4); + pairing_state = AU_RAND_P; break; - case SRES_S: - memcpy(pairing_data.sres_s, val, 4); + case SRES_P: + memcpy(pairing_data.sres_p, val, 4); pairing_state = IN_RAND; pairing_data_dump(); break; - case COMB_KEY_M: - case COMB_KEY_S: + case COMB_KEY_C: + case COMB_KEY_P: case IN_RAND: - case AU_RAND_M: - case AU_RAND_S: + case AU_RAND_C: + case AU_RAND_P: default: pairing_state = IN_RAND; break; @@ -1016,10 +1016,10 @@ static inline void esco_link_req_dump(int level, struct frame *frm) uint8_t desco = LMP_U8(frm); uint8_t tesco = LMP_U8(frm); uint8_t wesco = LMP_U8(frm); - uint8_t mspkt = LMP_U8(frm); - uint8_t smpkt = LMP_U8(frm); - uint16_t mslen = LMP_U16(frm); - uint16_t smlen = LMP_U16(frm); + uint8_t cppkt = LMP_U8(frm); + uint8_t pcpkt = LMP_U8(frm); + uint16_t cplen = LMP_U16(frm); + uint16_t pclen = LMP_U16(frm); uint8_t airmode = LMP_U8(frm); uint8_t negstate = LMP_U8(frm); @@ -1036,10 +1036,10 @@ static inline void esco_link_req_dump(int level, struct frame *frm) printf("D_eSCO %d T_eSCO %d W_eSCO %d\n", desco, tesco, wesco); p_indent(level, frm); - printf("eSCO M->S packet type 0x%2.2x length %d\n", mspkt, mslen); + printf("eSCO C->P packet type 0x%2.2x length %d\n", cppkt, cplen); p_indent(level, frm); - printf("eSCO S->M packet type 0x%2.2x length %d\n", smpkt, smlen); + printf("eSCO P->C packet type 0x%2.2x length %d\n", pcpkt, pclen); p_indent(level, frm); printf("air mode 0x%2.2x\n", airmode); @@ -1142,7 +1142,7 @@ void lmp_dump(int level, struct frame *frm) } printf("LMP(%c): %s(%c): ", frm->central ? 's' : 'r', - opcode2str(opcode), tid ? 's' : 'm'); + opcode2str(opcode), tid ? 'p' : 'c'); if (opcode > 123) printf("op code %d/%d", opcode & 0x7f, opcode >> 7); From patchwork Fri Aug 13 12:18:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 497147 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.2 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, URIBL_BLOCKED, 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 DAF25C4338F for ; Fri, 13 Aug 2021 12:21:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C47E360F00 for ; Fri, 13 Aug 2021 12:21:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240482AbhHMMWL (ORCPT ); Fri, 13 Aug 2021 08:22:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240473AbhHMMWL (ORCPT ); Fri, 13 Aug 2021 08:22:11 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACB05C061756 for ; Fri, 13 Aug 2021 05:21:44 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id 203-20020a250bd40000b02905933fff7091so9009950ybl.16 for ; Fri, 13 Aug 2021 05:21:44 -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=lfuWy/d6aVVzArZ1Xmej6mfM+pd7qIF5AspEN/7glPA=; b=ro4c1duCtj43gl/YkGtaykg8j5obORYHcueHCuZ7EyZL3Uit4Ke2CKS63mMBQErngi ZcAk9utyX0+PsLfbu20YjcOugDJcdJyk+uROIzQw89FlJSzzMLVGkhc3uDJ1C+ZFvYOX 2OQJxOD3Mzq+5I8AxY+764paXl2DkZ4Xf9DZP3/y0qJDslM4hUMSA/W3HM7LEBhski+R FtKgYBsHagJpZZNp8MwMWk1oY6BpWTfskv4l5Q5MEjmM2XYVz2oYLK0I99XL/lI5dQFg T48DWsebK/gDbEDNT9cYDR9JHUdEwYOBaNIvU1Qls09D5ejvQgP59doG0dkfRnZqlHTI MANA== 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=lfuWy/d6aVVzArZ1Xmej6mfM+pd7qIF5AspEN/7glPA=; b=LZ/BqYzLAaiJGOiW2WJ2yHkRv2sbT9wSWGqvAOwiHikVALTNIAPnzz5XvS74R62qzO B3+wz7k3i7RxwsiX1hl6Ur2gJS4LwUKk94IDIQ1ZIQLtfeXY2U7CZYgSQl8fQa+/+Zz1 z3mMV4firKv5L2gxlXn+7C5wLQeVhB7KsqxYHlXnxLgdh3q1XMnzg4TbRimehzG66I7j wJ95LQ//7caSRzN02W9HHiYy/yPPtdV8rTqZL63B8ly2Xve+nTVRNWv+IFE9irYSJvPh oIY6rjdqG0aqUxT8MmQAMruF8ucIcLe99gquWYOcF3RxOE8teVBDM4UbFMohrIksOq5Y SAEA== X-Gm-Message-State: AOAM5334lSv9UXnbLJCC/8tA3PkTKyu5KWj1LrDaj47XGolT8nU8mNvu HISR+LgvqPO1arSTR8JuigHqgIaLEsljiEgABbvrepv0c4W7RpjCaFGYDOxnIUlD+9rSLo5Kdeh NhVitThN2LPjmTJMNV1GaOZnPowgL9fvFW5NcJGezrhkx5jJ6ZKHtKydfHxtVpYLh1puBTPEUcQ SR X-Google-Smtp-Source: ABdhPJyOoHadHjvmK8aScbzwZmmj3xZmPfRjbjVUFjwTJFtO37iQl51jwLOY6sEwIWHTYZs7eHHc0yQTyBCW X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a25:be48:: with SMTP id d8mr2622922ybm.521.1628857303927; Fri, 13 Aug 2021 05:21:43 -0700 (PDT) Date: Fri, 13 Aug 2021 20:18:20 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.35.I7995eea1848784bbc348f968ed7ed6d26161c2b0@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 35/62] tools/parser/avdtp: 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 "central" and "peripheral" are the preferred terms, as reflected in the BT core spec 5.3. --- tools/parser/avdtp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/parser/avdtp.c b/tools/parser/avdtp.c index bb7bbadaba..68a5b370c5 100644 --- a/tools/parser/avdtp.c +++ b/tools/parser/avdtp.c @@ -605,7 +605,7 @@ void avdtp_dump(int level, struct frame *frm) nsp = (hdr & 0x0c) == 0x04 ? p_get_u8(frm) : 0; sid = hdr & 0x08 ? 0x00 : p_get_u8(frm); - printf("AVDTP(s): %s %s: transaction %d nsp 0x%02x\n", + printf("AVDTP(p): %s %s: transaction %d nsp 0x%02x\n", hdr & 0x08 ? pt2str(hdr) : si2str(sid), mt2str(hdr), hdr >> 4, nsp); @@ -659,7 +659,7 @@ void avdtp_dump(int level, struct frame *frm) time = p_get_u32(frm); ssrc = p_get_u32(frm); - printf("AVDTP(m): ver %d %s%scc %d %spt %d seqn %d time %d ssrc %d\n", + printf("AVDTP(c): ver %d %s%scc %d %spt %d seqn %d time %d ssrc %d\n", hdr >> 6, hdr & 0x20 ? "pad " : "", hdr & 0x10 ? "ext " : "", hdr & 0xf, type & 0x80 ? "mark " : "", type & 0x7f, seqn, time, ssrc); break; From patchwork Fri Aug 13 12:18:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 496650 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.2 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, URIBL_BLOCKED, 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 5F014C4338F for ; Fri, 13 Aug 2021 12:21:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4266F610A4 for ; Fri, 13 Aug 2021 12:21:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240473AbhHMMWQ (ORCPT ); Fri, 13 Aug 2021 08:22:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240487AbhHMMWP (ORCPT ); Fri, 13 Aug 2021 08:22:15 -0400 Received: from mail-qk1-x749.google.com (mail-qk1-x749.google.com [IPv6:2607:f8b0:4864:20::749]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CC77C0617AE for ; Fri, 13 Aug 2021 05:21:48 -0700 (PDT) Received: by mail-qk1-x749.google.com with SMTP id q11-20020a05620a05abb02903ca17a8eef8so7028633qkq.10 for ; Fri, 13 Aug 2021 05:21:48 -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=vouSkgAMG+DVZeUk2gotEVKBasAFd5Ej/tSVjfE5nKg=; b=uDDOJitherBRh+PoXwYXgqBBy/NoRyadOwLkuMM0wDcsNZ/c51aq7mge9X28ZSuJo0 Lga+fbnjyj4VCSYllHN50sKLitqii44Zj4tWmXwXBiYg6df/JdGA9q2WFUXHvBbY+whu q+OYA+SbAxyPEA+UJGNv4wsxNVNQuD6h6LyCAyuVKDrapkLGPnUYeJQH4WZxgM7qN+Vx mcEDhIpzVsYekkjaC0CpdsI4b6QEu+W1NfxEcPldjNfNCRnw+iYDSM2RHVwz6EBilfGJ +k+62TS0XDjyxJxJLY+TTEqTIKsXAYBGWRj1+wYhasr3CO7M6Dx8Gs8mDLLBcSraEZvb jZoA== 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=vouSkgAMG+DVZeUk2gotEVKBasAFd5Ej/tSVjfE5nKg=; b=rTxBDBY67X67sHrcBQb0B8FgCh+021B9oFMM2nF73QrNIlDBeLGsSyWNtqDtB0jb19 BTfzp3Sgei8fG572PIgMACgeojwAF6P3pIpcvF6j90lSH8qdiFLmIGRR0O59RQziro1Z 74IOxumF3SoTZW3q9cKrxr08ZUDF1ARCTNukRoVJNVgEpqIZitIvAmVOnV3dIPn3qDll w3S2kBO86t8eq+r0rMTb7jQU1AmBYkn9y49AG21oPixsllvVylUoydgr1qwQ9oZW94FV IOXKc5f6IGsOEZgHoPxTvKVgVoNXtwXxZCqrrZ1fUBHmvBSK0ZvKh7a3p8ZGpi1u5OQS 1kPQ== X-Gm-Message-State: AOAM533KOx/XfynU/CFFiw4zFVrl2EMEUNq7JN/+0czPOx+iAwX581Cl POciZhdo2nz50XwiMikIZ7b36aR6UIeU69txYLHhjyPzAzIO2Gc3R43T0NwIxHtsvCnGPpeXQaO tLlsWfxhXLOxBuGtwim0UJoVxcGEFAswjYnEY2gI53ceaNeZuta905uCx0JNE/uhlhux4R2UtpL m2 X-Google-Smtp-Source: ABdhPJxS/31JnGZEHPZSBkB9NQ1TmgHz8lR7v3byuk8arB32wtGfGg9xW9ZWAglaUqZ7eb5bh98Iz/Kc9dd/ X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a05:6214:12a2:: with SMTP id w2mr2373982qvu.27.1628857307655; Fri, 13 Aug 2021 05:21:47 -0700 (PDT) Date: Fri, 13 Aug 2021 20:18:21 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.36.I8543a76f6c0ff58cf40ad105102597738ad44241@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 36/62] tools/parser/csr: 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 "central" and "peripheral" are the preferred terms, as reflected in the BT core spec 5.3. --- tools/parser/csr.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tools/parser/csr.c b/tools/parser/csr.c index 36efc46332..bd50b1c760 100644 --- a/tools/parser/csr.c +++ b/tools/parser/csr.c @@ -257,7 +257,7 @@ static inline void pskey_dump(int level, struct frame *frm) uint16_dump(level + 1, "MAX_SCOS", frm); break; case 0x000f: - uint16_dump(level + 1, "MAX_REMOTE_MASTERS", frm); + uint16_dump(level + 1, "MAX_REMOTE_CENTRALS", frm); break; case 0x00da: uint16_dump(level + 1, "ENC_KEY_LMIN", frm); @@ -546,7 +546,7 @@ static char *frag2str(uint8_t frag) void csr_dump(int level, struct frame *frm) { uint8_t desc, cid, type; - uint16_t handle, master, addr; + uint16_t handle, central, addr; desc = CSR_U8(frm); @@ -576,12 +576,13 @@ void csr_dump(int level, struct frame *frm) return; case 0x12: handle = CSR_U16(frm); - master = CSR_U16(frm); + central = CSR_U16(frm); addr = CSR_U16(frm); p_indent(level, frm); - printf("FHS: handle %d addr %d (%s)\n", handle, - addr, master ? "master" : "slave"); - if (!master) { + printf("FHS: handle %d addr %d (%s)\n", + handle, addr, + central ? "central" : "peripheral"); + if (!central) { char addr[18]; p_ba2str((bdaddr_t *) frm->ptr, addr); p_indent(level + 1, frm); From patchwork Fri Aug 13 12:18:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 497146 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.2 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, URIBL_BLOCKED, 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 B31ABC4338F for ; Fri, 13 Aug 2021 12:21:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9EACF60F46 for ; Fri, 13 Aug 2021 12:21:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240491AbhHMMWT (ORCPT ); Fri, 13 Aug 2021 08:22:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240484AbhHMMWS (ORCPT ); Fri, 13 Aug 2021 08:22:18 -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 23A48C061756 for ; Fri, 13 Aug 2021 05:21:52 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id p71-20020a25424a0000b029056092741626so8938781yba.19 for ; Fri, 13 Aug 2021 05:21:52 -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=hFED6TuRM/+XzE0+YqmrR4+hybFYu52VwoImVB7t2Hk=; b=Z6J4MlO8B4XvbLeczjE1DOy4BsvEI+Y3uVws6EKU0FDoZ7LBW70cjbLFqFKZAC6+xw RBpFS1nQglv8MGUdD19WfY7sdfK0zcJuyScBq8aXrG+jHIIhSwMBOYOPZ6XIJ9jwllmo v8oWBQoADBAktgQTcoIOBqgEZSI/NN+9re5tqaDsewIBUTrrsX1b6Vxzf+vKszNBNvw6 SaQKdJFiJH/KqxaQl8v6tlzwbfRvjhKDtHVwoeJ+WFF19MhUKJJiWAFgDYOCWOO46x+8 gCt5Ue6y9xlE6D5BQ/XUdUv6JcfmWhai0C6RkhCNeGvayrFAuA4uAL990dsPXx5tWCLc m3Mg== 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=hFED6TuRM/+XzE0+YqmrR4+hybFYu52VwoImVB7t2Hk=; b=ktFJ+CpjS8lcoW931oLWm89zkB5e2zU1Gw5VfraWHtLfgO6wnQ8nk9rTKKARRKKj+M 2yGd0q6yCnmWMOU3aSTDmmHHZ1FbCmdohHQKrA6Mbt2MCnw0Uv0DQWnyf0VHDiOQ7PAL q8A8jGj0DrY4Z44+u3by0JYE8cpaCq2CKpF67VBxjFZW78K6X3L9A4ODCkRizlLbzIBW unCnXcQhfe5zNl9+42q+fMvM9ro+K4U8tPA7d6xdygz4EVDa60NNc6hM7BGrGlxk/9Ql QHyXa7W3NbEE2cmgf0YOZ0Y+JSGi7wBs3VgHEY5ntRr8AEx6eK7uqDVv8CWPe4FsrGe1 RNhQ== X-Gm-Message-State: AOAM533CK77RmS/N0/3VjXJc5I035WRB0CGoELO6V5GY7b2exzp6W10R RnasegC8kOxXgSC3SP1KrlKbQBC8oHzmQ9pwIWbKDHVFOJWMREox5IQj7MFRdd9e0Gu7b7Wc9k/ +Aw7etw4gfhEwEc9f1DWxnrlmuxOjD8eBCU9Ua6JXrVppH7k04tD1o0CWtQ2Tfm9pemvoUwWXf7 84 X-Google-Smtp-Source: ABdhPJyDVDcwZB3LppmjZIoD36gqaSkyyfks+AKk3B/cmQJ9A0h1/xqC+XbMYG2pqV3qdYpZAO6fSkOMIR80 X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a5b:7c4:: with SMTP id t4mr2556051ybq.368.1628857311337; Fri, 13 Aug 2021 05:21:51 -0700 (PDT) Date: Fri, 13 Aug 2021 20:18:22 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.37.I4b5bd03960384e2f0fab99057924e5dd409e53d4@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 37/62] tools/btpclientctl: 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 "peripheral" is preferred, as reflected in the BT core spec 5.3. --- tools/btpclientctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/btpclientctl.c b/tools/btpclientctl.c index 6553f2f3a7..c30d5bd4e7 100644 --- a/tools/btpclientctl.c +++ b/tools/btpclientctl.c @@ -676,7 +676,7 @@ const struct indexstr_data ad_type_table[] = { { 0x10, "BT_AD_DEVICE_ID" }, { 0x10, "BT_AD_SMP_TK" }, { 0x11, "BT_AD_SMP_OOB_FLAGS" }, - { 0x12, "BT_AD_SLAVE_CONN_INTERVAL" }, + { 0x12, "BT_AD_PERIPHERAL_CONN_INTERVAL" }, { 0x14, "BT_AD_SOLICIT16" }, { 0x15, "BT_AD_SOLICIT128" }, { 0x16, "BT_AD_SERVICE_DATA16" }, From patchwork Fri Aug 13 12:18:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 496649 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.2 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, URIBL_BLOCKED, 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 D697DC4338F for ; Fri, 13 Aug 2021 12:21:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BE93B60F00 for ; Fri, 13 Aug 2021 12:21:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240492AbhHMMWW (ORCPT ); Fri, 13 Aug 2021 08:22:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240486AbhHMMWW (ORCPT ); Fri, 13 Aug 2021 08:22:22 -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 A4DE4C061756 for ; Fri, 13 Aug 2021 05:21:55 -0700 (PDT) Received: by mail-qt1-x849.google.com with SMTP id v28-20020a05622a189cb029028e697f617dso6227867qtc.20 for ; Fri, 13 Aug 2021 05:21:55 -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=99b2jpqgUQXR2rTjJoouB+WKpUmZQdrmbs8eHzdxpZU=; b=OiZ88bprjQljL8wWJWseaJoStmm3CcHJUdigOc1m+/H9f6R49dtrk38WR4AttViq0Z grdTTfXwv6fwRUQJIVNfi2oO0ilHypVdeQiK9Vd8ft58h6+6BNXs4q5AHoV2/6uPpz1r 1+oM8RL0NUU++93zi7rxAIjYGNmjN4DXpZfMpCzUhsVWpZWKysMzGyZwWgJLk1h0qL6f y5bYExYxJtBaAdS7+JB6aoNinKr1Wz4KGw5d+rltXpQ8Qd6V13+XMPUPJwMCQbtdhUCv 60lugCtpFSaol51/gl6YjZweMn3Tjle3ROmxZkoRyPPLq9VdT0jsaCNYU0cFm3jSGlhE VYOw== 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=99b2jpqgUQXR2rTjJoouB+WKpUmZQdrmbs8eHzdxpZU=; b=ewrVOakVDp9xUbM3RpRvFRej1deTyjZkhBOn8ZIdHn14YLw1Fc9AtYJn+Pq4UrEkS8 gKIQoFG5JGmFfgnhQasaWe32aCBm5dMznwlDu+CfcwUwjooVRMcDmYW5b3rkq3aHwtpC v5rLhaQY7oLkm5eATEjb1ywtOntUcfFVGzEUHdkdHD1/ZFts9RD3Nq6CNorG0afMVHij mgAQtpNvI2aAVnikPk1gGbXsni16OFUlc9EEfT0PaQkbQFihUCP8b+J9yG5koWxLK44B +a52eYJBcf5BJ5BhmDTSjurPqcJA0BkW3lhNrGeu6cGw0DS7dR7oz5gt7T10aI/ML5cj faWg== X-Gm-Message-State: AOAM530Lcnwe/5i2vT9ij0963dgzpyaDHElG5likAxOf86B87mXeT0Ge dRzZoJYlUh0YP+lJeQZfWXA2+aPjRY8TlkwgdM0ZDuYlOy6hterCb4w5af5KoGChgCrR54pB/Gq nX1V152Xkn0uK74VPEOHYWPWcndg0MeDgkTzG1+It+79gxcRx2ZggB2SLbWB7YtQvRg1dW9Gexo jm X-Google-Smtp-Source: ABdhPJyclQGfyvi+cI1fiBXl7mGsg1Bz/ldysCQGkPURqDQiHZS8DP40RZ6+VTF0IxGL2SeG3yxROOE62bzT X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a0c:e84a:: with SMTP id l10mr2282760qvo.3.1628857314836; Fri, 13 Aug 2021 05:21:54 -0700 (PDT) Date: Fri, 13 Aug 2021 20:18:23 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.38.Ie1dfb4a09d7cab6568d45c2632f6c0c80243bf73@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 38/62] tools/l2cap-tester: 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 "accept list" is preferred, as reflected in the BT core spec 5.3. --- tools/l2cap-tester.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/l2cap-tester.c b/tools/l2cap-tester.c index db662117e0..d78b1e29cc 100644 --- a/tools/l2cap-tester.c +++ b/tools/l2cap-tester.c @@ -1437,7 +1437,7 @@ static gboolean test_close_socket_1_part_2(gpointer args) tester_print("Will close socket during scan phase..."); /* We tried to conect to LE device that is not advertising. It - * was added to kernel whitelist, and scan was started. We + * was added to kernel accept list, and scan was started. We * should be still scanning. */ if (!hciemu_get_central_le_scan_enable(data->hciemu)) { @@ -1446,7 +1446,7 @@ static gboolean test_close_socket_1_part_2(gpointer args) return FALSE; } - /* Calling close() should remove device from whitelist, and stop + /* Calling close() should remove device from accept list, and stop * the scan. */ if (close(sk) < 0) { From patchwork Fri Aug 13 12:18:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 497145 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.2 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, URIBL_BLOCKED, 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 751CDC4338F for ; Fri, 13 Aug 2021 12:22:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5EECF610CF for ; Fri, 13 Aug 2021 12:22:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240488AbhHMMW0 (ORCPT ); Fri, 13 Aug 2021 08:22:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240480AbhHMMWZ (ORCPT ); Fri, 13 Aug 2021 08:22:25 -0400 Received: from mail-qv1-xf49.google.com (mail-qv1-xf49.google.com [IPv6:2607:f8b0:4864:20::f49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49FE4C061756 for ; Fri, 13 Aug 2021 05:21:59 -0700 (PDT) Received: by mail-qv1-xf49.google.com with SMTP id gw9-20020a0562140f0900b0035decb1dfecso2021839qvb.5 for ; Fri, 13 Aug 2021 05:21:59 -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=g7z76tPdiJR+T+r8soE6IulOGhW6nRRXU9Iaaohscjs=; b=v42Sxq5J0QQtLc4nCPcDoKy5tMQhr+MqUgUcRTdcgGCcTSMd1wvBi2QavdLdDZtxja Zm836EeBuOLLS3dg9WPOLSGGvdJdgqyaH26C+hiLF0Sv2+Fnw7z4h1Z69ZGnwUrX4ft9 mV08BTVLft61IkG7upU1zTPfMFly1Ri3FLZgtEl6g7pWfTyT4Ur6PdkI4WuHTECw7POc hCazR6cHGfKGSqYlToyrz6B2WVfRrk2hMSqsVXaMoey8Yv69BnNjkTX0PJkHkTpkqzXU LgJRjxewCnQj9TafvnBugPrBYWP5TGN8KpLzJHM5QYQ0Ncw3GjC39Tq5UzHhsE1IPM3Z ooPA== 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=g7z76tPdiJR+T+r8soE6IulOGhW6nRRXU9Iaaohscjs=; b=QbDgUP4/Ri25me6DIbbgf1JWnLLB6p/hSB0NFAtwFUASOopeAug0KCrCvySavTZlLB hf6jPblXyjyHbKQFpfY7dtvS6ZbJzIk4Oph+la/rLNdJN+G40D63YSx8R6ZukE5Ou9FI pOUdqPYw06L7/m0Ip04XZeLzNd74Ickm5WNBIs5oJf9w/ZOZZZpeQ7uLmtJmUfEiiW0b o8JIk1QpQkjc/wjbYeqQtoZuM2XYwIgD5yUoVQIGpssD7qa6ZZRE16W//XcLCK/chGJQ Q2zw/qLYfm/DQJr0X175f+DkaGuBANYX7UP32dYHJafe9TZTNgrgXctxtixCEM2I/Uj1 KZlA== X-Gm-Message-State: AOAM5309w9BKFSF4JCXF+qx6tqTM2DRYj2X1gAil70+35aZ7ILwQTART ofs8p+orVNcoeM9yUiRAT1h58hUsyLtScm0coJia8AqAzIodqzQo8u88y3Gdet5bzpkzovJ4Vfx 43b16edi2GqqFkEHqlFK4o9K785y6RKQl0YEWRJWt47RBYjhEEkuZ31nZSOIEyY9bzhNwcINwXp 94 X-Google-Smtp-Source: ABdhPJyZdOd5jDmIIqSIZRwXGF8rLf9y9YMuYjTs+lldSFQqcnEv3aMiN+0hGlTXx8WF+D2viVDGQjqDAtHn X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a05:6214:1142:: with SMTP id b2mr2431597qvt.0.1628857318440; Fri, 13 Aug 2021 05:21:58 -0700 (PDT) Date: Fri, 13 Aug 2021 20:18:24 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.39.Ibab5aa88a5eaa8b297bd30886166806cd6fd1327@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 39/62] tools/hci-tester: 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 "accept list" is preferred, as reflected in the BT core spec 5.3. --- tools/hci-tester.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/hci-tester.c b/tools/hci-tester.c index 645d89e721..79193220fe 100644 --- a/tools/hci-tester.c +++ b/tools/hci-tester.c @@ -335,12 +335,12 @@ static void test_read_local_supported_codecs(const void *test_data) test_command(BT_HCI_CMD_READ_LOCAL_CODECS); } -static void test_le_read_white_list_size(const void *test_data) +static void test_le_read_accept_list_size(const void *test_data) { test_command(BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE); } -static void test_le_clear_white_list(const void *test_data) +static void test_le_clear_accept_list(const void *test_data) { test_command(BT_HCI_CMD_LE_CLEAR_ACCEPT_LIST); } @@ -944,10 +944,10 @@ int main(int argc, char *argv[]) test_hci_local("Read Local Supported Codecs", NULL, NULL, test_read_local_supported_codecs); - test_hci_local("LE Read White List Size", NULL, NULL, - test_le_read_white_list_size); - test_hci_local("LE Clear White List", NULL, NULL, - test_le_clear_white_list); + test_hci_local("LE Read Accept List Size", NULL, NULL, + test_le_read_accept_list_size); + test_hci_local("LE Clear Accept List", NULL, NULL, + test_le_clear_accept_list); test_hci_local("LE Encrypt", NULL, NULL, test_le_encrypt); test_hci_local("LE Rand", NULL, NULL, From patchwork Fri Aug 13 12:18:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 496648 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.2 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, URIBL_BLOCKED, 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 9E21CC4338F for ; Fri, 13 Aug 2021 12:22:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8812B610A4 for ; Fri, 13 Aug 2021 12:22:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240496AbhHMMWa (ORCPT ); Fri, 13 Aug 2021 08:22:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240486AbhHMMW3 (ORCPT ); Fri, 13 Aug 2021 08:22:29 -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 36D88C061756 for ; Fri, 13 Aug 2021 05:22:03 -0700 (PDT) Received: by mail-qt1-x849.google.com with SMTP id j3-20020ac85f830000b029029113b02ff5so6260059qta.7 for ; Fri, 13 Aug 2021 05:22:03 -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=YIhqjIy4Z1f9LlWA+2SAnStUjz7UiK1EetcELquEE5g=; b=SmXfh+6e7Y/4R+zeA0AdYD035as0P7rRRRiNwnfOJka18jv8bjeEtzJC3hC0Ag0gf+ vhKHbVonhQUOpSQX16XM4lbRLQm7s6NlcsUj25EEVXAPL/AmxerADWGiEnCaye5Hry+b vJJAnXH0YNME6LqYuCJLU9YmaDpNydhkizGKuMjcvUBgNQJt68qtWw+/iQRlsgSgnNdD AW5utp8OM58OrZMBqYrmvuIxkkj3ePSYPVAlpws2gnGFpQ9R+yqGOMyCj9ODEUBvG8Vh 5UZB4MNakWG4GCA1tI36+cbl0oQjYWS+8O1/PGfcsfW/1LlQ1fTYpxk/bJRqwyYFeByc 0rNw== 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=YIhqjIy4Z1f9LlWA+2SAnStUjz7UiK1EetcELquEE5g=; b=P3/vpxH6VRadjL0Q39poAifl0seKibOx40/QHJjUUtN76DJ6JGIdnM5wQt8l4aPIsE msBdcnUe8rAbbRjQGvIm1OPHqfgfw2NDkIH99yOGFYg2YOFbUgB2wJwbPtZT7vfJ7exX wEvCdFj+2iS2xB6d5CGrtLGfjmKPUDB/Dhbjc9WTLW4nXnxK8aVHAHpCMPSEavIEAB0e XeMKS+Wg4XHHCZjh8qx0Uw8DcPIsAu57JuX2PIt3czk4JS/XMrC5+FdgNjf1XTk4HjT+ nZ+Rw+ShdcxIpkLCQs/yMHtpFv2qNOMiPm0ELiz6s0vG0pDQctby41QyJ+I5Kpz5niTB esEg== X-Gm-Message-State: AOAM531cIvRGBc2+T4oFIXJxt5DyCN54pbnTdnlhccII8/nI1DX0iNao aUoDrmLp3EHNrF/7k56BC6Cf4ypKR6BakZw57KdJowAWAUG439JLkRduMAQpsxXUJ4f0NwhvIK3 4xl58JII3zSsP4U2o1ouEjzbcv7petCaGrve3+6FHvSWuAnuMTuMlIKYcC3McIJ35flg9oabOPz VI X-Google-Smtp-Source: ABdhPJxbR2jFoXgcQLyRV8nK/E8Syp/4AoSbcv1lLp/Zk3yRMcu2yeNLMlVY90qNe3KtsIWx0qjyw29X8Ji1 X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a05:6214:8c6:: with SMTP id da6mr2241634qvb.18.1628857322302; Fri, 13 Aug 2021 05:22:02 -0700 (PDT) Date: Fri, 13 Aug 2021 20:18:25 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.40.I08beeb185bf2986116252da72a42983b819413e8@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 40/62] tools/btiotest: 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 "central" is preferred, as reflected in the BT core spec 5.3. --- tools/btiotest.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/btiotest.c b/tools/btiotest.c index 3f4900a5a5..1da8c20caf 100644 --- a/tools/btiotest.c +++ b/tools/btiotest.c @@ -310,7 +310,7 @@ static void l2cap_connect(const char *src, const char *dst, uint8_t addr_type, static void l2cap_listen(const char *src, uint8_t addr_type, uint16_t psm, uint16_t cid, int defer, int reject, int disconn, int accept, int sec, - gboolean master) + gboolean central) { struct io_data *data; BtIOConnect conn; @@ -343,7 +343,7 @@ static void l2cap_listen(const char *src, uint8_t addr_type, uint16_t psm, BT_IO_OPT_PSM, psm, BT_IO_OPT_CID, cid, BT_IO_OPT_SEC_LEVEL, sec, - BT_IO_OPT_CENTRAL, master, + BT_IO_OPT_CENTRAL, central, BT_IO_OPT_INVALID); else l2_srv = bt_io_listen(conn, cfm, data, @@ -353,7 +353,7 @@ static void l2cap_listen(const char *src, uint8_t addr_type, uint16_t psm, BT_IO_OPT_PSM, psm, BT_IO_OPT_CID, cid, BT_IO_OPT_SEC_LEVEL, sec, - BT_IO_OPT_CENTRAL, master, + BT_IO_OPT_CENTRAL, central, BT_IO_OPT_INVALID); if (!l2_srv) { @@ -402,7 +402,7 @@ static void rfcomm_connect(const char *src, const char *dst, uint8_t ch, static void rfcomm_listen(const char *src, uint8_t ch, gboolean defer, int reject, int disconn, int accept, - int sec, gboolean master) + int sec, gboolean central) { struct io_data *data; BtIOConnect conn; @@ -427,7 +427,7 @@ static void rfcomm_listen(const char *src, uint8_t ch, gboolean defer, BT_IO_OPT_SOURCE, src, BT_IO_OPT_CHANNEL, ch, BT_IO_OPT_SEC_LEVEL, sec, - BT_IO_OPT_CENTRAL, master, + BT_IO_OPT_CENTRAL, central, BT_IO_OPT_INVALID); else rc_srv = bt_io_listen(conn, cfm, @@ -435,7 +435,7 @@ static void rfcomm_listen(const char *src, uint8_t ch, gboolean defer, &err, BT_IO_OPT_CHANNEL, ch, BT_IO_OPT_SEC_LEVEL, sec, - BT_IO_OPT_CENTRAL, master, + BT_IO_OPT_CENTRAL, central, BT_IO_OPT_INVALID); if (!rc_srv) { @@ -540,7 +540,7 @@ static int opt_reject = -1; static int opt_disconn = -1; static int opt_accept = DEFAULT_ACCEPT_TIMEOUT; static int opt_sec = 0; -static gboolean opt_master = FALSE; +static gboolean opt_central = FALSE; static int opt_priority = 0; static int opt_cid = 0; static guint8 opt_addr_type = 0; @@ -576,8 +576,8 @@ static GOptionEntry options[] = { "Disconnect connection after N seconds" }, { "accept", 'a', 0, G_OPTION_ARG_INT, &opt_accept, "Accept connection after N seconds" }, - { "master", 'm', 0, G_OPTION_ARG_NONE, &opt_master, - "Master role switch (incoming connections)" }, + { "central", 'C', 0, G_OPTION_ARG_NONE, &opt_central, + "Central role switch (incoming connections)" }, { "priority", 'P', 0, G_OPTION_ARG_INT, &opt_priority, "Transmission priority: Setting a priority " "outside the range 0 to 6 requires the" @@ -614,7 +614,7 @@ int main(int argc, char *argv[]) else l2cap_listen(opt_dev, opt_addr_type, opt_psm, opt_cid, opt_defer, opt_reject, opt_disconn, - opt_accept, opt_sec, opt_master); + opt_accept, opt_sec, opt_central); } if (opt_channel != -1) { @@ -624,7 +624,7 @@ int main(int argc, char *argv[]) else rfcomm_listen(opt_dev, opt_channel, opt_defer, opt_reject, opt_disconn, opt_accept, - opt_sec, opt_master); + opt_sec, opt_central); } if (opt_sco) { From patchwork Fri Aug 13 12:18:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 497144 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.2 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, URIBL_BLOCKED, 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 2479DC432BE for ; Fri, 13 Aug 2021 12:22:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0D024610A4 for ; Fri, 13 Aug 2021 12:22:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240493AbhHMMWd (ORCPT ); Fri, 13 Aug 2021 08:22:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240497AbhHMMWd (ORCPT ); Fri, 13 Aug 2021 08:22:33 -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 9F654C061756 for ; Fri, 13 Aug 2021 05:22:06 -0700 (PDT) Received: by mail-qv1-xf4a.google.com with SMTP id t3-20020a0cf9830000b0290359840930bdso3472915qvn.2 for ; Fri, 13 Aug 2021 05:22:06 -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=PEgddjQmHWVJb+RnTYguCWIfPVLsTPqKeJvEdYx/1K8=; b=aozckpEaxtHQGS/EVkFQgrA1HKIEF4nMzXsUk+DiMGnbiTTDupVjPPfDmYWddKVLrg R+fWJiguz83kl8Ip7Me/XTKhJPsVE6zH10APTw3GVhXLeH+NV65Mho05GFX95b3f0rPF EQ5C0zBcfqF1kz6Rpdsl8IA5x9/qJca+0Je1++SB1+Fz3o4JHX3UiGhpn+ks0ePdqE3v an5q6qVDlLZ/4qA9yC6R8ddRuOYz39JJhrULcQwp0BeWUGrNAKdQmrlKg1d0k4YyEp43 EcJSeQ9R3gq3j5xHkzGp9dHwvp0p1wK3NzFq720ffNMgH+s0+gU+HqNUCULJCbewW3RW 2W6A== 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=PEgddjQmHWVJb+RnTYguCWIfPVLsTPqKeJvEdYx/1K8=; b=ArT6a5dMWBKQb/0j00SM2SgF2uR8v2CRowcQAtzqIBG3H+ezBzAdL/LbjrHYy2NG4D kHrDKanm0tJxnQ4SbDAaBnyPgthsxo03DlJrsIUqznNRw23uoxTv2OaSsIqGOySbgotG Pshnae11JJ+f7Gg8q2Jei7RhUfkblrfwAy5Z5/J66bT0qK87QIfrmjGBMc8/hODb9AnY 1guW8j3uNjm3QXyacEPVmkDVBdzgLg/B+XCe0XA9yK8DTxTcGzmjzEsI5fPnzJmd9BU0 2L3OGXCZLJYleDZGmHZ7wKA39tSAsCJH+DrjlBnFJqv/iUNtkiRdPtDxtX6BtJiS0lFu piVQ== X-Gm-Message-State: AOAM533jxQRw9UrydceDbKJHBTUFFW9W2astZnYGJM1N8a1lAt0Z0lNq i22B6FcMTVZkM5y+IMyBJlT7urC98Xyw1I6Ov054cWQJnWt76laxZeIWZmRo0Yc7DjklebYaWJs anyyJrPCW51Z+vMyJIfpUbiED6TBSTuqYUxKdAYSOBsMP2l7EouhBEH/5rnIIzwGjbgd7yW8jET jf X-Google-Smtp-Source: ABdhPJyaPMp+xqa55Qz+Qys3iz1sjtJMz2D+Yu375ybMW805lSg5Euwq4rOucFxKCVmGE1fPoujNzcVns9x/ X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:b68c:ff41:db76:21e9]) (user=apusaka job=sendgmr) by 2002:a05:6214:2465:: with SMTP id im5mr2312814qvb.46.1628857325722; Fri, 13 Aug 2021 05:22:05 -0700 (PDT) Date: Fri, 13 Aug 2021 20:18:26 +0800 In-Reply-To: <20210813121848.3686029-1-apusaka@google.com> Message-Id: <20210813201256.Bluez.41.Ibff40d723f7542fa72902f176293b5bda4abde93@changeid> Mime-Version: 1.0 References: <20210813121848.3686029-1-apusaka@google.com> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog Subject: [Bluez PATCH 41/62] tools/hcitool: Inclusive language changes, central peripheral 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 "central" and "peripheral" are the preferred terms, as reflected in the BT core spec 5.3. --- tools/hcitool.c | 12 ++++++------ tools/hcitool.rst | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/hcitool.c b/tools/hcitool.c index f7fca5216c..f61eae106c 100644 --- a/tools/hcitool.c +++ b/tools/hcitool.c @@ -1210,10 +1210,10 @@ static struct option cc_options[] = { static const char *cc_help = "Usage:\n" - "\tcc [--role=m|s] [--ptype=pkt_types] \n" + "\tcc [--role=c|p] [--ptype=pkt_types] \n" "Example:\n" "\tcc --ptype=dm1,dh3,dh5 01:02:03:04:05:06\n" - "\tcc --role=m 01:02:03:04:05:06\n"; + "\tcc --role=c 01:02:03:04:05:06\n"; static void cmd_cc(int dev_id, int argc, char **argv) { @@ -1360,10 +1360,10 @@ static void cmd_sr(int dev_id, int argc, char **argv) str2ba(argv[0], &bdaddr); switch (argv[1][0]) { - case 'm': + case 'c': role = 0; break; - case 's': + case 'p': role = 1; break; default: @@ -3287,7 +3287,7 @@ static const char *lecup_help = "\t --handle=<0xXXXX> LE connection handle\n" "\t --min= Range: 0x0006 to 0x0C80\n" "\t --max= Range: 0x0006 to 0x0C80\n" - "\t --latency= Slave latency. Range: 0x0000 to 0x03E8\n" + "\t --latency= Peripheral latency. Range: 0x0000 to 0x03E8\n" "\t --timeout=