From patchwork Thu Dec 17 07:17:27 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: 345012 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 5BF10C2BB40 for ; Thu, 17 Dec 2020 07:18:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1779F23603 for ; Thu, 17 Dec 2020 07:18:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727120AbgLQHS2 (ORCPT ); Thu, 17 Dec 2020 02:18:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727026AbgLQHSZ (ORCPT ); Thu, 17 Dec 2020 02:18:25 -0500 Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3D07C0617B0 for ; Wed, 16 Dec 2020 23:17:44 -0800 (PST) Received: by mail-pg1-x52a.google.com with SMTP id k65so9400403pgk.0 for ; Wed, 16 Dec 2020 23:17:44 -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=TEO3/oQXoRDhA5Aynf5tOUBOZITapi4dUktMPWEGVZE=; b=ndhZNq/pSBaAgASPaZht6Nko7YjlzT6/xcqnnYlTyx6Yzm41/zdeDh2EXZOVRR8jOU L6jYs1DdTbipR0GET9I8bg6eOds5218HKB8ugQgwO1v0QJMjeVeuIy4L8tiJN5v56VcL 9jW6pcdLX16EGoR01wxXTe2H4BP6IELYAp5gg= 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=TEO3/oQXoRDhA5Aynf5tOUBOZITapi4dUktMPWEGVZE=; b=btylPdHMSN8XeqRcRwlua1rJRG4DM9FncbgQIgpQk45wnwmv9lG4Hweg1rSFlg9tgr d/Q36snBezUY4hleFp0ZKmFJ7P10Nunky/jYGRf8XezjOcSVtE+5h0zdSDz0j4EGThE4 iM8Y0+dpzGKcSOhci+S1shcSmEbhXHnEgEt0ymKSFezyGVooVowhCkq3eT4NOKPZtBjl FFHZYud0U2X+mvCPn5mv1tmhS/SiRMBQ75Bb83m/SJBoXBXHAA99YmFrGEoKOPuBqiCj PyMDYuqpKSrz3cgOlHJO0V2KD/QGxljeLptZSva8qDxYF5dcF9Z6zrbSGi4MnrW8/wn7 sAig== X-Gm-Message-State: AOAM533NfWHJDUygnccy1TwQ39uDeXqegqO6oSYZBQe3vxzFcpWb2VfX O0UJ4we0G+QGnwGkZS7EX9QmCKzrKsuCtg== X-Google-Smtp-Source: ABdhPJyfnhMZrex/tPAF6iMu7BaBNlY7Znatxxe8jrhqGqXY7JjT4xdxaIdYGm2/h8qhP/AaVc152g== X-Received: by 2002:a62:1716:0:b029:19d:b78b:ef02 with SMTP id 22-20020a6217160000b029019db78bef02mr8043307pfx.11.1608189463855; Wed, 16 Dec 2020 23:17:43 -0800 (PST) Received: from localhost ([2620:15c:202:201:de4a:3eff:fe75:1314]) by smtp.gmail.com with ESMTPSA id q26sm4723632pfl.219.2020.12.16.23.17.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 16 Dec 2020 23:17:43 -0800 (PST) From: Miao-chen Chou To: Bluetooth Kernel Mailing List Cc: Alain Michaud , Archie Pusaka , Marcel Holtmann , Luiz Augusto von Dentz , 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 v1 1/4] Bluetooth: Keep MSFT extension info throughout a hci_dev's life cycle Date: Wed, 16 Dec 2020 23:17:27 -0800 Message-Id: <20201216231652.v1.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 --- 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 07:17:29 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: 345527 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 B3F24C2BBCA for ; Thu, 17 Dec 2020 07:18:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 68FB7233FE for ; Thu, 17 Dec 2020 07:18:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726998AbgLQHSr (ORCPT ); Thu, 17 Dec 2020 02:18:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727171AbgLQHSp (ORCPT ); Thu, 17 Dec 2020 02:18:45 -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 0FFCEC061282 for ; Wed, 16 Dec 2020 23:18:05 -0800 (PST) Received: by mail-pf1-x432.google.com with SMTP id t8so18466285pfg.8 for ; Wed, 16 Dec 2020 23:18: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=iaV7Mr1OnvijXCzI76kMkwYxN05oQ0nopWy4o/r2Ewg=; b=le1KgvD0Ngu7bipqD+Nq6mjJXgFX9N1HMtk+AAozLaa1qV4o1yvGfoZ9T1bnYYNXu3 hVVoHQ8OcEIvcnLioi3njCOaEON+aj3dbrgaG2io1kqV8o1NhlQmsMHQIixeoDCFA5oY sjHdNROmoMsFQyiumvITiadI83cXXnYhyTlj0= 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=iaV7Mr1OnvijXCzI76kMkwYxN05oQ0nopWy4o/r2Ewg=; b=pz5AJ4w3ZG8gd637YNxNQKegL6N+w3ItjAbArUEzau92kqZqJlJpuB+1A5h86WNsep y4FJuuj7e3hVx1XYtScMBqJfhzA6qui/6vBpfnUOpbqTpPSlglAXhfgKuG3hSWsQDNII EoCBuW5n7IBJfUqLhdH0D7yQYhqMV1WMFBFitpPvgCUB9/gumAd1N8M/nNfsjESaQJv9 T5qEp8WYrrCx4EBwPyJOQ1UzXMHZ4Ia4Juk5fIRc17CKgxeo2BlCAVOZb2jOGk0HO2qC c2qaaVGrd9OnuKx/0BpV0mccQQUL/yyYTrVT3jmZITLbSxutFHfIa/Gq8fVpZ72sjTTF 4aOA== X-Gm-Message-State: AOAM533D5n+XptjRlEsTmeJZ07P4RsEfGnKKJFi83m3C0yNX8dBIM6ya xtZ0ybRipdj9lLpEe0BKtuQbPHpJS9QEbw== X-Google-Smtp-Source: ABdhPJykaHj4WP+604ATg39BeeQv/AOzg2FemhKqkXxV3Wu7u0KhJIGjmM/P4Xkx1wRocrII4UXVtw== X-Received: by 2002:a63:65c5:: with SMTP id z188mr21187289pgb.332.1608189484289; Wed, 16 Dec 2020 23:18:04 -0800 (PST) Received: from localhost ([2620:15c:202:201:de4a:3eff:fe75:1314]) by smtp.gmail.com with ESMTPSA id n7sm4602508pfn.141.2020.12.16.23.18.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 16 Dec 2020 23:18:03 -0800 (PST) From: Miao-chen Chou To: Bluetooth Kernel Mailing List Cc: Alain Michaud , Archie Pusaka , Marcel Holtmann , Luiz Augusto von Dentz , Miao-chen Chou , Abhishek Pandit-Subedi , Johan Hedberg , Luiz Augusto von Dentz , linux-kernel@vger.kernel.org Subject: [PATCH v1 2/4] Bluetooth: btqca: Enable MSFT extension for Qualcomm WCN399x Date: Wed, 16 Dec 2020 23:17:29 -0800 Message-Id: <20201216231652.v1.2.I188d99e738b39d9ef36110addbc227837d3c42a7@changeid> X-Mailer: git-send-email 2.29.2.684.gfbc64c5ab5-goog In-Reply-To: <20201216231652.v1.1.Id9bc5434114de07512661f002cdc0ada8b3d6d02@changeid> References: <20201216231652.v1.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 --- 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 07:17:31 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: 345011 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 CE041C2BB48 for ; Thu, 17 Dec 2020 07:19:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 905D72360D for ; Thu, 17 Dec 2020 07:19:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727247AbgLQHTF (ORCPT ); Thu, 17 Dec 2020 02:19:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726470AbgLQHTF (ORCPT ); Thu, 17 Dec 2020 02:19:05 -0500 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 959D7C061248 for ; Wed, 16 Dec 2020 23:18:18 -0800 (PST) Received: by mail-pf1-x429.google.com with SMTP id q22so18448599pfk.12 for ; Wed, 16 Dec 2020 23:18:18 -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=7ROFwraclmZafOx9+Edkeznx8P384VynmuQCntAzvR8=; b=MyC9Vmv2wxTErdNuK46uB+6W+ZeVo7CEvAm4CwVHoHH6x/Qe6krRpXc5BwLHrwfy5s dqz3p5R0K8lWPFghYVZh8kljchH/xI8owsl/XOAqXzGWZZt8QqTi6lOnUujDFNWHp/MG dexyi7hbmLntzWFV7khcS9933ojZMNj1UgUxU= 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=7ROFwraclmZafOx9+Edkeznx8P384VynmuQCntAzvR8=; b=F7pzkgpbF0JEZQD7qc7khkkM9eNhhOQsM3M2RVAsSquBJTxob02xRnphUCa7DcSMYx sB/wOLBnrcf1N0C2LZd+lvIyQcFa6EhRKR41iz2uj9OJ99Lg4qHgNuHq5LUHNSoZhE8i vL+qrQU+JGsv4j9OqwOwIZ+mCKLczMoMTQBukAoJXSG8FbyNM2lGayQ+wzUoTTkA3sDB 3K+5w+0LRMX4luBRRfIOcvVEPABUxFqV6M1y2Y+dQxau3WnOnvQtwGRZNzAYPn7WLEZ1 dEiW1blmn8qNYoKB4dkm1e70upRwA81r74MyiSM+YhBDe8sZxTjnL0Xh/Rps9YDy8gUx TPZw== X-Gm-Message-State: AOAM53272k04u210cuDwmRInRV6PqMx4lUYI1W+/ETX/xOxu+wcigR0a UNVxcMdjpGBW14hqSPB8jPK1vQrePgfARA== X-Google-Smtp-Source: ABdhPJyTjk/xJ2oFRvRDO7TmL23v4R2kPT5mfGpPjmsduIU3UXGQFAsrW08FGb/A5mFBqOJB4ekjQA== X-Received: by 2002:a63:f702:: with SMTP id x2mr35802021pgh.414.1608189497840; Wed, 16 Dec 2020 23:18:17 -0800 (PST) Received: from localhost ([2620:15c:202:201:de4a:3eff:fe75:1314]) by smtp.gmail.com with ESMTPSA id a31sm4956916pgb.93.2020.12.16.23.18.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 16 Dec 2020 23:18:17 -0800 (PST) From: Miao-chen Chou To: Bluetooth Kernel Mailing List Cc: Alain Michaud , Archie Pusaka , Marcel Holtmann , Luiz Augusto von Dentz , Miao-chen Chou , Abhishek Pandit-Subedi , Johan Hedberg , Luiz Augusto von Dentz , linux-kernel@vger.kernel.org Subject: [PATCH v1 3/4] Bluetooth: btusb: Enable MSFT extension for Intel controllers Date: Wed, 16 Dec 2020 23:17:31 -0800 Message-Id: <20201216231652.v1.3.I84d6a963dbe3a014e8456943785b076344f659bf@changeid> X-Mailer: git-send-email 2.29.2.684.gfbc64c5ab5-goog In-Reply-To: <20201216231652.v1.1.Id9bc5434114de07512661f002cdc0ada8b3d6d02@changeid> References: <20201216231652.v1.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 --- 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 07:17:33 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: 345526 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=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 0FFDDC2BB9A for ; Thu, 17 Dec 2020 07:19:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C73FA23715 for ; Thu, 17 Dec 2020 07:19:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727315AbgLQHTU (ORCPT ); Thu, 17 Dec 2020 02:19:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727278AbgLQHTQ (ORCPT ); Thu, 17 Dec 2020 02:19:16 -0500 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2220C0617A7 for ; Wed, 16 Dec 2020 23:18:36 -0800 (PST) Received: by mail-pl1-x62a.google.com with SMTP id be12so1595656plb.4 for ; Wed, 16 Dec 2020 23:18:36 -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=6D4li/EoV9+RBhAhlhd47010lIB1udrd5aMVBy+LBG0=; b=LQKMSNnkir22KpN1Z0gP+35Flb1r2VQnAy78yipBX7LE/zlA1cl3HahIPeD6SyNV+h XAPSmIFx/4SkHjBFvjk80ViJf080m1PYDShks/JjkLMyKWeCX65fbIlQOa/Q0jwNxkSA uh0OpWOF8LaUh7W9uTAWqq7F5WKWhcPVbFrCs= 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=6D4li/EoV9+RBhAhlhd47010lIB1udrd5aMVBy+LBG0=; b=U5FhxlNQSnojPrSwFcBcXsdfuEXeupVNf3KDkfjWRNarCPgOSnSvrec+SQlpKWzRls 8fLuGYqx0KJHZRsyUzD5EBAVVaiB4DZ/f89y9Hp40TqpOH38jQSq8HKD5FrllwqnSNvt bJ3pdtCE2P0yidSfmvu6i5ZpGTH4s7KO0WNwvNpTpxZpAq9iEK5j3kLZgSMHdH6S9epi 9vYDldbPz2N1RVLC2Zfyc6zIkkYHNTwl0HhW/O5MvC7drybouhUB0vgwfmz5qNfZ3DNY 0dlTU103rRlQYdyg9Iwxq+FXE118U0z8MyL+q15N+IlnTfubNfK6RTT9zqdto4bm1H5Y 73OA== X-Gm-Message-State: AOAM533R5Vyyv6N0gWg3cebn1z84dAdxbXRIesbqerk4V5X+KZjKLApX faLFtzV/z9ZzZ0vC/2yWBvcTJceCrl60rg== X-Google-Smtp-Source: ABdhPJx4FdO8HNL2nqQo6pdpiTMfzYzzioJPDCoFKkhK9Zu46xCKhqMAe4FYENnsa2pIlHgFIX1S/w== X-Received: by 2002:a17:902:302:b029:db:fa52:2dd2 with SMTP id 2-20020a1709020302b02900dbfa522dd2mr18603623pld.62.1608189515924; Wed, 16 Dec 2020 23:18:35 -0800 (PST) Received: from localhost ([2620:15c:202:201:de4a:3eff:fe75:1314]) by smtp.gmail.com with ESMTPSA id na6sm3555779pjb.12.2020.12.16.23.18.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 16 Dec 2020 23:18:35 -0800 (PST) From: Miao-chen Chou To: Bluetooth Kernel Mailing List Cc: Alain Michaud , Archie Pusaka , Marcel Holtmann , Luiz Augusto von Dentz , Miao-chen Chou , Abhishek Pandit-Subedi , Johan Hedberg , Luiz Augusto von Dentz , linux-kernel@vger.kernel.org Subject: [PATCH v1 4/4] Bluetooth: btrtl: Enable MSFT extension for RTL8822CE controller Date: Wed, 16 Dec 2020 23:17:33 -0800 Message-Id: <20201216231652.v1.4.I369d2fc751e660f78e2930743aa368e0fe1bfd53@changeid> X-Mailer: git-send-email 2.29.2.684.gfbc64c5ab5-goog In-Reply-To: <20201216231652.v1.1.Id9bc5434114de07512661f002cdc0ada8b3d6d02@changeid> References: <20201216231652.v1.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 --- 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: