From patchwork Thu Dec 17 22:53:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miao-chen Chou X-Patchwork-Id: 345008 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.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable 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 3DDE6C2BBCF for ; Thu, 17 Dec 2020 22:54:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0A15E23A56 for ; Thu, 17 Dec 2020 22:54:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732142AbgLQWy0 (ORCPT ); Thu, 17 Dec 2020 17:54:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732039AbgLQWyS (ORCPT ); Thu, 17 Dec 2020 17:54:18 -0500 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AA0AC0617B0 for ; Thu, 17 Dec 2020 14:53:38 -0800 (PST) Received: by mail-pf1-x432.google.com with SMTP id w6so346570pfu.1 for ; Thu, 17 Dec 2020 14:53:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fRqpnsxfl7qHr4VGqHrEfBZUN2xnW4XoVy0GlNX3IEw=; b=M7tyJ75ZEoEHtHRFHXWzjAukeGU6uZWu4hbrVNbxb4pviOUrB3bQahQtCfSC+9p2m0 YDbKmXSabg6qZDYR7dqyDdhad3kdv7qLeVSxCaRhSh8fTvXp8w00pJZo8oMSmq2YxgXl fNBAwH8sxrhgbeSxvMpB24u/EOf+k1SOiNXGw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fRqpnsxfl7qHr4VGqHrEfBZUN2xnW4XoVy0GlNX3IEw=; b=m3j957p8AXsYuMQ+JAyJNqKmcAERnc+OUOfygAlKabBVt8WBQX0rFLv41qGlNmMJz0 2a2fqV5UlpjxaDrhhye4Y36sedDBb3WXdOXFuEfXr7y+JB6/UaTJv513gBcxTfBUIrG7 gRopoUfI5oHL0Vrz+rsYl0MD17rbsEdzLqKNJ8wgVwS6dVHa4Rsfw19s3IgLAmT/+6jf /iTTRpnHt8kE1zBWttenZCEvdilZpNf9ZC+gfbdwhuQotdMN/ZL2AUV1NpUA7l1IFtf9 svc5p3nZezvF+kVeqd5qQj8iY2ryFcpze7+DQ+RIOrK/M3tcb+WNLREvmBy9VHkAFbbx aKDA== X-Gm-Message-State: AOAM531x0BDah6EIw9eMfE7zGRLvTxEhW6AnbJ/t/Xpylqh+I3faAWBq Q7DUxwyGnNPv9JyiwSJcEAU0uMlcz2MMZg== X-Google-Smtp-Source: ABdhPJyOQPClQLF1y6Xhcm5nUIsJcSrkwCk6ErtPzkEBtpkBszZYYYcHnTdPbU3QjM4VER8TSicGxw== X-Received: by 2002:aa7:8701:0:b029:19e:561:d476 with SMTP id b1-20020aa787010000b029019e0561d476mr1477814pfo.2.1608245617759; Thu, 17 Dec 2020 14:53:37 -0800 (PST) Received: from localhost ([2620:15c:202:201:de4a:3eff:fe75:1314]) by smtp.gmail.com with ESMTPSA id c14sm6559544pfd.37.2020.12.17.14.53.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Dec 2020 14:53:37 -0800 (PST) From: Miao-chen Chou To: Bluetooth Kernel Mailing List Cc: Alain Michaud , Luiz Augusto von Dentz , Archie Pusaka , Marcel Holtmann , Miao-chen Chou , Abhishek Pandit-Subedi , "David S. Miller" , Jakub Kicinski , Johan Hedberg , Luiz Augusto von Dentz , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v2 1/4] Bluetooth: Keep MSFT ext info throughout a hci_dev's life cycle Date: Thu, 17 Dec 2020 14:53:15 -0800 Message-Id: <20201217145149.v2.1.Id9bc5434114de07512661f002cdc0ada8b3d6d02@changeid> X-Mailer: git-send-email 2.29.2.684.gfbc64c5ab5-goog MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This moves msft_do_close() from hci_dev_do_close() to hci_unregister_dev() to avoid clearing MSFT extension info. This also avoids retrieving MSFT info upon every msft_do_open() if MSFT extension has been initialized. The following test steps were performed. (1) boot the test device and verify the MSFT support debug log in syslog (2) restart bluetoothd and verify msft_do_close() doesn't get invoked Signed-off-by: Miao-chen Chou Reviewed-by: Abhishek Pandit-Subedi Reviewed-by: Archie Pusaka --- (no changes since v1) net/bluetooth/hci_core.c | 4 ++-- net/bluetooth/msft.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 9d2c9a1c552fd..8471be105a2ac 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -1780,8 +1780,6 @@ int hci_dev_do_close(struct hci_dev *hdev) hci_sock_dev_event(hdev, HCI_DEV_DOWN); - msft_do_close(hdev); - if (hdev->flush) hdev->flush(hdev); @@ -3869,6 +3867,8 @@ void hci_unregister_dev(struct hci_dev *hdev) unregister_pm_notifier(&hdev->suspend_notifier); cancel_work_sync(&hdev->suspend_prepare); + msft_do_close(hdev); + hci_dev_do_close(hdev); if (!test_bit(HCI_INIT, &hdev->flags) && diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c index 4b39534a14a18..d9d2269bc93ef 100644 --- a/net/bluetooth/msft.c +++ b/net/bluetooth/msft.c @@ -76,7 +76,8 @@ void msft_do_open(struct hci_dev *hdev) { struct msft_data *msft; - if (hdev->msft_opcode == HCI_OP_NOP) + /* Skip if opcode is not supported or MSFT has been initiatlized */ + if (hdev->msft_opcode == HCI_OP_NOP || hdev->msft_data) return; bt_dev_dbg(hdev, "Initialize MSFT extension"); From patchwork Thu Dec 17 22:53:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miao-chen Chou X-Patchwork-Id: 345524 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.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 D2364C2BBCF for ; Thu, 17 Dec 2020 22:55:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 96BCB23A54 for ; Thu, 17 Dec 2020 22:55:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732198AbgLQWyr (ORCPT ); Thu, 17 Dec 2020 17:54:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732168AbgLQWyp (ORCPT ); Thu, 17 Dec 2020 17:54:45 -0500 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A9AEC061282 for ; Thu, 17 Dec 2020 14:54:05 -0800 (PST) Received: by mail-pj1-x102f.google.com with SMTP id f14so231537pju.4 for ; Thu, 17 Dec 2020 14:54:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cI9MgmLeploorlaT6riPPJE9eXLVQcklnfEH1q+Fd9s=; b=eeSPw9ZNCa3gp4C94BkDSwC79ilLWC9VXQd3Ibuzia9j0DGwW584pKr22PoidTVF9z IRAQD1+yho+07aj/S+ueSUy2Srx3RJWkNfp315Kpj29Z1XiiWmPhh94vbkja4z+NKtX6 EJPgoUESQOiuv9BByERPEEj76aLTvRuUnA1OA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cI9MgmLeploorlaT6riPPJE9eXLVQcklnfEH1q+Fd9s=; b=H1Dg6WuPQ33bds/8EqWxvKCf+QyeczEnEUlOpk/9rJWzH7RrJHfk/mq7+A4Ycho+eL 4CqhB6nkC2el2rJy/Ox6fumAh1QcOsTu9XiZ0a0TBd/hOqCOCVFa9+Z24H9ua04f9YAx 9Q1oJ/SxOfabmARlTPZbZNzRhudf/2BVoF7NnjDAjztwzBrbM4+ytYmRajLcMAn1MLKO 7HTTvdd0XOJMonGh082r10agyOctcLI+K5yjzFtiVKsLJVSun2ItDlyq3+CJ3+b+myaY hEbW0FFcfHE6cQ6wgxdAC62UCTqQiinMLF5humNdgj50yvhbYD8BYAvzkuGhFilLhAPF rPLg== X-Gm-Message-State: AOAM532fcq52JAR4GmkdUpbNfe/70Ei2sad4rxbgaq/mU2sSZeZbzTB8 HUCfPxZdE85GhovftXW2J7I4JdfZV2O3Rg== X-Google-Smtp-Source: ABdhPJyAgs5zVEPDtjuG0Pl+XF2C1xuC0/BKGQDoZVn8MmxXYDfPKxSs/86+hI9EBSIiQQ03COSEfg== X-Received: by 2002:a17:90a:6a48:: with SMTP id d8mr1363057pjm.130.1608245644550; Thu, 17 Dec 2020 14:54:04 -0800 (PST) Received: from localhost ([2620:15c:202:201:de4a:3eff:fe75:1314]) by smtp.gmail.com with ESMTPSA id w200sm6776305pfc.14.2020.12.17.14.54.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Dec 2020 14:54:03 -0800 (PST) From: Miao-chen Chou To: Bluetooth Kernel Mailing List Cc: Alain Michaud , Luiz Augusto von Dentz , Archie Pusaka , Marcel Holtmann , Miao-chen Chou , Abhishek Pandit-Subedi , Johan Hedberg , Luiz Augusto von Dentz , linux-kernel@vger.kernel.org Subject: [PATCH v2 2/4] Bluetooth: btqca: Enable MSFT extension for Qualcomm WCN399x Date: Thu, 17 Dec 2020 14:53:17 -0800 Message-Id: <20201217145149.v2.2.I188d99e738b39d9ef36110addbc227837d3c42a7@changeid> X-Mailer: git-send-email 2.29.2.684.gfbc64c5ab5-goog In-Reply-To: <20201217145149.v2.1.Id9bc5434114de07512661f002cdc0ada8b3d6d02@changeid> References: <20201217145149.v2.1.Id9bc5434114de07512661f002cdc0ada8b3d6d02@changeid> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org The following Qualcomm WCN399x Bluetooth controllers support the Microsoft vendor extension and they are using 0xFD70 for VsMsftOpCode. -WCN3990 -WCN3991 -WCN3998 < HCI Command: ogf 0x3f, ocf 0x0170, plen 1 00 > HCI Event: 0x0e plen 18 01 70 FD 00 00 1F 00 00 00 00 00 00 00 04 4D 53 46 54 The following test step was performed. - Boot the device with WCN3991 and verify INFO print in dmesg. Signed-off-by: Miao-chen Chou Reviewed-by: Abhishek Pandit-Subedi Reviewed-by: Archie Pusaka --- (no changes since v1) drivers/bluetooth/btqca.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c index f85a55add9be5..ab19963c83616 100644 --- a/drivers/bluetooth/btqca.c +++ b/drivers/bluetooth/btqca.c @@ -517,6 +517,19 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate, return err; } + /* WCN399x supports the Microsoft vendor extension with 0xFD70 as the + * VsMsftOpCode. + */ + switch (soc_type) { + case QCA_WCN3990: + case QCA_WCN3991: + case QCA_WCN3998: + hci_set_msft_opcode(hdev, 0xFD70); + break; + default: + break; + } + /* Perform HCI reset */ err = qca_send_reset(hdev); if (err < 0) { From patchwork Thu Dec 17 22:53:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miao-chen Chou X-Patchwork-Id: 345007 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.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 00D96C4361B for ; Thu, 17 Dec 2020 22:55:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C65EE23A51 for ; Thu, 17 Dec 2020 22:55:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732206AbgLQWy7 (ORCPT ); Thu, 17 Dec 2020 17:54:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732199AbgLQWy7 (ORCPT ); Thu, 17 Dec 2020 17:54:59 -0500 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E30FC061248 for ; Thu, 17 Dec 2020 14:54:16 -0800 (PST) Received: by mail-pj1-x1029.google.com with SMTP id f14so231787pju.4 for ; Thu, 17 Dec 2020 14:54:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WZ5WSbQtPeUtU/i4otWMR2VgbaOPAzPCIHXFiOM9ruA=; b=A4h3Z6nsqjvVlEDu1hHg5MAI22u3KUOUIPnpQOSsrM5dhduiWA2NQCdzkG5RU9pd4p tG2KnEnBBJRLCTXyNEa9kQudxBa8ABQImvv+cQfKZB8e1d+x3Her/TfDqAdQ5CwMVwD0 ED9npRAn0QZZd7pRs9je6E3d1v3BeDX6eV4dI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WZ5WSbQtPeUtU/i4otWMR2VgbaOPAzPCIHXFiOM9ruA=; b=CAD4DasUFGa8jDeZEpyF//RxJCdz5KywODh2yY+Sqv3leI5+AYkRE4XEmL38lcLO5M hZfKyiczAW/jZ8ZfNbwAIbDElRn81SV+4XgC5irMdCi7X8zOhbomNINsI1Z6Ciaz2/E7 P12ImSTULQHJelQzfwnVRdwwW9ojIaLwmDUKBYns+DoknEY8R8dOvVTjjWaHwXQoMQ70 Zx8cdotDB3jprydG8ftbwK6f2sB+V4s+Vxjx58bMIMRWZj8A/nqHa+my+SqDx6CW20H1 //dCSFWB8Dv9FjPzz2EToGRTN0P5eBzahw3VnRatGW06OvDpOGD3Z0KfJcsx8FhEkx5M Rhtw== X-Gm-Message-State: AOAM531iDGQ/qad9ooN3R0pMGnqGdRpBOzEcWPpGthpXL+rxXtS500lC G2SI91hhcRj8mQzro2kcpddRTBpIa0pm6Q== X-Google-Smtp-Source: ABdhPJzsZ0rOvLccxWS60JFncVdyDGjlKad9nUpOq5XRfyzyvOUSIchietm1qp1JpAOTfisKkZvUww== X-Received: by 2002:a17:90a:1182:: with SMTP id e2mr1355532pja.152.1608245655911; Thu, 17 Dec 2020 14:54:15 -0800 (PST) Received: from localhost ([2620:15c:202:201:de4a:3eff:fe75:1314]) by smtp.gmail.com with ESMTPSA id s7sm5557907pju.37.2020.12.17.14.54.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Dec 2020 14:54:15 -0800 (PST) From: Miao-chen Chou To: Bluetooth Kernel Mailing List Cc: Alain Michaud , Luiz Augusto von Dentz , Archie Pusaka , Marcel Holtmann , Miao-chen Chou , Abhishek Pandit-Subedi , Johan Hedberg , Luiz Augusto von Dentz , linux-kernel@vger.kernel.org Subject: [PATCH v2 3/4] Bluetooth: btusb: Enable MSFT extension for Intel controllers Date: Thu, 17 Dec 2020 14:53:19 -0800 Message-Id: <20201217145149.v2.3.I84d6a963dbe3a014e8456943785b076344f659bf@changeid> X-Mailer: git-send-email 2.29.2.684.gfbc64c5ab5-goog In-Reply-To: <20201217145149.v2.1.Id9bc5434114de07512661f002cdc0ada8b3d6d02@changeid> References: <20201217145149.v2.1.Id9bc5434114de07512661f002cdc0ada8b3d6d02@changeid> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org The Intel JeffersonPeak, HarrisonPeak and CyclonePeak Bluetooth controllers support the Microsoft vendor extension and they are using 0xFC1E for VsMsftOpCode. < HCI Command: Vendor (0x3f|0x001e) plen 1 00 > HCI Event: Command Complete (0x0e) plen 15 Vendor (0x3f|0x001e) ncmd 1 Status: Success (0x00) 00 3f 00 00 00 00 00 00 00 01 50 The following test step was performed. - Boot the test devices with HarrisonPeak and verify INFO print in dmesg. Signed-off-by: Miao-chen Chou Reviewed-by: Abhishek Pandit-Subedi Reviewed-by: Archie Pusaka --- (no changes since v1) drivers/bluetooth/btusb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 03b83aa912779..25cfa47995a8a 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -2924,7 +2924,10 @@ static int btusb_setup_intel_new(struct hci_dev *hdev) * extension are using 0xFC1E for VsMsftOpCode. */ switch (ver.hw_variant) { + case 0x11: /* JfP */ case 0x12: /* ThP */ + case 0x13: /* HrP */ + case 0x14: /* CcP */ hci_set_msft_opcode(hdev, 0xFC1E); break; } From patchwork Thu Dec 17 22:53:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miao-chen Chou X-Patchwork-Id: 345523 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.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 30C6AC2BBCF for ; Thu, 17 Dec 2020 22:55:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0459723A56 for ; Thu, 17 Dec 2020 22:55:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732262AbgLQWz2 (ORCPT ); Thu, 17 Dec 2020 17:55:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732236AbgLQWz0 (ORCPT ); Thu, 17 Dec 2020 17:55:26 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FB44C0617A7 for ; Thu, 17 Dec 2020 14:54:46 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id hk16so241952pjb.4 for ; Thu, 17 Dec 2020 14:54:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pX4/p0ajAVR2V3H5po7317NWmJXfT5ZtsIuTWx4ykXE=; b=UW3JZDeAgJB94y8VYny9htsdJS/3QwO6xIlcMTtpJTsXxc79KPHZnxu2NTdc+7SdwW bTKMwyLvgZUMCdMT8M6dbZFg3RCqyWA33UuXdhVgLQ8Gvu9fWLHBw6Ssj1ntU78tCEvZ MoGZtq+EU1cOnKI5KA1J9e3VO+5rp9G4M4owA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pX4/p0ajAVR2V3H5po7317NWmJXfT5ZtsIuTWx4ykXE=; b=G5YNEkEcxLELVlyMsl+SkLqKx58oUwLrS8DHnq1+n5iAwlU3N5PQjZx0tJTfYoxkN7 ZQ3QPhjnVlJ4Q4AZ0l9sA5ZGKLMOr6bLIOr0CgO0+IeqQs43Eyld5cSWTktGRkHf9cpt 0BFHI8Q3Jwl0wkTbP+8KLL8SZI1lZnGn9J8FmEUrO3NQ+2uBREIr4iZKFxS71HoPon/f /iKh8SdLX0UAeA2dWtelifiYRiYJnRdsqmHQNlnZjR72vV0tfW3oykRssTB9UAtL2nyd VrPksR8kqyfIBMKyZU1dTLNY95orVCAeffLSBPCpKGlQETkDJTHj6gh5SJ/DBZUvGr7X W5Mg== X-Gm-Message-State: AOAM53300RBQIkFLDJgaX2lV3lDJARapyabPV412qPdOqmrQpOQg6lSz 6xKGFHDHCmdAspEDnmcEi+5IDSQ5lft3Fw== X-Google-Smtp-Source: ABdhPJzvKmNeRUa70WCUPTD0GN+SfqGb+b30Uoxnskq565xw5R6HRynaT3Q8A4bGT+DlFjP8XFG+DQ== X-Received: by 2002:a17:902:7489:b029:da:5aed:8ebf with SMTP id h9-20020a1709027489b02900da5aed8ebfmr1382008pll.35.1608245685742; Thu, 17 Dec 2020 14:54:45 -0800 (PST) Received: from localhost ([2620:15c:202:201:de4a:3eff:fe75:1314]) by smtp.gmail.com with ESMTPSA id q11sm7167639pgh.16.2020.12.17.14.54.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Dec 2020 14:54:45 -0800 (PST) From: Miao-chen Chou To: Bluetooth Kernel Mailing List Cc: Alain Michaud , Luiz Augusto von Dentz , Archie Pusaka , Marcel Holtmann , Miao-chen Chou , Abhishek Pandit-Subedi , Johan Hedberg , Luiz Augusto von Dentz , linux-kernel@vger.kernel.org Subject: [PATCH v2 4/4] Bluetooth: btrtl: Enable MSFT extension for RTL8822CE controller Date: Thu, 17 Dec 2020 14:53:21 -0800 Message-Id: <20201217145149.v2.4.I369d2fc751e660f78e2930743aa368e0fe1bfd53@changeid> X-Mailer: git-send-email 2.29.2.684.gfbc64c5ab5-goog In-Reply-To: <20201217145149.v2.1.Id9bc5434114de07512661f002cdc0ada8b3d6d02@changeid> References: <20201217145149.v2.1.Id9bc5434114de07512661f002cdc0ada8b3d6d02@changeid> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org The Realtek RTL8822CE Bluetooth controller support Microsoft vendor extension and it uses 0xFCF0 for VsMsftOpCode. The following test step was performed. - Boot the test device with RTL8822CE and verify the INFO print in dmesg. Signed-off-by: Miao-chen Chou Reviewed-by: Abhishek Pandit-Subedi Reviewed-by: Archie Pusaka --- (no changes since v1) drivers/bluetooth/btrtl.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c index a4f7cace66b06..94df4e94999d5 100644 --- a/drivers/bluetooth/btrtl.c +++ b/drivers/bluetooth/btrtl.c @@ -658,6 +658,12 @@ struct btrtl_device_info *btrtl_initialize(struct hci_dev *hdev, } } + /* RTL8822CE supports the Microsoft vendor extension and uses 0xFCF0 + * for VsMsftOpCode. + */ + if (lmp_subver == RTL_ROM_LMP_8822B) + hci_set_msft_opcode(hdev, 0xFCF0); + return btrtl_dev; err_free: