Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4559432pxb; Tue, 2 Nov 2021 11:42:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydMkk78phUAYH2bSKD331N2ysr4JEL8vVwLZs3cqGLj0EwkVkT0RIgjpnXfSRKwdeH7WeX X-Received: by 2002:a05:6402:2815:: with SMTP id h21mr54035615ede.45.1635878551105; Tue, 02 Nov 2021 11:42:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635878551; cv=none; d=google.com; s=arc-20160816; b=s+ZLGC9WB8BlaEkcLd2H623CarZZMOsnWWVbqo4tn1j4K4kDtdtSse/N4KZtRqqSpg KssOlcNIwFdEBvvUuiOMzkwvHflZO4hn3e16BkIuisvlJBvyPY4eDLECKelyKTBiWYhn cUMM3MhkCNvuCrNDpdtr2jUALe/tptwQrsb3uRmXWj1bMi75ZOdUxW6nYaFJCqF/7Xv6 65mMcXdTsq5KeckOQpWY6L8MLtR8CBFmk53k9bcOulDKdJhpT6+yaDB6+EnPz4O3hFif yEOGUsJ0k7EcoR80XRcLdXY3fVOnF8aJRxnCmDVHqvDf3ElnqEsxRThUnFC3sqdMizQ7 bsqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=poysnJM5+TGnXK9vYqwlBkgv8JSPfX5O7n3QfdT247E=; b=o8VIDY7IZJu1EpGOt6f9smd4PHqpY7XRWXNyCjynno0xFNvphpzY0ad7NJ0WQFkEi7 7uQ0ClPHVx+CuWj88Mx24f0OALM0qaLk7Nu54yEaZBIvQPzxKyTFJgbnQHelgf1PPvDT kLK7oV22YiPIbLwVxLxdOdglIw+RlyQ6sz0fNbS52XF2HLtHrl6DGrIt8KmchLDD7lPP 3a/rBnu0IYByVT/H7EHXYVtrqr3iQ2muaTxGD4YXYH1Em1uuBl810Bx7QbF1pPsfSzXJ 5tBr6vGW+TBUibJ/sKE/+qVUCNrAV6lW1+acTdr72C8n4ycGZ4/AhxExgb96Ux/uFQ5s Mk+g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qf7si11948194ejc.581.2021.11.02.11.41.59; Tue, 02 Nov 2021 11:42:31 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235471AbhKBSn6 (ORCPT + 99 others); Tue, 2 Nov 2021 14:43:58 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:40067 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230131AbhKBSnz (ORCPT ); Tue, 2 Nov 2021 14:43:55 -0400 Received: from smtpclient.apple (p4fefc15c.dip0.t-ipconnect.de [79.239.193.92]) by mail.holtmann.org (Postfix) with ESMTPSA id 330B7CECF7; Tue, 2 Nov 2021 19:41:19 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.20.0.1.32\)) Subject: Re: [PATCH v7 1/2] Bluetooth: Add struct of reading AOSP vendor capabilities From: Marcel Holtmann In-Reply-To: <20211102151908.v7.1.I139e71adfd3f00b88fe9edb63d013f9cd3e24506@changeid> Date: Tue, 2 Nov 2021 19:41:18 +0100 Cc: linux-bluetooth , Luiz Augusto von Dentz , =?utf-8?Q?Pali_Roh=C3=A1r?= , CrosBT Upstreaming , Joseph Hwang , "David S. Miller" , Jakub Kicinski , Johan Hedberg , Linux Kernel Mailing List , netdev@vger.kernel.org Content-Transfer-Encoding: 7bit Message-Id: <32223CC8-EAC3-42F3-8C34-F60A2B62F9DD@holtmann.org> References: <20211102151908.v7.1.I139e71adfd3f00b88fe9edb63d013f9cd3e24506@changeid> To: Joseph Hwang X-Mailer: Apple Mail (2.3693.20.0.1.32) Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Joseph, > This patch adds the struct of reading AOSP vendor capabilities. > New capabilities are added incrementally. Note that the > version_supported octets will be used to determine whether a > capability has been defined for the version. > > Signed-off-by: Joseph Hwang > > --- > > Changes in v7: > - Use the full struct aosp_rp_le_get_vendor_capa. If the > version_supported is >= 98, check bluetooth_quality_report_support. > - Use __le16 and __le32. > - Use proper bt_dev_err and bt_dev_warn per review comments. > - Skip unnecessary bt_dev_dbg. > - Remove unnecessary rp->status check. > - Skip unnecessary check about version_supported on versions that we > do not care about. For now, we only care about quality report support. > - Add the define for the length of the struct. > - Mediatek will submit a separate patch to enable aosp. > > Changes in v6: > - Add historical versions of struct aosp_rp_le_get_vendor_capabilities. > - Perform the basic check about the struct length. > - Through the version, bluetooth_quality_report_support can be checked. > > Changes in v5: > - This is a new patch. > - Add struct aosp_rp_le_get_vendor_capabilities so that next patch > can determine whether a particular capability is supported or not. > > include/net/bluetooth/hci_core.h | 1 + > net/bluetooth/aosp.c | 83 +++++++++++++++++++++++++++++++- > 2 files changed, 83 insertions(+), 1 deletion(-) patch has been applied to bluetooth-next tree. Regards Marcel