Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp317184pxj; Thu, 3 Jun 2021 07:27:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgU4uV8rXonQZ7Eb1MORQxnmiC9YVS7cu+7d1oWlZ3JsD3Fj4glPzS+nGqlWYm8xrqrk/S X-Received: by 2002:a17:906:19d0:: with SMTP id h16mr15206864ejd.193.1622730433122; Thu, 03 Jun 2021 07:27:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622730433; cv=none; d=google.com; s=arc-20160816; b=HB1QU0IHF8lfSAeir/xlSTxEan6JQM0MDoQ2Sx7xxqKFdsZ0pY5OrD4DrIRL5NNoJL 9mVAdHGlaPR2tDCnL9Vr4HhYZu3iHIGV5a04lwZT5JnaJsClRo20qdJNAhBgsXD1RTJt g+7j/28LMC9bUBotXr6lPNNQmObBaxlf/WvpAJAkd3odHYXl98x5jvB1dMXds+Ex3TRZ 9xFc8YF+FADEA84oVl2wEx4Ob072DNXYjGtayqItr24jywugVC3kEsHdEoAQkC/99EsP UJZJNkNNjdZViWlxKfcADNyH4VvbbTqtdrcICK5lJnaHKFQk/amPiQZTDMD7JfaUs7cc ahsw== 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=WcGEQEYSTAfPWbORVFF42NjZx666aCEKrUj87GEsbZc=; b=XidEzJcqC6NxYe2qaDrzzdaqnRJ6g11VW+qtp7GcbH0t2DqqxlJ3hoS53fPQaCSyJU Vk6+sGgQqGRJtlVauBJy+AELkd33F5YVBnvS5NHHBP8BiNvjgn1BACw+ZOX4Bu3XCEQ1 tfwjzyvGranPdElsaXyxm96Rg7yZa+JHoBJUVaSXSVCul1UJGNnAeS1Cf+OrOpIfI7uN 9ANIYIWEAdp2ubIVUnc4bMITx8dcJjr1Qs26i/0w421H1byETOtuMHo3NIOajkSNEPKf 5qexCfBDtD3HjNH2828qBUc0XeKuCiuXH+miQlboU+je/qv2aD53D7fdwhJzlGi6DoSy 1X7A== 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 w10si2197265edd.545.2021.06.03.07.26.49; Thu, 03 Jun 2021 07:27:13 -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 S231675AbhFCOZX convert rfc822-to-8bit (ORCPT + 99 others); Thu, 3 Jun 2021 10:25:23 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:50399 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230044AbhFCOZX (ORCPT ); Thu, 3 Jun 2021 10:25:23 -0400 Received: from smtpclient.apple (p4fefc9d6.dip0.t-ipconnect.de [79.239.201.214]) by mail.holtmann.org (Postfix) with ESMTPSA id 4C1A6CED1F; Thu, 3 Jun 2021 16:31:35 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.100.0.2.22\)) Subject: Re: [PATCH v8 1/9] Bluetooth: enumerate local supported codec and cache details From: Marcel Holtmann In-Reply-To: <20210518104232.5431-1-kiran.k@intel.com> Date: Thu, 3 Jun 2021 16:23:37 +0200 Cc: linux-bluetooth@vger.kernel.org, ravishankar.srivatsa@intel.com, chethan.tumkur.narayan@intel.com Content-Transfer-Encoding: 8BIT Message-Id: <23D52481-5703-48EC-93DC-1674C0B3CBB8@holtmann.org> References: <20210518104232.5431-1-kiran.k@intel.com> To: Kiran K X-Mailer: Apple Mail (2.3654.100.0.2.22) Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Kiran, > Move reading of supported local codecs into a separate init function, > query codecs capabilities and cache the data > > Signed-off-by: Kiran K > Signed-off-by: Chethan T N > Signed-off-by: Srivatsa Ravishankar > Reported-by: kernel test robot > --- > * changes in v8: > - add comments > - split __u8 codec_id[5] into {__u8 id; __le16 cid, vid } > - address review comment related codec caps structure > > * changes in v7: > - keep codec enumeration call in hci_init instead of having a separate > function > - Remove unused bitmasks defined for LE transports > > * changes in v6: > - fix compiler warning reported for ARCH=arc > > * changes in v5: > - fix review comments > - move code used to read standard/vendor codecs caps into single function > > * changes in v4: > - convert reading of codecs and codecs caps calls from async to sync > > * changes in v3 > move codec enumeration into a new init function > > * changes in v2 > add skb length check before accessing data > > include/net/bluetooth/hci.h | 41 +++++++ > include/net/bluetooth/hci_core.h | 17 +++ > net/bluetooth/hci_core.c | 199 ++++++++++++++++++++++++++++++- > 3 files changed, 253 insertions(+), 4 deletions(-) > > diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h > index c4b0650fb9ae..6cb9340a2d51 100644 > --- a/include/net/bluetooth/hci.h > +++ b/include/net/bluetooth/hci.h > @@ -1307,6 +1307,28 @@ struct hci_rp_read_data_block_size { > } __packed; > > #define HCI_OP_READ_LOCAL_CODECS 0x100b > +struct hci_std_codecs { > + __u8 num; > + __u8 codec[]; > +} __packed; > + > +struct hci_ven_codec { > + /* company id */ > + __le16 cid; > + /* vendor codec id */ > + __le16 vid; > +} __packed; I am pretty sure that I said to use vnd and not ven. The shortcut ven for vendor is not something we used at all. Regards Marcel