From: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 5/8] Bluetooth: Add MGMT handlers for dealing with SMP LTK's
Date: Mon, 30 Jan 2012 20:27:08 -0300 [thread overview]
Message-ID: <20120130232708.GC17656@samus> (raw)
In-Reply-To: <1327963561.1955.195.camel@aeonflux>
Hi Marcel,
On 14:46 Mon 30 Jan, Marcel Holtmann wrote:
> Hi Vinicius,
>
> > This adds a method to notify that a new LTK is available and
> > a handler to store keys coming from userspace into the kernel LTK
> > list.
> >
> > Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
> > ---
> > include/net/bluetooth/hci_core.h | 2 +
> > net/bluetooth/mgmt.c | 82 ++++++++++++++++++++++++++++++++++++++
> > 2 files changed, 84 insertions(+), 0 deletions(-)
> >
> > diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
> > index ae3f653..9e415dc 100644
> > --- a/include/net/bluetooth/hci_core.h
> > +++ b/include/net/bluetooth/hci_core.h
> > @@ -994,6 +994,8 @@ int mgmt_discovering(struct hci_dev *hdev, u8 discovering);
> > int mgmt_device_blocked(struct hci_dev *hdev, bdaddr_t *bdaddr);
> > int mgmt_device_unblocked(struct hci_dev *hdev, bdaddr_t *bdaddr);
> >
> > +int mgmt_new_ltk(struct hci_dev *hdev, struct smp_ltk *key, u8 persistent);
> > +
> > /* HCI info for socket */
> > #define hci_pi(sk) ((struct hci_pinfo *) sk)
> >
> > diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
> > index 8970799..57aa716 100644
> > --- a/net/bluetooth/mgmt.c
> > +++ b/net/bluetooth/mgmt.c
> > @@ -2181,6 +2181,62 @@ done:
> > return err;
> > }
> >
> > +static int load_long_term_keys(struct sock *sk, u16 index,
> > + unsigned char *data, u16 len)
> > +{
> > + struct hci_dev *hdev;
> > + struct mgmt_cp_load_long_term_keys *cp;
> > + u16 key_count, expected_len;
> > + int i;
> > +
> > + cp = (void *) data;
>
> can we get rid of this nasty casting by using proper void pointers in
> the first place instead of unsigned char?
I will send this change as a separated patch, as there are quite a few
places that do the same thing.
>
> Regards
>
> Marcel
>
>
Cheers,
--
Vinicius
next prev parent reply other threads:[~2012-01-30 23:27 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-30 22:29 [PATCH 0/8] [Resend] New MGMT messages for SMP Long Term Keys Vinicius Costa Gomes
2012-01-30 22:29 ` [PATCH 1/8] Bluetooth: Add structures for the new LTK exchange messages Vinicius Costa Gomes
2012-01-30 22:38 ` Marcel Holtmann
2012-01-30 22:29 ` [PATCH 2/8] Bluetooth: Rename smp_key_size to enc_key_size Vinicius Costa Gomes
2012-01-30 22:39 ` Marcel Holtmann
2012-01-31 2:04 ` Johan Hedberg
2012-01-30 22:29 ` [PATCH 3/8] Bluetooth: Add new structures for handling SMP Long Term Keys Vinicius Costa Gomes
2012-01-30 22:42 ` Marcel Holtmann
2012-01-30 23:13 ` Vinicius Costa Gomes
2012-01-30 22:29 ` [PATCH 4/8] Bluetooth: Use the updated key structures for handling LTKs Vinicius Costa Gomes
2012-01-30 22:44 ` Marcel Holtmann
2012-01-30 23:24 ` Vinicius Costa Gomes
2012-01-31 0:48 ` Marcel Holtmann
2012-01-30 22:29 ` [PATCH 5/8] Bluetooth: Add MGMT handlers for dealing with SMP LTK's Vinicius Costa Gomes
2012-01-30 22:46 ` Marcel Holtmann
2012-01-30 23:27 ` Vinicius Costa Gomes [this message]
2012-01-31 0:49 ` Marcel Holtmann
2012-01-30 22:29 ` [PATCH 6/8] Bluetooth: Add support for removing LTK's when pairing is removed Vinicius Costa Gomes
2012-01-30 22:49 ` Marcel Holtmann
2012-01-30 23:33 ` Vinicius Costa Gomes
2012-01-31 0:50 ` Marcel Holtmann
2012-01-30 22:29 ` [PATCH 7/8] Bluetooth: Clean up structures left unused Vinicius Costa Gomes
2012-01-30 22:49 ` Marcel Holtmann
2012-01-30 22:29 ` [PATCH 8/8] Bluetooth: Add support for notifying userspace of new LTK's Vinicius Costa Gomes
2012-01-30 22:50 ` Marcel Holtmann
-- strict thread matches above, loose matches on Subject: below --
2012-01-13 19:39 [PATCH 0/8] New MGMT messages for SMP Long Term Keys Vinicius Costa Gomes
2012-01-13 19:39 ` [PATCH 5/8] Bluetooth: Add MGMT handlers for dealing with SMP LTK's Vinicius Costa Gomes
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=20120130232708.GC17656@samus \
--to=vinicius.gomes@openbossa.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.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).