Linux bluetooth development
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: Brian Gix <bgix@codeaurora.org>, linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 3/5] Bluetooth: Add User Passkey entry to HCI Events
Date: Sat, 12 Nov 2011 11:29:26 +0200	[thread overview]
Message-ID: <20111112092926.GA6151@fusion.localdomain> (raw)
In-Reply-To: <1321081199.15441.430.camel@aeonflux>

Hi,

On Sat, Nov 12, 2011, Marcel Holtmann wrote:
> > +static inline void hci_user_passkey_request_evt(struct hci_dev *hdev,
> > +							struct sk_buff *skb)
> > +{
> > +	struct hci_ev_user_passkey_req *ev = (void *) skb->data;
> > +
> > +	BT_DBG("%s", hdev->name);
> > +
> > +	hci_dev_lock(hdev);
> > +
> > +	/* Passkey Request is a degenerate case of User Confirm */
> > +	if (test_bit(HCI_MGMT, &hdev->flags))
> > +		mgmt_user_confirm_request(hdev, &ev->bdaddr, 0, 0);
> > +	else
> > +		hci_send_cmd(hdev, HCI_OP_USER_PASSKEY_NEG_REPLY,
> > +					sizeof(ev->bdaddr), &ev->bdaddr);
> 
> We might want a comment here that this needs fixing ;)

If HCI_MGMT isn't set this code should do nothing. In such a case it's
likely that hciops is running in user-space and will take care of this
request.

Johan

  reply	other threads:[~2011-11-12  9:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-12  0:23 [PATCH 0/5] Bluetooth: Add MITM protection to SMP Brian Gix
2011-11-12  0:23 ` [PATCH 1/5] Bluetooth: Add SMP support to user_confirm_reply Brian Gix
2011-11-12  6:52   ` Marcel Holtmann
2011-11-12  0:23 ` [PATCH 2/5] Bluetooth: Add MGMT opcode for User Passkey entry Brian Gix
2011-11-12  6:57   ` Marcel Holtmann
2011-11-12  0:23 ` [PATCH 3/5] Bluetooth: Add User Passkey entry to HCI Events Brian Gix
2011-11-12  6:59   ` Marcel Holtmann
2011-11-12  9:29     ` Johan Hedberg [this message]
2011-11-12  0:24 ` [PATCH 4/5] Bluetooth: Cleanup blkcipher on SMP termination Brian Gix
2011-11-12  7:01   ` Marcel Holtmann
2011-11-12  0:24 ` [PATCH 5/5] Bluetooth: Add support for MITM LE-SMP pairing Brian Gix
2011-11-12 23:12   ` 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=20111112092926.GA6151@fusion.localdomain \
    --to=johan.hedberg@gmail.com \
    --cc=bgix@codeaurora.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