Re: [PATCH] adapter: Fix not clearing connectable setting on power off

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux