Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7311469rwr; Wed, 10 May 2023 06:48:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6CGA68SkqCs0TCmNOqN6+i5uyPj6haihiuKaCgi5Vknej2fi9CtZsLTerTkFNO/qMur5kT X-Received: by 2002:a17:902:c943:b0:1a9:2a9e:30a8 with SMTP id i3-20020a170902c94300b001a92a9e30a8mr29593509pla.9.1683726493999; Wed, 10 May 2023 06:48:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1683726493; cv=pass; d=google.com; s=arc-20160816; b=OuBxtp2tCavykDYCrsvy5+06wK8yhLBM3+RLBVdIXOZgge0znwH+3Arlfz/Cdlb/om lS+2FsgLTzaxGXQt3OzPZNQsTnILhuWPkLFHm/vOfoGFFXAVhHs0xIButsfkvj384dGY +NYPuOxO9J1EtGyLcBjFgTAhzJxJbF0CYlMT4rvUa9Y4mI+AlRjd/ovouxLdLKy2n6FF kLSZEBF8SjmOYjHA3fS8q7HYZbQ6EZFpEpvP4cdllNHHDmHYPhgWp01UADhC4n4w6ixt fSeG0pCkcA+mhpyb6anG4d1oG0n+AiV6hgOMxls/fVHWqwqrOjxX2vDtsKr9dLGmjv27 EGeg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=O5C5v/UYxLtu8oHFwxCYJHLZIoiyOYUEzsmKuCjuIF4=; b=WsYm/6+aniRi4KWWcQWRCJK+GGOiuUEz7U4wzgyKZY317mjAwvSfIbL29GbP8LKoCW bFErU8ZOHMNjhl6zax5WWboX74B/cIsIyIL9xwSIsiYGhix3Ui6xfntB/XB+RmwWE98s NEfUoyWeBZ265IVZnYFOhPc/nxr4cGvyj1C+SqQ357Rk7vCZ/UVHMIhZrjFxiQRXROcJ /dw4l6v7gz1bc8bC84rAlU2JKfKj7hJAvUF+MHF6HpWdwWpC+a/iC+cRg7+8BI3Mbl8m dLSRdBt/ef8rVd8wIKu+hm5VS+Rcmnoygs+B0AiYQMtcuwdfURV9VrUXZzcizRDk/ylu ydPQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=LQAc33pd; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id iw22-20020a170903045600b001a63b8e071esi3939034plb.28.2023.05.10.06.47.59; Wed, 10 May 2023 06:48:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=LQAc33pd; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237241AbjEJNrt (ORCPT + 99 others); Wed, 10 May 2023 09:47:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237244AbjEJNrp (ORCPT ); Wed, 10 May 2023 09:47:45 -0400 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2048.outbound.protection.outlook.com [40.107.105.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 461D86A4B for ; Wed, 10 May 2023 06:47:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZNkyEqEYEeUhXqgpUpcQ5/40rXVzZs0NeujN5sobwqFjrxIA5crhmPRAtIpHKTtX5qzKuoWkV9LkRU5aKyThdUYJLcIZKvKPmEDT+qTxjDFW9ZA4Qdq5Nnfr0g5sfJJgaTacZDuO7DUdXFP9SpUxKpo6FidaQRfXEmjONs8cpgQgsumeVPwHr3zATLOSW/BeVMC4YWHdDsm8A9bVqys4ejL4iovEadnjOGLyqpBIluhysmbpIV6zqSlb0XITtXiknrhXoclMhix5fuhTawwieGcV46Ahc0H7XxBrOTYTi3OcnbVLVZHk4Bx5hQNjp/wW4cepy1A18i1QAqpb9y5cKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=O5C5v/UYxLtu8oHFwxCYJHLZIoiyOYUEzsmKuCjuIF4=; b=ldoIyqRt3S1hyWBeghRH5upNGm7+2ZY9o51enWGEvWGyZaIbCrjpTCTH9gSz8AyPKKmgAWF3OGKIPVkAACn1PzYwyEiArj6Xt0lU7TX8ggVZpPN5/1KBFNPn3wYR/6swIrnuxa2ainRYsFFruh6cGL+wE7In6w1DwYsnXSf4HcukkDqyAqLCuA9VBDZi+A5ScC9KgiKRdAVVS/wOdxHSemPeGQwH6DVvpM4W9I4lo0Y2fRaVWkrIPdDWUxTkTXd5/Bqfj7fTRCt0cWTHGdYjZci5rbAXIv2qi4akwKfIsUbsdNHi4Wnfzinvzw7oUayTucCqEjGfHFdWdjgpc9QPvw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=O5C5v/UYxLtu8oHFwxCYJHLZIoiyOYUEzsmKuCjuIF4=; b=LQAc33pdZ3n6hH1a9Cw+YmNjGwADgxEZBWRfUmtqvlMOmnBc3/No7lqjRR1h09sCgi/kknVbrShZg7Fe3i9dmjIC+Fdw8WqA3v53YUGeamRO/QFKGDAfLUWKfbgrk0TI8HYFgRKG7ofZKJcYC6v11OvLAw5oa6D7LaJztFKjJzQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from GV1PR04MB9151.eurprd04.prod.outlook.com (2603:10a6:150:26::9) by PAXPR04MB9593.eurprd04.prod.outlook.com (2603:10a6:102:24f::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.32; Wed, 10 May 2023 13:46:19 +0000 Received: from GV1PR04MB9151.eurprd04.prod.outlook.com ([fe80::54d4:ce9b:c49a:d46a]) by GV1PR04MB9151.eurprd04.prod.outlook.com ([fe80::54d4:ce9b:c49a:d46a%7]) with mapi id 15.20.6363.033; Wed, 10 May 2023 13:46:18 +0000 From: Claudia Draghicescu To: linux-bluetooth@vger.kernel.org Cc: Claudia Draghicescu Subject: [PATCH v2 1/1] Bluetooth: Check for ISO support in controller Date: Wed, 10 May 2023 16:45:57 +0300 Message-Id: <20230510134557.11486-2-claudia.rosu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230510134557.11486-1-claudia.rosu@nxp.com> References: <20230510134557.11486-1-claudia.rosu@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: AS4P192CA0012.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:5da::20) To GV1PR04MB9151.eurprd04.prod.outlook.com (2603:10a6:150:26::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1PR04MB9151:EE_|PAXPR04MB9593:EE_ X-MS-Office365-Filtering-Correlation-Id: f0a8c2db-41c2-4d8e-b656-08db515ceeb6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JRvhlf5kf+80nvqYUbLXX9xcfFQcV9Cv6bqgbH416Xh3G3fyIplCRMF+xwBpWQJ3rUTYH42azOm62FnBxQtYJMVf9vRPixJZg5vWEMb7cA9CJVzvlyPoJ4Yo0npBSEbJ+Sr/hiqykdnr/AbWhwPkE19x4nMfi0aWeoO39WMvYxlltSEJClI4go/NbPUMe/KIm4PxgcHYellLkiUPy6HTSqlD/ZDtuZatQSHQAfwrn09DZ+CKBgVYh04bbnTk6wrq/urqTrjeK0m+fP67uCk8H5gZCwjLKdNK1iYYzQ/iKP74rBYCBeSw6yENhcJPB6PeUSL9nIfX4RBBNNJ6Dtt57PyxsuXF6FZIbMJNVKlZzXwZ8/8g1GhczaDsrnVu3gPVm9nZQJDkZ/xyc02BypoL/PDPZf6E80jYDIlhyNYcaN5weG4dlCASQLbBoMDCgHAfn4TK9Ch4iyQeYpvcouY2ooUr9P2FgPGtzszhDFIAIgqLZwi/6Ey6sHia9ESmydJGAd51GHzOO1nvd9usIY65k8IVkgwJYt/1I26KqPN3BaCJaFaWK1cqhKgActU1FyoHg+5x6BdwwS22RaoUFH21LfR/vKgC9ojYuxH7y81OoE0lzYIQAiI8lwdECp8kzgnI X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:GV1PR04MB9151.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(136003)(346002)(376002)(39860400002)(366004)(451199021)(52116002)(4326008)(66946007)(316002)(6916009)(66556008)(6486002)(478600001)(66476007)(36756003)(86362001)(2616005)(26005)(6512007)(6506007)(1076003)(6666004)(8936002)(41300700001)(8676002)(5660300002)(186003)(2906002)(38100700002)(38350700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?wv9KEpbeRdHv5pkZrd62lgqzKEXYkHCaGgvvyO8jpl1sDd3tPlL3gPICcm5P?= =?us-ascii?Q?4TOCGgkATCQYUN1eY8lPhRsvUVe7NBERZAfRWrs5gaNTSpZ89eYqzN/X30sz?= =?us-ascii?Q?1UEXjz/dBPwdGcLh4gscaPzD382V/cYGI4GwbShxuG44vpZ0x4WOdPUC2vex?= =?us-ascii?Q?ySBsUqJJFdUK9DEbg7Z5ySzcKxAHsrFiGwfvxpWsWgcUcpQhOx00y9OwS39D?= =?us-ascii?Q?ICQ6u0gaE6mkJjFSNFT4h+7NwczR4WMAL3tmwM1/HBrWC/QHqeyWBQiGD1NU?= =?us-ascii?Q?NjjLkWKqnZJbyN63m84rda0d26f81HThQPc8fNexd+AQRq60MmHI5VL41LlR?= =?us-ascii?Q?4l4W9pVr5oYGbkBHKSG9V1nNng+uESmdohy3Y3w12DiqqQ2OY8STJ1QAUQ3u?= =?us-ascii?Q?RiY58eqg7HoCB1K6AhZhgfZq8Zu2XjUyq+HLZFwmDCitPyRtQIMzvzftx+4b?= =?us-ascii?Q?+5Ae9ql4TpiSic8HNWb1T1jOEZMNoaCujeClDwi2JL6Ui64mQKVWWHQPhXmZ?= =?us-ascii?Q?jMRIsnXPmN9zD4/wbGpWK9EI1yxu+DcQ5vpnwI/ttts3iF/vy5l1EayyrnGt?= =?us-ascii?Q?Ur/QdccWiMaWd6oBi/aM4A5tr7CyKtcuTiBjAj+Ye0eG6q1jrla/fCpduOsq?= =?us-ascii?Q?FSbisEWQiuTGaklAM3mYfD8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?PRW1sVL0Z+Iq82mIkJCxtm3DW9ZHHq2LsP4cqQ5F?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f0a8c2db-41c2-4d8e-b656-08db515ceeb6 X-MS-Exchange-CrossTenant-AuthSource: GV1PR04MB9151.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2023 13:46:18.8749 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ORMlzJk/PRbOAMLkOBLCSUUz3yxka7hnpJmvEhqkF/RqYgFZ+UA1ycPaItmB+q3hvC87oONpVsbgZMV0uuYFmA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB9593 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This patch checks for ISO_BROADCASTER and ISO_SYNC_RECEIVER in controller. Signed-off-by: Claudia Draghicescu --- include/net/bluetooth/hci.h | 1 + include/net/bluetooth/hci_core.h | 1 + include/net/bluetooth/mgmt.h | 2 ++ net/bluetooth/mgmt.c | 6 ++++++ 4 files changed, 10 insertions(+) diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 07df96c47ef4..16a452438dfd 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h @@ -576,6 +576,7 @@ enum { #define HCI_LE_CIS_CENTRAL 0x10 #define HCI_LE_CIS_PERIPHERAL 0x20 #define HCI_LE_ISO_BROADCASTER 0x40 +#define HCI_LE_ISO_SYNC_RECEIVER 0x80 /* Connection modes */ #define HCI_CM_ACTIVE 0x0000 diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index a6c8aee2f256..6a0ffe027d57 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h @@ -1760,6 +1760,7 @@ void hci_conn_del_sysfs(struct hci_conn *conn); #define cis_peripheral_capable(dev) \ ((dev)->le_features[3] & HCI_LE_CIS_PERIPHERAL) #define bis_capable(dev) ((dev)->le_features[3] & HCI_LE_ISO_BROADCASTER) +#define sync_recv_capable(dev) ((dev)->le_features[3] & HCI_LE_ISO_SYNC_RECEIVER) #define mws_transport_config_capable(dev) (((dev)->commands[30] & 0x08) && \ (!test_bit(HCI_QUIRK_BROKEN_MWS_TRANSPORT_CONFIG, &(dev)->quirks))) diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h index a5801649f619..7eeec8501846 100644 --- a/include/net/bluetooth/mgmt.h +++ b/include/net/bluetooth/mgmt.h @@ -111,6 +111,8 @@ struct mgmt_rp_read_index_list { #define MGMT_SETTING_WIDEBAND_SPEECH BIT(17) #define MGMT_SETTING_CIS_CENTRAL BIT(18) #define MGMT_SETTING_CIS_PERIPHERAL BIT(19) +#define MGMT_SETTING_ISO_BROADCASTER BIT(20) +#define MGMT_SETTING_ISO_SYNC_RECEIVER BIT(21) #define MGMT_OP_READ_INFO 0x0004 #define MGMT_READ_INFO_SIZE 0 diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index f7b2d0971f24..61c8e1b8f3b0 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -944,6 +944,12 @@ static u32 get_current_settings(struct hci_dev *hdev) if (cis_peripheral_capable(hdev)) settings |= MGMT_SETTING_CIS_PERIPHERAL; + if (bis_capable(hdev)) + settings |= MGMT_SETTING_ISO_BROADCASTER; + + if (sync_recv_capable(hdev)) + settings |= MGMT_SETTING_ISO_SYNC_RECEIVER; + return settings; } -- 2.34.1