linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrei Emeltchenko <andrei.emeltchenko.news@gmail.com>
To: coekbe <coekbe@gmail.com>, Gustavo Padovan <gustavo@padovan.org>,
	linux-bluetooth@vger.kernel.org
Subject: Re: Bug report: bluetoothd broken for a USB dongle since bluez 4.85
Date: Thu, 26 Apr 2012 10:01:11 +0300	[thread overview]
Message-ID: <20120426070109.GA2659@aemeltch-MOBL1> (raw)
In-Reply-To: <20120426064220.GA14645@x220.P-661HNU-F1>

Hi Johan,

On Thu, Apr 26, 2012 at 09:42:20AM +0300, Johan Hedberg wrote:
> > Perhaps the following is the correct patch (works with my device):
> > 
> > -----------------------------------------------------------------
> > --- bluez-4.99/plugins/hciops.c.orig	2012-03-05 11:03:57.000000000 +0200
> > +++ bluez-4.99/plugins/hciops.c	2012-04-26 06:38:53.105166053 +0300
> > @@ -565,7 +565,7 @@ static void set_event_mask(int index)
> >  	}
> > 
> >  	if (dev->features[3] & LMP_RSSI_INQ)
> > -		events[4] |= 0x04; /* Inquiry Result with RSSI */
> > +		events[4] |= 0x02; /* Inquiry Result with RSSI */
> > 
> >  	if (dev->features[5] & LMP_SNIFF_SUBR)
> >  		events[5] |= 0x20; /* Sniff Subrating */
> > -------------------------------------------------------------------
> > 
> > Above the code that I quoted there's another "event[4] |= 0x02" with the comment
> > "Inquiry Result with RSSI". Surely it cannot be both 0x02 and 0x04?
> > The bluetooth spec 1.2 suggests 0x02 is correct.
> 
> Yes, you're right. The correct value is 0x02 and 0x04 (which means "Read
> Remote Extended Features Complete" that your dongle doesn't support).
> I've pushed a patch to bluez.git to fix this and I'll also send a patch
> in a minute for the kernel which will be needed when using mgmtops
> instead of hciops.

Can we change magic numbers to defines?

Best regards 
Andrei Emeltchenko 


      reply	other threads:[~2012-04-26  7:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-25  7:06 Bug report: bluetoothd broken for a USB dongle since bluez 4.85 coekbe
2012-04-25 19:48 ` Gustavo Padovan
2012-04-26  4:07   ` coekbe
2012-04-26  6:42     ` Johan Hedberg
2012-04-26  7:01       ` Andrei Emeltchenko [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=20120426070109.GA2659@aemeltch-MOBL1 \
    --to=andrei.emeltchenko.news@gmail.com \
    --cc=coekbe@gmail.com \
    --cc=gustavo@padovan.org \
    --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;
as well as URLs for NNTP newsgroup(s).