linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: johan.hedberg@gmail.com
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 1/9] Bluetooth: Fix persistency of the HCI_MGMT flag
Date: Thu, 05 Jan 2012 15:10:36 -0800	[thread overview]
Message-ID: <1325805036.6454.70.camel@aeonflux> (raw)
In-Reply-To: <1325776582-10314-2-git-send-email-johan.hedberg@gmail.com>

Hi Johan,

> The HCI_MGMT flag needs to remain set even after closing an HCI device.
> 
> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
> ---
>  net/bluetooth/hci_core.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
> index 6d38d80..52edc11 100644
> --- a/net/bluetooth/hci_core.c
> +++ b/net/bluetooth/hci_core.c
> @@ -670,8 +670,8 @@ static int hci_dev_do_close(struct hci_dev *hdev)
>  	mgmt_powered(hdev, 0);
>  	hci_dev_unlock(hdev);
>  
> -	/* Clear flags */
> -	hdev->flags = 0;
> +	/* Clear flags, except persistent ones like HCI_MGMT */
> +	hdev->flags &= BIT(HCI_MGMT);
>  
>  	hci_req_unlock(hdev);
>  

can we just move this away from hdev->flags into a hdev->dev_flags.

Regards

Marcel



  reply	other threads:[~2012-01-05 23:10 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-05 15:16 [PATCH 0/9] Bluetooth: Legacy name discovery support for mgmt johan.hedberg
2012-01-05 15:16 ` [PATCH 1/9] Bluetooth: Fix persistency of the HCI_MGMT flag johan.hedberg
2012-01-05 23:10   ` Marcel Holtmann [this message]
2012-01-06 12:42     ` Johan Hedberg
2012-01-06 21:57       ` Marcel Holtmann
2012-01-08 20:21         ` Johan Hedberg
2012-01-05 15:16 ` [PATCH 2/9] Bluetooth: Convert inquiry cache to use standard list types johan.hedberg
2012-01-06  5:47   ` Marcel Holtmann
2012-01-05 15:16 ` [PATCH 3/9] Bluetooth: Move Extended Inquiry Response defines to hci.h johan.hedberg
2012-01-06  5:48   ` Marcel Holtmann
2012-01-05 15:16 ` [PATCH 4/9] Bluetooth: Add initial mgmt_confirm_name support johan.hedberg
2012-01-06  5:50   ` Marcel Holtmann
2012-01-05 15:16 ` [PATCH 5/9] Bluetooth: Return updated name state with hci_inquiry_cache_update johan.hedberg
2012-01-06  5:51   ` Marcel Holtmann
2012-01-05 15:16 ` [PATCH 6/9] Bluetooth: Flush inquiry cache when starting mgmt triggered inquiry johan.hedberg
2012-01-06  5:51   ` Marcel Holtmann
2012-01-05 15:16 ` [PATCH 7/9] Bluetooth: Rename hdev->inq_cache to hdev->discovery johan.hedberg
2012-01-06  5:54   ` Marcel Holtmann
2012-01-05 15:16 ` [PATCH 8/9] Bluetooth: Add discovery state tracking johan.hedberg
2012-01-06  5:53   ` Marcel Holtmann
2012-01-05 15:16 ` [PATCH 9/9] Bluetooth: Add name resolving support for mgmt based discovery johan.hedberg
2012-01-06  5:54   ` 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=1325805036.6454.70.camel@aeonflux \
    --to=marcel@holtmann.org \
    --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;
as well as URLs for NNTP newsgroup(s).