Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp18826809ybl; Fri, 3 Jan 2020 09:46:21 -0800 (PST) X-Google-Smtp-Source: APXvYqwjFezf8lcYksg/6Y9ZdE+X7X3sbgmL+1o/33BINMmTms/+AcLqV1waDgEhKQPKHT0yeHkO X-Received: by 2002:a9d:65cb:: with SMTP id z11mr77375420oth.348.1578073581132; Fri, 03 Jan 2020 09:46:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578073581; cv=none; d=google.com; s=arc-20160816; b=GPbzguXfBMwgoi/6umrC6H8kVHUg2KsyGOivMdI6JiWBt4bIAbYrRwqyPjBdCDyD30 u8imHpqeawf2FNdBRBurUNDcJr+Ed2elbfd9wgpnpfXRi1MuPCMVBfVpour0ghDQdjJO BhTmz2CkV13sj/ZzLgo/2RbTohSoesTiFaSJGenNrSF3sP04Xq/sX1NyBo3KVqagP0ox A9CTVHsrcZxLF872nVAp0kVxvAnJY5VxnC/Gcox/v45ovW3RxlFwagedX94x/JlFH2V2 KoX8qU+0XxAcDsat/sRKDOfh7cN720Um6zSXpBSZmbCE1mxL3rQamhv/dbjEKdiNYHPw smug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=UHjMmXyc4cvw4XaLUeQiTc8j+wHyKH0uomFcACv8DzI=; b=bIWXWtwuesPCV2Uzh5w49t26TicWCsv353nH/I/uNL14YkjRti406junr4xy1F/3ng AHfRrlsZZQBfPHgBBS0xUVM0dp5t85mL9A2InSfbHhr5DSGb9OTO22vYTi+2UWtR/Thx q552lz23NPRlO+Wuukr0yncDab0ElOr3woM1jJCLIe+68baKy0aCpiTl7NeSOhsEvZYH VTaDTUFURYYsc3+Y1bPkBcxM2mjeoglPp7ZJt/LPWdV8huGQXNUw8kVReqqwgPwYEDOA 7gPuvB1KQUeqFje5U2azoMdoSsRbCGth1VVs0wREltEiYUYG76IGiGJWZm5pyi6sTm6f 9n2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Y+8ZbV9S; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l6si24715756otq.132.2020.01.03.09.45.55; Fri, 03 Jan 2020 09:46:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-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=@gmail.com header.s=20161025 header.b=Y+8ZbV9S; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728115AbgACRp3 (ORCPT + 99 others); Fri, 3 Jan 2020 12:45:29 -0500 Received: from mail-ot1-f54.google.com ([209.85.210.54]:41774 "EHLO mail-ot1-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726077AbgACRp3 (ORCPT ); Fri, 3 Jan 2020 12:45:29 -0500 Received: by mail-ot1-f54.google.com with SMTP id r27so62016560otc.8 for ; Fri, 03 Jan 2020 09:45:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UHjMmXyc4cvw4XaLUeQiTc8j+wHyKH0uomFcACv8DzI=; b=Y+8ZbV9S9mWaW++a2r/RJN5H7FC/Uq8kbqJFXT511HfDMK2XtYRB4Hw3bcae1OvLLP q7NEaDGsZvd0dSg4AlxFyKaFJaoo61NnOcQGjuHcTJrLZlUvmf6eJV7IpWn+tXCrN4v2 S1LeRWLgURMaTu0J57x2q8tAFnxIrWYFyv99ACKJ3djP2/m1cGSwM7dybwNMWYYF1sXu EDnsqh+bD3EdloMIpej5Sk4D5qn2+u7xZ8pmUd2oC40RqwCCgFjn7VfJ9WUE7iVDd1bw uLUSXyliaR4D9JJpOAwXVvQHK8C1WtZRwQ1Uc1rzyC/Yf1MpgfaRYELH3mbulOhYHZ+O JIaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UHjMmXyc4cvw4XaLUeQiTc8j+wHyKH0uomFcACv8DzI=; b=dXg1ceNWxXt28kP9Ok5UWPBv0v7104U0gsu8dKSjq0GozB47D1izxQuz1/3altV5ie zAYMbcfu8gz1FCUZNCbxthngUlah8YeH4DYToCNTlqRfP32QylG5SNt/8hmBhRaBxi32 Dt2Ggy/IV5Y4M64yV+vkzCjoojwIzu/1ITN8KFbRZGx7wOHAM1wFfh3IqHGniJQm2AD8 n/cEuzAQLXi9Z5OGt+kYnONcJt4Dc8DoqhfaIUx6au7V89XF1lwlav1fckJWwCc1rwma uSjYzDRgYx22w7UPFncFqyhj5AH12J451KOQdzsqgUMdVju6BXo5JddVcJ7urtqLelmB CTMg== X-Gm-Message-State: APjAAAXgp+TwDs8aImlfYY2KgyBJ0rI/Zwv5AsN63v0zSNAvbAbGJVUG XhNUx+3rRCgF63HgPMOWqo0oYKh7D4IYkdyZWN+E28SY X-Received: by 2002:a9d:6d10:: with SMTP id o16mr101988587otp.28.1578073528262; Fri, 03 Jan 2020 09:45:28 -0800 (PST) MIME-Version: 1.0 References: <20200102172447.18574-1-luiz.dentz@gmail.com> <20200102172447.18574-2-luiz.dentz@gmail.com> In-Reply-To: From: Luiz Augusto von Dentz Date: Fri, 3 Jan 2020 09:45:15 -0800 Message-ID: Subject: Re: [RFC 2/2] Bluetooth: Add BT_PHYS socket option To: Jamie Mccrae Cc: "linux-bluetooth@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Jamie, On Thu, Jan 2, 2020 at 11:22 PM Jamie Mccrae wrote: > > > diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h > > index e42bb8e03c09..69c0e7eb26d9 100644 > > --- a/include/net/bluetooth/bluetooth.h > > +++ b/include/net/bluetooth/bluetooth.h > > @@ -121,6 +121,23 @@ struct bt_voice { > > > > #define BT_SNDMTU 12 > > #define BT_RCVMTU 13 > > +#define BT_PHYS 14 > > + > > +#define BT_PHY_BR_1M_1SLOT 0x00000001 > > +#define BT_PHY_BR_1M_3SLOT 0x00000002 > > +#define BT_PHY_BR_1M_5SLOT 0x00000004 > > +#define BT_PHY_EDR_2M_1SLOT 0x00000008 > > +#define BT_PHY_EDR_2M_3SLOT 0x00000010 > > +#define BT_PHY_EDR_2M_5SLOT 0x00000020 > > +#define BT_PHY_EDR_3M_1SLOT 0x00000040 > > +#define BT_PHY_EDR_3M_3SLOT 0x00000080 > > +#define BT_PHY_EDR_3M_5SLOT 0x00000100 > > +#define BT_PHY_LE_1M_TX 0x00000200 > > +#define BT_PHY_LE_1M_RX 0x00000400 > > +#define BT_PHY_LE_2M_TX 0x00000800 > > +#define BT_PHY_LE_2M_RX 0x00001000 > > +#define BT_PHY_LE_CODED_TX 0x00002000 > > +#define BT_PHY_LE_CODED_RX 0x00004000 > > My query about this is there is an option for LE Coded, but LE coded can have a data rate of 125Kbps or 500Kbps, is there no need to differentiate between the two rates in applications? I guess you referring to L=2 and L=8 payloads, those are unfortunately not exposed over HCI, they seem to be tied to LL power control and not with the PHY selection so Im not sure how we would be able to infer what payload is in use. Btw, I've the PHY bit fields to match what we use in the management socket, -- Luiz Augusto von Dentz