* [PATCH] Bluetooth: mgmt: Fix returning a list with invalid indexes
@ 2012-08-14 23:59 Vinicius Costa Gomes
2012-08-21 18:10 ` Vinicius Costa Gomes
0 siblings, 1 reply; 3+ messages in thread
From: Vinicius Costa Gomes @ 2012-08-14 23:59 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Vinicius Costa Gomes
When a device is in the HCI_SETUP state, it was being counted as
a valid device, but it wasn't included in the list returned to
userspace.
This can be reproduced when you add an adapter after doing
'rfkill block all', for example.
This commit also has the (intended) effect of making
'btmgmt power on' work after the rfkill block has been lifted.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
---
net/bluetooth/mgmt.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index a3329cb..c500b59 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -350,9 +350,6 @@ static int read_index_list(struct sock *sk, struct hci_dev *hdev, void *data,
i = 0;
list_for_each_entry(d, &hci_dev_list, list) {
- if (test_bit(HCI_SETUP, &d->dev_flags))
- continue;
-
if (!mgmt_valid_hdev(d))
continue;
--
1.7.11.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] Bluetooth: mgmt: Fix returning a list with invalid indexes
2012-08-14 23:59 [PATCH] Bluetooth: mgmt: Fix returning a list with invalid indexes Vinicius Costa Gomes
@ 2012-08-21 18:10 ` Vinicius Costa Gomes
2012-08-21 19:12 ` Vinicius Costa Gomes
0 siblings, 1 reply; 3+ messages in thread
From: Vinicius Costa Gomes @ 2012-08-21 18:10 UTC (permalink / raw)
To: linux-bluetooth
Hi,
On 20:59 Tue 14 Aug, Vinicius Costa Gomes wrote:
> When a device is in the HCI_SETUP state, it was being counted as
> a valid device, but it wasn't included in the list returned to
> userspace.
>
> This can be reproduced when you add an adapter after doing
> 'rfkill block all', for example.
>
> This commit also has the (intended) effect of making
> 'btmgmt power on' work after the rfkill block has been lifted.
>
> Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
bump :-)
Cheers,
--
Vinicius
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Bluetooth: mgmt: Fix returning a list with invalid indexes
2012-08-21 18:10 ` Vinicius Costa Gomes
@ 2012-08-21 19:12 ` Vinicius Costa Gomes
0 siblings, 0 replies; 3+ messages in thread
From: Vinicius Costa Gomes @ 2012-08-21 19:12 UTC (permalink / raw)
To: linux-bluetooth
Hi,
On 15:10 Tue 21 Aug, Vinicius Costa Gomes wrote:
> Hi,
>
> On 20:59 Tue 14 Aug, Vinicius Costa Gomes wrote:
> > When a device is in the HCI_SETUP state, it was being counted as
> > a valid device, but it wasn't included in the list returned to
> > userspace.
> >
> > This can be reproduced when you add an adapter after doing
> > 'rfkill block all', for example.
> >
> > This commit also has the (intended) effect of making
> > 'btmgmt power on' work after the rfkill block has been lifted.
> >
> > Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
>
> bump :-)
Please ignore this patch.
As discussed on IRC, seems that the right solution would be to fix the
num_controllers parameters to not count devices in the HCI_SETUP state
and do a proper power on on the device when it leaves the rfkill blocked
state.
Cheers,
--
Vinicius
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-08-21 19:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-14 23:59 [PATCH] Bluetooth: mgmt: Fix returning a list with invalid indexes Vinicius Costa Gomes
2012-08-21 18:10 ` Vinicius Costa Gomes
2012-08-21 19:12 ` Vinicius Costa Gomes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox