Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2940822pxb; Sun, 26 Sep 2021 00:10:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxc05QtNhNo4YpnKmSSlMHh9A5syVU8c7mbr2Qvs5sQQH1hH+jNy/4FBZy9r0INShM9n7jw X-Received: by 2002:a05:6638:3713:: with SMTP id k19mr4264271jav.44.1632640220653; Sun, 26 Sep 2021 00:10:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632640220; cv=none; d=google.com; s=arc-20160816; b=nSZGk5PW/9fx7792rNAGB7BPpf0Mqo7DWxR4tptiIYPwhvH+P/uhIECpTDb7bMOSvs yQU90MxJmMbPkqee+CET6p0kEAnOeQ78LJa+3m+3BwzM/OWLMkbcmnCjtDhJo3xBgvvM 3m4R7ZuPYbC4xz5469pz4itSajaPBChhcbVy5vHsKhixej/SoGlVM0rtkzIX7uKuB4vS kJYeFrpjfwBx8IV124xjR5hCk2jyzvAHndtc+9oC88MA2TxJeOaVqKBMGiEUOWcCTaed qUNOUrAQTqEW7C6yGwqqoGgp/wvklJgmfmd9SSm/npeCBEaP/QTRVtydLPLQ641tgow4 uR1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gcIEd4ZvWF+aMbmrEEJnlNTin4YD1gvu+ViZoUNmNvo=; b=aMt85H+OgmblZzbwthZIXzKMmiISa2JgtwLQEhYsekyfl9PrQMqnVnf9Ue+dBQfm8J yzPciP4gYpM1GmBDWd3kN2XuqcgoicaEuLl5HAfTjJLm6d+d60PJwLKh8PvMiRcrJ5kZ yr5p0mAJALXQ1SI+lhjGIgOI6XnHF5MnbjmbZsYTVoxgF+lvwI5+vmAO++EMo3wNmfk1 GfGwBWO+20S7qCFM+jPDquas5mizKW1vpme/sVqEdVYUAT5Z61QmhAFQk5xLoOokGa7S RUteb+QO6jYCj5x7VoAGOgy6kuDHQ8onZJ+5zpnSFfD7bT3hn7S/us2RXjXdzrkqWrv/ neXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=jJAV9mLy; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-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. [23.128.96.18]) by mx.google.com with ESMTP id y203si23120170iof.46.2021.09.26.00.10.09; Sun, 26 Sep 2021 00:10:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=jJAV9mLy; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-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 S231208AbhIZHJl (ORCPT + 99 others); Sun, 26 Sep 2021 03:09:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231215AbhIZHJk (ORCPT ); Sun, 26 Sep 2021 03:09:40 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53611C061714 for ; Sun, 26 Sep 2021 00:08:04 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id r7so9486015pjo.3 for ; Sun, 26 Sep 2021 00:08:04 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=gcIEd4ZvWF+aMbmrEEJnlNTin4YD1gvu+ViZoUNmNvo=; b=jJAV9mLyVsaIXtIiQW1QM4n5E6tb/RywIYfDaKvTYWIViLwMH+ctv9FfDe9PCJqUJn LNQaLlGohM+VgiSQO5SPCAhOuIQZs3uFJk/lHmn+o2lwVMR+x77VttLZps7YvMMviJss f+gtZoMb5jcbtBBvxtOsjGVEXSywDeiC7Uv3I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gcIEd4ZvWF+aMbmrEEJnlNTin4YD1gvu+ViZoUNmNvo=; b=GVi/iUrWQnRYC5jGBeEgUNs4xBqQJh/Zjn+gr/LhCmycgIVce/Jtsg9OFkWHDfP+A7 RRaF2uOKJYm3DmDOuqrGqKO94RBsiwxfcEG/H9GSLIMsd+05YYjMuqAgcfBPwEy2lumQ kIU9VTTn10bqV2gz2m8co8yvBZz0FkbjZBUAp6tQEO99OR3eJcNPDSzXPpLf0OXhyBbH WLLWxViDwi+ehdPaCRxpE7ZrOf+TiNGgiQsT3XcjhARJZ1cCE7AcZZ7kz2hkefTZUDH/ HjJNgpwflwU/8orC9F8CNas+mD5bHv9DfWmekEQnT6WvJMmj9rCohAomnL8O6vrA1jJd a/3A== X-Gm-Message-State: AOAM530OaErC+9m1AeCqeQEZRn3d6AfKhIysaiRpv0kAFkKFsNBERwqg ZwWaQG6dLGT4yj4S2y6yjm9f+Nqb2O+5hA== X-Received: by 2002:a17:90a:680c:: with SMTP id p12mr12119779pjj.33.1632640083723; Sun, 26 Sep 2021 00:08:03 -0700 (PDT) Received: from josephsih-z840.tpe.corp.google.com ([2401:fa00:1:10:8152:3867:7050:3260]) by smtp.gmail.com with ESMTPSA id o17sm13796174pfp.126.2021.09.26.00.08.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Sep 2021 00:08:03 -0700 (PDT) From: Joseph Hwang To: linux-bluetooth@vger.kernel.org, marcel@holtmann.org, luiz.dentz@gmail.com, pali@kernel.org Cc: josephsih@google.com, chromeos-bluetooth-upstreaming@chromium.org, Joseph Hwang , Miao-chen Chou , Johan Hedberg , linux-kernel@vger.kernel.org Subject: [PATCH v4 4/4] Bluetooth: btusb: enable Mediatek MT7921 to support AOSP extension Date: Sun, 26 Sep 2021 15:07:49 +0800 Message-Id: <20210926150657.v4.4.I257ac5cfaf955d15670479efc311bbab702397f4@changeid> X-Mailer: git-send-email 2.33.0.685.g46640cef36-goog In-Reply-To: <20210926150657.v4.1.Iaa4a0269e51d8e8d8784a6ac8e05899b49a1377d@changeid> References: <20210926150657.v4.1.Iaa4a0269e51d8e8d8784a6ac8e05899b49a1377d@changeid> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This patch enables Mediatek MT7921 to support the AOSP extension. Reviewed-by: Miao-chen Chou Signed-off-by: Joseph Hwang --- Changes in v4: - Call hci_set_aosp_capable in the driver. - This patch is added in this Series-changes 4. drivers/bluetooth/btusb.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index da85cc14f931..de0228e2245b 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -60,6 +60,7 @@ static struct usb_driver btusb_driver; #define BTUSB_VALID_LE_STATES 0x800000 #define BTUSB_QCA_WCN6855 0x1000000 #define BTUSB_INTEL_BROKEN_INITIAL_NCMD 0x4000000 +#define BTUSB_AOSP 0x8000000 static const struct usb_device_id btusb_table[] = { /* Generic Bluetooth USB device */ @@ -394,6 +395,7 @@ static const struct usb_device_id blacklist_table[] = { /* MediaTek Bluetooth devices */ { USB_VENDOR_AND_INTERFACE_INFO(0x0e8d, 0xe0, 0x01, 0x01), .driver_info = BTUSB_MEDIATEK | + BTUSB_AOSP | BTUSB_WIDEBAND_SPEECH | BTUSB_VALID_LE_STATES }, @@ -407,6 +409,7 @@ static const struct usb_device_id blacklist_table[] = { /* Additional MediaTek MT7921 Bluetooth devices */ { USB_DEVICE(0x04ca, 0x3802), .driver_info = BTUSB_MEDIATEK | + BTUSB_AOSP | BTUSB_WIDEBAND_SPEECH | BTUSB_VALID_LE_STATES }, { USB_DEVICE(0x13d3, 0x3563), .driver_info = BTUSB_MEDIATEK | @@ -3867,6 +3870,9 @@ static int btusb_probe(struct usb_interface *intf, hdev->set_bdaddr = btusb_set_bdaddr_mtk; set_bit(HCI_QUIRK_NON_PERSISTENT_SETUP, &hdev->quirks); data->recv_acl = btusb_recv_acl_mtk; + + if (id->driver_info & BTUSB_AOSP) + hci_set_aosp_capable(hdev); } if (id->driver_info & BTUSB_SWAVE) { -- 2.33.0.685.g46640cef36-goog