Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4248838pxj; Tue, 25 May 2021 03:49:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwB3eYnMJvXwkoDqgpKZ+Q1qD+G+jw19OBwmxvkEtHUY+MnFTtGNG4WxKLoPudSL3aPlBP+ X-Received: by 2002:a17:907:2d8d:: with SMTP id gt13mr11609766ejc.162.1621939770866; Tue, 25 May 2021 03:49:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621939770; cv=none; d=google.com; s=arc-20160816; b=hhkhi2e6d/1Px2qQ0YKDOHJO9yFGvCDdr5no/xnC5HRbLmQg78Gip06eFoMbypa3Se aLj9YRnDxEHOlluOClGLeWIiERPbiqNK32GUtx5TkESfWOB8bLgRtHVoBf+T8l44YAmQ ZZ5NraBFsQYDTBHcJmDC8fV7XbM6Oz+ewj7PozubwxouOTSJyy21elJ1IHQoAgmLIBQ1 fd1bpR0V4JsqqNUwloGsub9EOCYBtPWfLlp2W8mTp2JWTS8NPKu2lM40RkzqeiuxNuOQ na29Z0ArjwIjS5KUYbRmmbk7H0w4u1MGBn4b+pG9zVpuUEJZZpYv9fuCG6aumEKmIHTa G6Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=UXo23GwK/luqXob/Py9T0EVZy2iOWx16pZJGz6ZxQDU=; b=i2AGFeGvgfhWFKgFgCQrRqVAeMGYWwnEVuyaZw418g8JfTm8jMuEq5dm1qN9j91PMf J9G0184coVg+Vzt+Ea6wpYyNbS3xdnGeHihExCJA/aYU1/0HbXKkynnB0z+FXoY9bOUO ar9FdkFsY8V5qCZZhgdeX03PELcOkPdyc8jXW21UTzInX9wE8j+9NPVMFzzKB5wOrCcM EH12/HN1815wSj8yvgTqgBLkB3lQIcKcobADGJE2LE4Qy8Yseb3DanNXE6mJZGRTOWVq Het6b/NLU6IzXM/nV1JBprPpceNqv/zzz2zbagWuB7ju4TehUePgeHeDQpqDbJ78+NHP BbbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=aKPYkXbN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h8si14770277edz.104.2021.05.25.03.49.08; Tue, 25 May 2021 03:49:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=aKPYkXbN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232298AbhEYKd2 (ORCPT + 99 others); Tue, 25 May 2021 06:33:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231981AbhEYKca (ORCPT ); Tue, 25 May 2021 06:32:30 -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 633E1C06135C for ; Tue, 25 May 2021 03:30:19 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id e125-20020a25d3830000b029051975a6c1e9so20442694ybf.7 for ; Tue, 25 May 2021 03:30: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=UXo23GwK/luqXob/Py9T0EVZy2iOWx16pZJGz6ZxQDU=; b=aKPYkXbNTpTI1/TPsoRXDxDv/cdsJnQM4nvpvoTQ7XymGtPqhysT3wU42ITnSCKjhb 6E4fWga6oPp0gsi6h3Xq5ncixCDa2W6gdIWy5T48dU78p7+naHvW1dM+CW3lMtEHvn2/ GU8DuRkb3Jw3P4aeZHpVr5Gdd32h1+9sJIaeaLHA45+8AFnBc0YYEkHVuT659xtmMUlU K5d620FNPMlyOar2u+eH3UbyY2VmxgghFFZoPCYxtk5L+wt0ESbZURQPNRddRi43CAFX exJvRkxGu8qS6OGN/PPhPqoPIDQ3kA1xDaE6kX4ufWADOvw9TU4TvpMCPxgepAhRlK/y pMuQ== 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=UXo23GwK/luqXob/Py9T0EVZy2iOWx16pZJGz6ZxQDU=; b=HjRvmqsKslLz39eB+Cw1yWX6CQ3O01vBQsUxDnFAqv8W2dhJ1y9iUKaSScQaZbFgOw gxB3Q3fWPwScMkMsLtOIYcmRU/U8q7halWfaKLodKmmfrDlztGozk/ZHTUVSNeJ6YkqJ pVKDi+ZnZ0PRwc3YaZaC82glA1MIDZVAJJ8uuYrKid37RwaVdxJL8KaiF7/S4IWLN4zY WI69DcO6fWGL9tiicaHGZ/dndop6JJZxNvVDeuJnKaEFKsQrXVAjWK2TpvWQUzDettli GaNoRFQYANq3Pcky+g94zHChan3zfdXiOUWqAh3M3GKcmnH8zfPX1PVIRuQQB/6JoDPH RbvA== X-Gm-Message-State: AOAM530WpMdXrgOGZF5Ve7lBmnwWjYDBYVqjHL5rpsPebp2QGPSkV2+w b5w4FhuTtco1l++TtGoOrrS3E97vhFhP X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:b:8806:6b98:8ae6:8824]) (user=apusaka job=sendgmr) by 2002:a25:6911:: with SMTP id e17mr4108665ybc.162.1621938618586; Tue, 25 May 2021 03:30:18 -0700 (PDT) Date: Tue, 25 May 2021 18:29:36 +0800 In-Reply-To: <20210525102941.3958649-1-apusaka@google.com> Message-Id: <20210525182900.7.I4401b43eaf53e45e02ccaadef43cdcd3396173be@changeid> Mime-Version: 1.0 References: <20210525102941.3958649-1-apusaka@google.com> X-Mailer: git-send-email 2.31.1.818.g46aad6cb9e-goog Subject: [PATCH 07/12] Bluetooth: use inclusive language when tracking connections From: Archie Pusaka To: linux-bluetooth , Marcel Holtmann Cc: CrosBT Upstreaming , Archie Pusaka , Miao-chen Chou , "David S. Miller" , Jakub Kicinski , Johan Hedberg , Luiz Augusto von Dentz , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Archie Pusaka Use "central" and "peripheral". Signed-off-by: Archie Pusaka Reviewed-by: Miao-chen Chou --- include/net/bluetooth/hci_core.h | 6 +++--- net/bluetooth/hci_event.c | 4 ++-- net/bluetooth/hci_request.c | 17 +++++++++-------- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 929768f6ed93..cfe2ada49ca2 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h @@ -122,7 +122,7 @@ struct hci_conn_hash { unsigned int amp_num; unsigned int sco_num; unsigned int le_num; - unsigned int le_num_slave; + unsigned int le_num_peripheral; }; struct bdaddr_list { @@ -894,7 +894,7 @@ static inline void hci_conn_hash_add(struct hci_dev *hdev, struct hci_conn *c) case LE_LINK: h->le_num++; if (c->role == HCI_ROLE_PERIPHERAL) - h->le_num_slave++; + h->le_num_peripheral++; break; case SCO_LINK: case ESCO_LINK: @@ -920,7 +920,7 @@ static inline void hci_conn_hash_del(struct hci_dev *hdev, struct hci_conn *c) case LE_LINK: h->le_num--; if (c->role == HCI_ROLE_PERIPHERAL) - h->le_num_slave--; + h->le_num_peripheral--; break; case SCO_LINK: case ESCO_LINK: diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index a809e90326d7..c5871c2a16ba 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -5384,9 +5384,9 @@ static struct hci_conn *check_pending_le_conn(struct hci_dev *hdev, return NULL; /* Most controller will fail if we try to create new connections - * while we have an existing one in slave role. + * while we have an existing one in peripheral role. */ - if (hdev->conn_hash.le_num_slave > 0 && + if (hdev->conn_hash.le_num_peripheral > 0 && (!test_bit(HCI_QUIRK_VALID_LE_STATES, &hdev->quirks) || !(hdev->le_states[3] & 0x10))) return NULL; diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c index fa9125b782f8..28a477a7d320 100644 --- a/net/bluetooth/hci_request.c +++ b/net/bluetooth/hci_request.c @@ -1502,13 +1502,14 @@ static bool is_advertising_allowed(struct hci_dev *hdev, bool connectable) if (hci_conn_num(hdev, LE_LINK) == 0) return true; - /* Check le_states if there is any connection in slave role. */ - if (hdev->conn_hash.le_num_slave > 0) { - /* Slave connection state and non connectable mode bit 20. */ + /* Check le_states if there is any connection in peripheral role. */ + if (hdev->conn_hash.le_num_peripheral > 0) { + /* Peripheral connection state and non connectable mode bit 20. + */ if (!connectable && !(hdev->le_states[2] & 0x10)) return false; - /* Slave connection state and connectable mode bit 38 + /* Peripheral connection state and connectable mode bit 38 * and scannable bit 21. */ if (connectable && (!(hdev->le_states[4] & 0x40) || @@ -1516,13 +1517,13 @@ static bool is_advertising_allowed(struct hci_dev *hdev, bool connectable) return false; } - /* Check le_states if there is any connection in master role. */ - if (hci_conn_num(hdev, LE_LINK) != hdev->conn_hash.le_num_slave) { - /* Master connection state and non connectable mode bit 18. */ + /* Check le_states if there is any connection in central role. */ + if (hci_conn_num(hdev, LE_LINK) != hdev->conn_hash.le_num_peripheral) { + /* Central connection state and non connectable mode bit 18. */ if (!connectable && !(hdev->le_states[2] & 0x02)) return false; - /* Master connection state and connectable mode bit 35 and + /* Central connection state and connectable mode bit 35 and * scannable 19. */ if (connectable && (!(hdev->le_states[4] & 0x08) || -- 2.31.1.818.g46aad6cb9e-goog