From: Marcel Holtmann <marcel@holtmann.org>
To: BlueZ Mailing List <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] [PATCH] /include/net/bluetooth/hci.h : modify ACL_PTYPE_MASK
Date: Thu, 07 Apr 2005 12:27:20 +0200 [thread overview]
Message-ID: <1112869640.9047.60.camel@pegasus> (raw)
In-Reply-To: <1112624867.4782.27.camel@g-xw4200-6.rd.francetelecom.fr>
Hi Emmanuel,
> I've noticed that ACL_PTYPE_MASK is defined as the binary negation of
> SCO_PTYPE_MASK in /include/net/bluetooth/hci.h .
>
> Although this happens to be not wrong currently, because none of the
> values (0x0020, 0x0040, 0x0080) used by HV1, HV2 and HV3 have a meaning
> for ACL packets, there is AFAIK no norm stating that this won't change
> (these values are just marked as "Reserved for future use" in the
> Bluetooth Specification version 2.0).
>
> Furthermore, value 0x0001 is marked as "Reserved for future use" for
> both ACL and SCO packets. Therefore, by forbidding their use for SCO
> packets, and defining the ACL mask as the SCO mask's negation, we are
> allowing it's use for ACL packets, which could have unspecified results
> on any hardware using a future Bluetooth Specification version.
>
> I suggest the following patch :
>
>
> --- old/include/net/bluetooth/hci.h 2005-03-26 04:28:36.000000000
> +0100
> +++ new/include/net/bluetooth/hci.h 2005-04-04 16:08:24.372117996
> +0200
> @@ -124,7 +124,8 @@
> #define HCI_HV3 0x0080
>
> #define SCO_PTYPE_MASK (HCI_HV1 | HCI_HV2 | HCI_HV3)
> -#define ACL_PTYPE_MASK (~SCO_PTYPE_MASK)
> +#define ACL_PTYPE_MASK (HCI_DM1 | HCI_DM3 | HCI_DM5 \
> + | HCI_DH1 | HCI_DH3 | HCI_DH5)
>
> /* ACL flags */
> #define ACL_CONT 0x01
>
>
> Note that this patch has the side effect of blocking any flag that is
> not defined in hci.h for ACL packets (like 0x0002 : "2-DH1 may not be
> used"), but I assume that using such a flag somewhere would just be a
> bug.
there is no good reason to include such a patch. The problem with the
newer specifications is that the packet type is different for ACL and
SCO/eSCO connections and thus they don't overlap anymore. This means
that we need two different packet types that can be set by users. And
having the option to disable EDR is a good thing. With your patch this
is no longer possible. When we finally add full eSCO support, I will
think about how we can do this better.
Regards
Marcel
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
prev parent reply other threads:[~2005-04-07 10:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-04 14:27 [Bluez-devel] [PATCH] /include/net/bluetooth/hci.h : modify ACL_PTYPE_MASK zze-COLBUS Emmanuel RD-MAPS-GRE
2005-04-07 10:27 ` Marcel Holtmann [this message]
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=1112869640.9047.60.camel@pegasus \
--to=marcel@holtmann.org \
--cc=bluez-devel@lists.sourceforge.net \
/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;
as well as URLs for NNTP newsgroup(s).