Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp368923ybb; Sat, 28 Mar 2020 00:47:13 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvzIo45DgwNEL8hJmfvDY4lHse77z8F1DiF3KrU5ba4qTinreWc5J1fkFgD3orSQStQcLet X-Received: by 2002:a05:6830:2246:: with SMTP id t6mr1858347otd.163.1585381633263; Sat, 28 Mar 2020 00:47:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585381633; cv=none; d=google.com; s=arc-20160816; b=oN840Iw+PHDZggrQYt4ZTqXbTL9Gu9r5yr0N+lgAAd3zdHo2YmF8T92IJSYx2LR/YA Sl6cs8I/Y1yZZwlRXnJoSp1NXfWh5aomrKtejRcpS4InomBGHCELqSwNvmpQV6+SIx9c qYe+Z6OSnZyIzdoVwwrqEs1kBUOdJ5BSBBRL1ZgTTc46rJ9tyG0Fu6QStMNIJ822kKTr EF+A0gTwZa3fXIbel73xQ/pM8QpuA4OKWBe6UZgz8dvBzlwo8iWze+io5TmnMu/wcbsS SkBPSCB/Uk+EFv9VBakmJEH0hp7IzSVLThk/jWH51WZ9MbjXyr+Rkj4ycU/8msDmoGl+ 15dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=qsG3mjoVQ6835V+LXB4rVT3ot36vnEeHGFhncinMhdA=; b=KIdQfPFBjFPb7mfCiJPVsWNaCJtLHIxzC5AqDhSwd/lnTYctK86GwXu8GsCLdjn6xr +VtN7Ruh6KvFcM2aNHhWOfwG11n91nvqaY2+ie5l4OcWiuFmTPb/L52eav5IsSpB4qw3 77VzxLs41LGfYyiLj0nySr12ePH0NXGRm3Yfm1qGnkPhS4xu5NLUUi7er4EG49VE6xOH 0K90jpgzdIMOXj5uSDViexA823lWNdsTPS+hnUY8abvoA4joj3KPk1c3F0Bhkpa2nz9s FqU5VGA2raP33DYZU/Q+0SWi2ScS00dOdEBreu4S5BQMF2A7cBu5NPHmH4FYBe249A8P BraA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=VjQ0CshL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l7si3477812otj.49.2020.03.28.00.46.59; Sat, 28 Mar 2020 00:47:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=VjQ0CshL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726224AbgC1Hqm (ORCPT + 99 others); Sat, 28 Mar 2020 03:46:42 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:37014 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725800AbgC1Hqm (ORCPT ); Sat, 28 Mar 2020 03:46:42 -0400 Received: by mail-pg1-f196.google.com with SMTP id a32so5831561pga.4 for ; Sat, 28 Mar 2020 00:46:41 -0700 (PDT) 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=qsG3mjoVQ6835V+LXB4rVT3ot36vnEeHGFhncinMhdA=; b=VjQ0CshLJQbW1OwcdZX1NZjvxFeSQzXrsvpZQFFM1VP2dKDuGT+DzfnfXO6u4TBurn KaIP/vnOgPQiFZTXXXA5ILxpLx/dzbLpUuJggfqUMrJBv7YlQnSbilQutT9tkPde73qJ zt+1ax0md7zdT5GoXQWDPU0bpriRHY6/NCZL8= 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=qsG3mjoVQ6835V+LXB4rVT3ot36vnEeHGFhncinMhdA=; b=NK/ZNSqaanIQDBzqIGjMTrhwRD/bHGWPKwYEPmu+Mc1lO1H1Dhc6Q5wq4iNlwt5aPH mlSb+FmYPjYhEXvrbCnrV3+iNWJaylkNs9CsB+g+qgeg8lBcw+kx+VBayzeRPWCg/9Nk pBFYu5n7CpvrX4cJVl+DOHrFvmFXh3rsdY1o1H0k+7Li7Fed5w50pcAKU+6XYQWzfvaN FJqqny7YajwPhVxrhWP4pPpmUfMgFcZ2qy+ayLH0T+AFABNV518ePN1yuDaBzE8TjqgV E6CXFzkLjpzLhe4HqV9nPGkyoYnm5xK3LkeVXbuyMp9f2FpczGZmwfVG6S7jAqGOQT/n ViYA== X-Gm-Message-State: ANhLgQ1ncpId0RdpHmkxC585sw5ftP1qESTbO8OuJ+lkU8kGYL1jl3Yr jkv1Jf9L7QQVOwGxbU9oeIdt7A== X-Received: by 2002:a63:7451:: with SMTP id e17mr3165418pgn.234.1585381600923; Sat, 28 Mar 2020 00:46:40 -0700 (PDT) Received: from mcchou0.mtv.corp.google.com ([2620:15c:202:201:b46:ac84:1014:9555]) by smtp.gmail.com with ESMTPSA id r59sm5273063pjb.45.2020.03.28.00.46.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Mar 2020 00:46:39 -0700 (PDT) From: Miao-chen Chou To: Bluetooth Kernel Mailing List Cc: Alain Michaud , Marcel Holtmann , Luiz Augusto von Dentz , Miao-chen Chou , "David S. Miller" , Jakub Kicinski , Johan Hedberg , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v4 0/2] btusb: Introduce the use of vendor extension(s) Date: Sat, 28 Mar 2020 00:46:30 -0700 Message-Id: <20200328074632.21907-1-mcchou@chromium.org> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marcel and Luiz, The standard HCI does not provide commands/events regarding to advertisement monitoring with content filter while there are few vendors providing this feature. Chrome OS BT would like to introduce the use of vendor specific features where Microsoft vendor extension is targeted at this moment. Chrome OS BT would like to utilize Microsoft vendor extension's advertisement monitoring feature which is not yet a part of standard Bluetooth specification. This series introduces the driver information for Microsoft vendor extension, and this was verified with kernel 4.4 on Atlas Chromebook. Thanks Miao 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. - Move MSFT's do_open() and do_close() from net/bluetooth/hci_core.c to net/bluetooth/msft.c. - Other than msft opcode, define struct msft_data to host the rest of information of Microsoft extension and leave a void* pointing to a msft_data in struct hci_dev. 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(). - Introduce msft_vnd_ext_do_open() and msft_vnd_ext_do_close(). 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. - Issue a HCI_VS_MSFT_Read_Supported_Features command with __hci_cmd_sync() instead of constructing a request. Miao-chen Chou (2): Bluetooth: btusb: Indicate Microsoft vendor extension for Intel 9460/9560 and 9160/9260 Bluetooth: btusb: Read the supported features of Microsoft vendor extension drivers/bluetooth/btusb.c | 11 ++- include/net/bluetooth/hci_core.h | 5 ++ net/bluetooth/Kconfig | 9 +- net/bluetooth/Makefile | 1 + net/bluetooth/hci_core.c | 5 ++ net/bluetooth/hci_event.c | 5 ++ net/bluetooth/msft.c | 142 +++++++++++++++++++++++++++++++ net/bluetooth/msft.h | 29 +++++++ 8 files changed, 204 insertions(+), 3 deletions(-) create mode 100644 net/bluetooth/msft.c create mode 100644 net/bluetooth/msft.h -- 2.24.1