2010-09-09 07:32:39

by Johan Hedberg

[permalink] [raw]
Subject: [PATCH] Bluetooth: Don't clear the blacklist when closing the HCI device

From: Johan Hedberg <[email protected]>

Clearing the blacklist in hci_dev_do_close() would mean that user space
needs to do extra work to re-block devices after a DEVDOWN-DEVUP cycle.
This patch removes the clearing of the blacklist in this case and
thereby saves user space from the extra work.

Signed-off-by: Johan Hedberg <[email protected]>
---
net/bluetooth/hci_core.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index c52f091..bc2a052 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -562,7 +562,6 @@ static int hci_dev_do_close(struct hci_dev *hdev)
hci_dev_lock_bh(hdev);
inquiry_cache_flush(hdev);
hci_conn_hash_flush(hdev);
- hci_blacklist_clear(hdev);
hci_dev_unlock_bh(hdev);

hci_notify(hdev, HCI_DEV_DOWN);
--
1.7.0.4



2010-09-27 20:49:30

by Gustavo Padovan

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: Don't clear the blacklist when closing the HCI device

Hi Johan,

* Ville Tervo <[email protected]> [2010-09-15 12:49:09 +0300]:

> On Thu, Sep 09, 2010 at 09:32:39AM +0200, ext [email protected] wrote:
> > From: Johan Hedberg <[email protected]>
> >
> > Clearing the blacklist in hci_dev_do_close() would mean that user space
> > needs to do extra work to re-block devices after a DEVDOWN-DEVUP cycle.
> > This patch removes the clearing of the blacklist in this case and
> > thereby saves user space from the extra work.
> >
> > Signed-off-by: Johan Hedberg <[email protected]>
>
> Acked-by: Ville Tervo <[email protected]>

Patch has been applied to my bluetooth-next-2.6 tree to later merge in
wireless-next-2.6

--
Gustavo F. Padovan
ProFUSION embedded systems - http://profusion.mobi

2010-09-15 09:49:09

by Ville Tervo

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: Don't clear the blacklist when closing the HCI device

On Thu, Sep 09, 2010 at 09:32:39AM +0200, ext [email protected] wrote:
> From: Johan Hedberg <[email protected]>
>
> Clearing the blacklist in hci_dev_do_close() would mean that user space
> needs to do extra work to re-block devices after a DEVDOWN-DEVUP cycle.
> This patch removes the clearing of the blacklist in this case and
> thereby saves user space from the extra work.
>
> Signed-off-by: Johan Hedberg <[email protected]>

Acked-by: Ville Tervo <[email protected]>

> ---
> net/bluetooth/hci_core.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
> index c52f091..bc2a052 100644
> --- a/net/bluetooth/hci_core.c
> +++ b/net/bluetooth/hci_core.c
> @@ -562,7 +562,6 @@ static int hci_dev_do_close(struct hci_dev *hdev)
> hci_dev_lock_bh(hdev);
> inquiry_cache_flush(hdev);
> hci_conn_hash_flush(hdev);
> - hci_blacklist_clear(hdev);
> hci_dev_unlock_bh(hdev);
>
> hci_notify(hdev, HCI_DEV_DOWN);
> --
> 1.7.0.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html