Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp396897pxk; Wed, 9 Sep 2020 08:11:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1YcsO5S4VE0vfiCNMSG+E4/liHzAZmWxBf9IYhZEglIoxPEtWdb3GkD6ZKuOApzGes8EJ X-Received: by 2002:a50:fc83:: with SMTP id f3mr4767381edq.102.1599664281303; Wed, 09 Sep 2020 08:11:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599664281; cv=none; d=google.com; s=arc-20160816; b=k4LAbpjRXnHGH6PKqYp0xODonrE+132FA9F7tigxcnALXJuOkREnDjGjLcbVJTgYU0 yblnzSzwuV8pEg4JJYYUSNC28pRbXI0294pCIM882oPfkJiS07+cJ9lD3VrobAuYC4nr UW19cXeDfzij/mIPUzg1Ywx7oLRPOKA4sEvHQctQUmnNeMxW3bLyn6cX06u/y6wtizZ4 nRok68J9SeD6F3GuUceVfvjkIyrkE8SieEImCpht5G0Yg1MjVDHtvrMOMn127cc4wzTr tk+Ucee8SIN655WEH4xLQRqTBl6brnC+5r1jcSH+c7fRo++BRyLstyAdtJL+E5yVYyrb Kcrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=WzL7kOpglWd9PGx6oitqvSyGAyMOo2yaLssvcYr7yWc=; b=qbh0+Jxe4ZikzYbYuj44dJ9rvY381Mzf17+wyfJkPXh0Jer8Q1EQQff2h1pk3pZgGH xgfSKuw+YPXLBjl20F9qp6/+/Q41te+DpUfezoBmE0sToDnlEVGbVRytmuFA9bIeMhJN 8ijQKM8nuOW9k6NyooWUSQuQPdpG8xD8agCHtaKVVMbQYlAoYc3rBKFdXeRecJnS6pIF uULcyqTeDF2cMkxQw7u8XFIyOZWSghKojIJ0/u8ptLn+EP8rWDp7NlSqWrF34ue6iTLm xv+cbYXW6LaHwLXqpsdMGnERKxJP3M51iagunlSMulSRRZrumAC0v+HzHcPT+gQrZ8w3 bcEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xt32yCIJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d9si1656528edv.452.2020.09.09.08.10.58; Wed, 09 Sep 2020 08:11:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@kernel.org header.s=default header.b=xt32yCIJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726426AbgIIL73 (ORCPT + 99 others); Wed, 9 Sep 2020 07:59:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:40408 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726415AbgIILmN (ORCPT ); Wed, 9 Sep 2020 07:42:13 -0400 Received: from pali.im (pali.im [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3EBA1207DE; Wed, 9 Sep 2020 11:11:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599649899; bh=gk5ai7/vsUBs2dl7VhzTb79HWtwuO4OdRiCJ/geHW4g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=xt32yCIJZrUnpBjf6/MToHhOH5aK0XvmwKj0BwuSH4Fcsie9nQ0R0tHFTEEnVTFIP 29njlrTtNhos9A/wOErrHOF4fNWmUSFQ9GV2x/XbjDPYvt+u9vNWaHJT8TSYsNQWbr xUrm/P+mViuyxOWWowDpQZ7V6BMBiafgTH9hvMDw= Received: by pali.im (Postfix) id B61AE7A9; Wed, 9 Sep 2020 13:11:36 +0200 (CEST) Date: Wed, 9 Sep 2020 13:11:36 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Joseph Hwang Cc: linux-bluetooth@vger.kernel.org, marcel@holtmann.org, luiz.dentz@gmail.com, chromeos-bluetooth-upstreaming@chromium.org, josephsih@google.com, Alain Michaud , Abhishek Pandit-Subedi , "David S. Miller" , Jakub Kicinski , Johan Hedberg , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH v2 2/2] Bluetooth: sco: expose WBS packet length in socket option Message-ID: <20200909111136.ghp5p56m4cxfjreo@pali> References: <20200909094202.3863687-1-josephsih@chromium.org> <20200909174129.v2.2.I03247d3813c6dcbcdbeab26d068f9fd765edb1f5@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200909174129.v2.2.I03247d3813c6dcbcdbeab26d068f9fd765edb1f5@changeid> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 09 September 2020 17:42:02 Joseph Hwang wrote: > It is desirable to expose the wideband speech packet length via > a socket option to the user space so that the user space can set > the value correctly in configuring the sco connection. Hello! I'm fine with change below, but I would suggest to put more details into commit message. This change has nothing to do with wideband nor with exporting socket option to userspace -- which is already done via SCO_OPTIONS option. Also it is relevant to SCO socket with any codec data, not only wideband. This commit description should rather mention that it defines new getsockopt options BT_SNDMTU/BT_RCVMTU for SCO socket to be compatible with other bluetooth sockets and that these options return same value as option SCO_OPTIONS which is already present on existing kernels. > > Reviewed-by: Alain Michaud > Reviewed-by: Abhishek Pandit-Subedi > Signed-off-by: Joseph Hwang > --- > > (no changes since v1) > > net/bluetooth/sco.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c > index dcf7f96ff417e6..79ffcdef0b7ad5 100644 > --- a/net/bluetooth/sco.c > +++ b/net/bluetooth/sco.c > @@ -1001,6 +1001,12 @@ static int sco_sock_getsockopt(struct socket *sock, int level, int optname, > err = -EFAULT; > break; > > + case BT_SNDMTU: > + case BT_RCVMTU: > + if (put_user(sco_pi(sk)->conn->mtu, (u32 __user *)optval)) > + err = -EFAULT; > + break; > + > default: > err = -ENOPROTOOPT; > break; > -- > 2.28.0.526.ge36021eeef-goog >