linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: vishal agarwal <vishal.bluez@gmail.com>
Cc: Vishal Agarwal <vishal.agarwal@stericsson.com>,
	linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Bluetooth: Temporary keys should be retained during connection
Date: Wed, 4 Apr 2012 15:22:17 +0300	[thread overview]
Message-ID: <20120404122217.GA15085@x220> (raw)
In-Reply-To: <CA+_sZW9cqfW4Nz0C21av25VzwkSTat6QW6FoWGDzcA=oezgGLg@mail.gmail.com>

Hi Vishal,

On Wed, Apr 04, 2012, vishal agarwal wrote:
> > Firstly, did you verify that this fixes your test case? You still
> > didn't tell us what test case this is, btw.

What about the above?

> > Since setting the flag is outside of mgmt.c I think the removal should
> > also be. That way you also avoid an extra call to
> > hci_conn_hash_lookup_ba. I.e. please put the removal in
> > hci_disconn_complete_evt.
> >
> > I'd also still like to hear your opinion of the second option I
> > proposed. If you had a reference to struct link_key in hci_conn then
> > you'd just need to call list_del() and nothing else to remove it (i.e.
> > no iteration of hdev->link_keys necessary.
> 
> If I implement it this way then there will be two new variables added,
> one in hci_conn to store the reference of key and other one is inside
> link_key structure to store if key is temporary or not.
> or you want me to store reference of key to hci_conn only when the key
> is temporary?
> in this case also code might become complicated to handle cases if key
> is re generated and new key is not temporary but the older one was.
>
> So in my opinion after the changes you suggested (moving code in
> hci_disconn_complete_evt), this is also OK. lesser and clearer code.

Ok, fair enough. The hci_disconn_complete_evt change should be enough
then.

Johan

  reply	other threads:[~2012-04-04 12:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-04 11:45 [PATCH] Bluetooth: Temporary keys should be retained during connection Vishal Agarwal
2012-04-04 11:53 ` Johan Hedberg
2012-04-04 12:14   ` vishal agarwal
2012-04-04 12:22     ` Johan Hedberg [this message]
2012-04-04 12:32       ` vishal agarwal
  -- strict thread matches above, loose matches on Subject: below --
2012-04-04 13:40 Vishal Agarwal
2012-04-05 10:19 ` Johan Hedberg

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=20120404122217.GA15085@x220 \
    --to=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=vishal.agarwal@stericsson.com \
    --cc=vishal.bluez@gmail.com \
    /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).