From: Marcel Holtmann <marcel@holtmann.org>
To: Johan Hedberg <johan.hedberg@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 2/6] Bluetooth: Fix LE MTU reporting for HCIGETDEVINFO
Date: Fri, 19 Oct 2012 10:20:23 -0700 [thread overview]
Message-ID: <1350667223.1785.2.camel@aeonflux> (raw)
In-Reply-To: <1350666911-6334-3-git-send-email-johan.hedberg@gmail.com>
Hi Johan,
> This patch fixes the use of le_mtu and le_pkts values in the
> HCIGETDEVINFO ioctl for LE-only controllers.
>
> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
> ---
> net/bluetooth/hci_core.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
> index 23359ef..b5a2be2 100644
> --- a/net/bluetooth/hci_core.c
> +++ b/net/bluetooth/hci_core.c
> @@ -1025,8 +1025,13 @@ int hci_get_dev_info(void __user *arg)
> di.type = (hdev->bus & 0x0f) | (hdev->dev_type << 4);
> di.flags = hdev->flags;
> di.pkt_type = hdev->pkt_type;
> - di.acl_mtu = hdev->acl_mtu;
> - di.acl_pkts = hdev->acl_pkts;
> + if (lmp_bredr_capable(hdev)) {
> + di.acl_mtu = hdev->acl_mtu;
> + di.acl_pkts = hdev->acl_pkts;
> + } else {
> + di.acl_mtu = hdev->le_mtu;
> + di.acl_pkts = hdev->le_pkts;
> + }
> di.sco_mtu = hdev->sco_mtu;
> di.sco_pkts = hdev->sco_pkts;
> di.link_policy = hdev->link_policy;
shouldn't we ensure that di.sco_mtu and di.sco_pkts is set to 0 for LE
only devices. I rather make this explicit here instead of relying that
it is zeroed at controller creation. In theory there still is a code
path that might set these.
Regards
Marcel
next prev parent reply other threads:[~2012-10-19 17:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-19 17:15 [PATCH 0/6] Bluetooth: Add basic support for single-mode controllers Johan Hedberg
2012-10-19 17:15 ` [PATCH 1/6] Bluetooth: Remove unnecessary LE init req from HCI core Johan Hedberg
2012-10-19 17:15 ` [PATCH 2/6] Bluetooth: Fix LE MTU reporting for HCIGETDEVINFO Johan Hedberg
2012-10-19 17:20 ` Marcel Holtmann [this message]
2012-10-19 17:15 ` [PATCH 3/6] Bluetooth: Add initial support for LE-only controllers Johan Hedberg
2012-10-19 17:23 ` Marcel Holtmann
2012-10-19 17:15 ` [PATCH 4/6] Bluetooth: Add setting of the LE event mask Johan Hedberg
2012-10-19 17:23 ` Marcel Holtmann
2012-10-19 17:15 ` [PATCH 5/6] Bluetooth: Fix HCI command sending when powering on LE-only adapters Johan Hedberg
2012-10-19 17:24 ` Marcel Holtmann
2012-10-19 17:15 ` [PATCH 6/6] Bluetooth: Read adversiting channel TX power during init sequence Johan Hedberg
2012-10-19 17:25 ` Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1350667223.1785.2.camel@aeonflux \
--to=marcel@holtmann.org \
--cc=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox