From: Szymon Janc <szymon.janc@codecoup.pl>
To: Johan Hedberg <johan.hedberg@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] adapter: Fix not clearing connectable setting on power off
Date: Mon, 19 Feb 2018 10:21:57 +0100 [thread overview]
Message-ID: <2144190.8ubbku3NdT@ix> (raw)
In-Reply-To: <20180216191749.GA4619@x1c>
Hi Johan,
On Friday, 16 February 2018 20:17:49 CET Johan Hedberg wrote:
> Hi Szymon,
>
> On Thu, Feb 08, 2018, Szymon Janc wrote:
> > + /* if timeout was set kernel clears discoverable on its own */
> > + if (!adapter->discoverable_timeout)
> > + return;
>
> Isn't this condition inverted? I.e. you want to call Set Connectable if
> the timeout is 0?
No, the check is correct but comment should be better I suppose.
The thing is that with timeout enabled kernel will clear only discoverable
flag leaving connectabled enabled. If timeout is not set both flags are
persistent over power toggle (which is OK). So intention of this patch is to
fix 'dangling' connectable flag in case of powering off discoverable adapter
with timeout set.
I'll send V2 with udpated comment.
--
pozdrawiam
Szymon Janc
prev parent reply other threads:[~2018-02-19 9:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-08 15:46 [PATCH] adapter: Fix not clearing connectable setting on power off Szymon Janc
2018-02-16 19:17 ` Johan Hedberg
2018-02-19 9:21 ` Szymon Janc [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=2144190.8ubbku3NdT@ix \
--to=szymon.janc@codecoup.pl \
--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