From: Ville Tervo <ville.tervo@nokia.com>
To: ext Corey Boyle <corey@kansanian.com>
Cc: wyrles@ytram.com, "Cufi, Carles" <carles.cufi@nordicsemi.no>,
Ed Tomlinson <edt@aei.ca>,
Bluettooth Linux <linux-bluetooth@vger.kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: Linux 2.6.39
Date: Thu, 26 May 2011 11:37:46 +0300 [thread overview]
Message-ID: <20110526083746.GT2480@null> (raw)
In-Reply-To: <BANLkTikxR3AZJK5Bhc5b=7dq6CbXd2iBtQ@mail.gmail.com>
On Wed, May 25, 2011 at 09:11:19PM -0400, ext Corey Boyle wrote:
> On Wed, May 25, 2011 at 12:31 PM, Tom Allebrandi <wyrles@ytram.com> wrote:
> > -----Original Message-----
> > From: linux-bluetooth-owner@vger.kernel.org
> > [mailto:linux-bluetooth-owner@vger.kernel.org] On Behalf Of Cufi, Carles
> > Sent: Wednesday, May 25, 2011 7:15 AM
> > To: corey@kansanian.com
> > Cc: Ed Tomlinson; Ville Tervo; Bluettooth Linux;
> > linux-kernel@vger.kernel.org
> > Subject: RE: Linux 2.6.39
> >
> > (Snipping...)
> > On Wed, May 25, 2011 at 8:46 AM, Cufi, Carles <carles.cufi@nordicsemi.no>
> > wrote:
> >> On Wednesday 25 May 2011 07:36:14 Ville Tervo wrote:
> >>> On Wed, May 25, 2011 at 07:11:17AM -0400, ext Ed Tomlinson wrote:
> >>> > On Wednesday 25 May 2011 06:54:54 Corey Boyle wrote:
> >>> > > > On Mon, May 23, 2011 at 06:08:36PM -0400, ext Ed Tomlinson wrote:
> >>> > > > > On Saturday 21 May 2011 16:31:00 Ed Tomlinson wrote:
> >>> > > > > > On Saturday 21 May 2011 13:56:20 Milan Oravec wrote:
> > ...
> >>> > Read Local Version Information (0x04|0x0001) plen 0
> >>> > > HCI Event: Command Complete (0x0e) plen 12
> >>> > Read Local Version Information (0x04|0x0001) ncmd 1
> >>> > status 0x00
> >>> > HCI Version: 1.1 (0x1) HCI Revision: 0x20d
> > *************************
> >>> > LMP Version: 1.1 (0x1) LMP Subversion: 0x20d
> > *************************
> >>> > Manufacturer: Cambridge Silicon Radio (10) < HCI Command: Set
> >>> > Event Mask (0x03|0x0001) plen 8
> >>> > Mask: 0xfffffbff00000000
> > *************************
> >>> > > HCI Event: Command Complete (0x0e) plen 4
> >>> > Set Event Mask (0x03|0x0001) ncmd 1
> >>> > status 0x12
> >>> > Error: Invalid HCI Command Parameters
> >>
> >>Set Event Mask has been in the Bluetooth Spec since day 1, so it must be
> > the bitmask, which has been extended with each new spec release to cover
> > newly >added events. Looking at the latest spec, and judging by the year
> > your chipset was released in (it probably is a 1.1 compliant chipset) I
> > believe that >0x000000008FFFFFFF is the highest event mask it would support
> > (up until and including Page Scan Repetition Mode Change Event), but since I
> > don't have the >old 1.1 spec around I may be one or two bits off.
> >
> > The device appears to have identified itself as CSR firmware using Bluetooth
> > version 1.1.
> >
> > I do happen to have the 1.1 spec lying around :-), for Set_Event_Mask it
> > says
> >
> > 0x0000000100000000
> > To Reserved for future use
> > 0x8000000000000000
> >
> > 0x00000000FFFFFFFF Default (All events enabled)
> >
>
> I am beginning to think that my adapter simply does not support this
> command. I have tried with all the suggested bitmasks, all zeros, all
> ones, all combinations where a single bit is set, etc. I'm not sure
> where to go from here other than add a flag which incidates that
> certain devices don't support this command so it can be skipped.
> Again, the only way I have gotten it to work is by not sending the
> command at all. Thoughts?
I also played a bit with 1.1 CSR dongle and couldn't find any mask that would
be accepted. I think this command can be left out for older than 1.2 devices.
Following patch should do it. Could you verify it. I don't have access to old
hw ATM.
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 19cd4af..86d1e26 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -477,14 +477,16 @@ static void hci_setup_event_mask(struct hci_dev *hdev)
* command otherwise */
u8 events[8] = { 0xff, 0xff, 0xfb, 0xff, 0x00, 0x00, 0x00, 0x00 };
- /* Events for 1.2 and newer controllers */
- if (hdev->lmp_ver > 1) {
- events[4] |= 0x01; /* Flow Specification Complete */
- events[4] |= 0x02; /* Inquiry Result with RSSI */
- events[4] |= 0x04; /* Read Remote Extended Features Complete */
- events[5] |= 0x08; /* Synchronous Connection Complete */
- events[5] |= 0x10; /* Synchronous Connection Changed */
- }
+ /* CSR 1.1 dongles does not accept any bitfield so don't try to set
+ * any event mask for pre 1.2 devices */
+ if (hdev->lmp_ver <= 1)
+ return;
+
+ events[4] |= 0x01; /* Flow Specification Complete */
+ events[4] |= 0x02; /* Inquiry Result with RSSI */
+ events[4] |= 0x04; /* Read Remote Extended Features Complete */
+ events[5] |= 0x08; /* Synchronous Connection Complete */
+ events[5] |= 0x10; /* Synchronous Connection Changed */
if (hdev->features[3] & LMP_RSSI_INQ)
events[4] |= 0x04; /* Inquiry Result with RSSI */
--
next prev parent reply other threads:[~2011-05-26 8:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <BANLkTinG_qCtHQYRYFQUJ9oGv4H1cuznWg@mail.gmail.com>
2011-05-25 11:11 ` Linux 2.6.39 Ed Tomlinson
2011-05-25 11:36 ` Ville Tervo
2011-05-25 11:53 ` Corey Boyle
2011-05-25 12:12 ` Ed Tomlinson
2011-05-25 12:46 ` Cufi, Carles
2011-05-25 14:07 ` Corey Boyle
2011-05-25 14:15 ` Cufi, Carles
2011-05-25 16:31 ` Tom Allebrandi
2011-05-25 17:04 ` Cufi, Carles
2011-05-25 17:21 ` Tom Allebrandi
2011-05-26 1:11 ` Corey Boyle
2011-05-26 8:37 ` Ville Tervo [this message]
2011-05-26 10:17 ` Corey Boyle
2011-05-26 10:47 ` Ed Tomlinson
2011-05-30 21:02 ` Gustavo F. Padovan
[not found] <BANLkTikB37AvEgh1MAFBbYvFaxsL6W11OQ@mail.gmail.com>
[not found] ` <loom.20110521T194736-595@post.gmane.org>
[not found] ` <201105211631.00804.edt@aei.ca>
[not found] ` <201105231808.37369.edt@aei.ca>
2011-05-25 8:27 ` Ville Tervo
2011-05-25 21:19 ` Milan Oravec
2011-06-21 21:08 ` Milan Oravec
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=20110526083746.GT2480@null \
--to=ville.tervo@nokia.com \
--cc=carles.cufi@nordicsemi.no \
--cc=corey@kansanian.com \
--cc=edt@aei.ca \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wyrles@ytram.com \
/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).