public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: sniff mode
Date: Mon, 24 Aug 2009 14:12:31 -0700	[thread overview]
Message-ID: <1251148351.2950.71.camel@localhost.localdomain> (raw)
In-Reply-To: <2d5a2c100908241358m26c615aao1a384d9d954bf713@mail.gmail.com>

Hi Luiz,

> >> It really seems the opposite, like we were disabling the automatic
> >> active mode since this make us to always hit goto timer; while in
> >> sniff mode. Perhaps this is meant for when remote device has been
> >> controlling modes, which sound strange to me since hci_mode_change_evt
> >> is called even when the we actively change the mode, right?
> >> (hci_conn_idle does that)
> >
> > I am not following.
> 
> Perhaps it is just me, but I don't see any attempt to detect which
> part has initiated the connection, so regardless of who has been the
> initiator, on any mode change different than active we will reset the
> power_save to 0 which will prevent any attempt to leave sniff mode.

actually it is not based on who initiated the connection, it is based on
who initiated the sniff mode:

	if (conn->mode == HCI_CM_ACTIVE)
		conn->power_save = 1;
	else
		conn->power_save = 0;

If we are back to active mode, then reset power_save and trigger
automatic sniff-mode else disable it.

Regards

Marcel



  reply	other threads:[~2009-08-24 21:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-24 18:26 sniff mode Luiz Augusto von Dentz
2009-08-24 18:40 ` Marcel Holtmann
2009-08-24 19:26   ` Luiz Augusto von Dentz
2009-08-24 19:33     ` Marcel Holtmann
2009-08-24 20:58       ` Luiz Augusto von Dentz
2009-08-24 21:12         ` Marcel Holtmann [this message]
2009-08-26  7:21       ` Ville Tervo
2009-08-26 18:04         ` 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=1251148351.2950.71.camel@localhost.localdomain \
    --to=marcel@holtmann.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.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