Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3173549ybb; Mon, 30 Mar 2020 23:05:55 -0700 (PDT) X-Google-Smtp-Source: ADFU+vviOZbROv15paHWlOlZi5vbX+Mtd9i2dVoQv21fZ1txv3+EReauvXvSzUUHKXpbzgKCnsd7 X-Received: by 2002:a9d:d0a:: with SMTP id 10mr10324500oti.357.1585634755453; Mon, 30 Mar 2020 23:05:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585634755; cv=none; d=google.com; s=arc-20160816; b=Z6Go2k1qfqar5epnUz1KMpo6wLGoKTv+cDTmFFjsJrFjIP4a74KXYUjkyCIDU1KNzO qBJaAB5+Ul+oJKsuYKGnpyQOfwRoZoABbWXuFX6PQP6yWiomr98hrGNtcJQwyKVZbQU5 ayiteZThhYZyiCU1RCaoZQ0iBv3U4nxOU26WD3EuSI0SCC4C/z/oZ0OZBNtLmGYK4sa4 /PH2arbKUdGq0W4fV2aTOiIrRvqMXOA7Fn/HQp2IaSrNUEXyfCrfHtJvlobp5d+Z7yhf 6sCB7IlQR2EBPwpM98/ojbLmUJx6m2OG5bnzyIvp7ZctKI2ygbDDqu+WqJADbLB+3wRI EXaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=6Dhqu8Yjs5nSutWD3qmpNeh6kaYruGOpgQKGjghjpZA=; b=FEBdz8NtsWq4ON1gTKmteeVQsl/XMOD1wA9AV1tVuc1wk2mzF11Kb8OpIvySKhuvH3 A4Z8r6XXbtLvjt4BhaTb4oY5JTqzdNoraYqCKBb8cyXPQjGwRQNRPAv4M9S5gwfS45ah PK5E/Xibu8B5RqbDpgzmpaHUIbIcvzZqF02nrjMuOcwtZmz4lrkRSlJJBkO1TTnJDRgy pdfGtUL6EusqR0j14mSArGeq/VN73hPeDma6OTU+2JT2RyjQq0d2+UJZefirb/g0UXpK t2mXz3w1h3Swt1o9O8bmG9aBy12JErY/OphEBnOkIT3IL1Z8jQMiGt6qTLwcIdoUc5tt H3mQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f21si6849192oou.47.2020.03.30.23.05.26; Mon, 30 Mar 2020 23:05:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726236AbgCaGFU convert rfc822-to-8bit (ORCPT + 99 others); Tue, 31 Mar 2020 02:05:20 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:43900 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725809AbgCaGFU (ORCPT ); Tue, 31 Mar 2020 02:05:20 -0400 Received: from marcel-macpro.fritz.box (p4FEFC5A7.dip0.t-ipconnect.de [79.239.197.167]) by mail.holtmann.org (Postfix) with ESMTPSA id 62C91CECC4; Tue, 31 Mar 2020 08:14:51 +0200 (CEST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: [PATCH v4 1/2] Bluetooth: btusb: Indicate Microsoft vendor extension for Intel 9460/9560 and 9160/9260 From: Marcel Holtmann In-Reply-To: Date: Tue, 31 Mar 2020 08:05:18 +0200 Cc: Bluetooth Kernel Mailing List , Alain Michaud , Luiz Augusto von Dentz , "David S. Miller" , Jakub Kicinski , Johan Hedberg , LKML , netdev Content-Transfer-Encoding: 8BIT Message-Id: <852FDEFC-7AD1-4CB9-9C45-BBAB5B2A8D14@holtmann.org> References: <20200328074632.21907-1-mcchou@chromium.org> <20200328004507.v4.1.I0e975833a6789e8acc74be7756cd54afde6ba98c@changeid> <9CC14296-9A0E-4257-A388-B2F7C155CCE5@holtmann.org> To: Miao-chen Chou X-Mailer: Apple Mail (2.3608.80.23.2.2) Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Miao-chen, >>> This adds a bit mask of driver_info for Microsoft vendor extension and >>> indicates the support for Intel 9460/9560 and 9160/9260. See >>> https://docs.microsoft.com/en-us/windows-hardware/drivers/bluetooth/ >>> microsoft-defined-bluetooth-hci-commands-and-events for more information >>> about the extension. This also add a kernel config, BT_MSFTEXT, and a >>> source file to facilitate Microsoft vendor extension functions. >>> This was verified with Intel ThunderPeak BT controller >>> where msft_vnd_ext_opcode is 0xFC1E. >>> >>> Signed-off-by: Marcel Holtmann >>> >>> Signed-off-by: Miao-chen Chou >>> --- >>> >>> Changes in v4: >>> - Introduce CONFIG_BT_MSFTEXT as a starting point of providing a >>> framework to use Microsoft extension >>> - Create include/net/bluetooth/msft.h and net/bluetooth/msft.c to >>> facilitate functions of Microsoft extension. >>> >>> Changes in v3: >>> - Create net/bluetooth/msft.c with struct msft_vnd_ext defined internally >>> and change the hdev->msft_ext field to void*. >>> - Define and expose msft_vnd_ext_set_opcode() for btusb use. >>> - Init hdev->msft_ext in hci_alloc_dev() and deinit it in hci_free_dev(). >>> >>> Changes in v2: >>> - Define struct msft_vnd_ext and add a field of this type to struct >>> hci_dev to facilitate the support of Microsoft vendor extension. >>> >>> drivers/bluetooth/btusb.c | 11 +++++++++-- >>> include/net/bluetooth/hci_core.h | 4 ++++ >> >> so I don’t like the intermixing of core features and drivers unless it is needed. In this case it is not needed since we can first introduce the core support and then enable the driver to use it. > I will make btusb changes as a different commit in v5. check the series that I posted. I tested them on ThunderPeak and if it also works, we use that as a base and then go from there. >> >>> net/bluetooth/Kconfig | 9 ++++++++- >>> net/bluetooth/Makefile | 1 + >>> net/bluetooth/msft.c | 16 ++++++++++++++++ >>> net/bluetooth/msft.h | 19 +++++++++++++++++++ >>> 6 files changed, 57 insertions(+), 3 deletions(-) >>> create mode 100644 net/bluetooth/msft.c >>> create mode 100644 net/bluetooth/msft.h >>> >>> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c >>> index 3bdec42c9612..0fe47708d3c8 100644 >>> --- a/drivers/bluetooth/btusb.c >>> +++ b/drivers/bluetooth/btusb.c >>> @@ -21,6 +21,7 @@ >>> #include >>> #include >>> >>> +#include "../../net/bluetooth/msft.h" >> >> This was my bad. I didn’t realized that drivers need to the set the opcode and not the core. I updated the patches to fix this. > I will move it to include/net/bluetooth/. I put it in hci_core.h since don’t want to add any extra needed include for driver. They are big enough already and adding more files doesn’t really help. Regards Marcel