From: Johan Hedberg <johan.hedberg@gmail.com>
To: Jaganath Kanakkassery <jaganath.k@samsung.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH v4] Bluetooth: Override status if local user rejects pairing
Date: Sun, 15 Jul 2012 18:02:31 +0300 [thread overview]
Message-ID: <20120715150231.GA1932@x220.P-661HNU-F1> (raw)
In-Reply-To: <1342188522-27623-1-git-send-email-jaganath.k@samsung.com>
Hi Jaganath,
On Fri, Jul 13, 2012, Jaganath Kanakkassery wrote:
> --- a/include/net/bluetooth/mgmt.h
> +++ b/include/net/bluetooth/mgmt.h
> @@ -42,6 +42,7 @@
> #define MGMT_STATUS_NOT_POWERED 0x0f
> #define MGMT_STATUS_CANCELLED 0x10
> #define MGMT_STATUS_INVALID_INDEX 0x11
> +#define MGMT_STATUS_AUTH_REJECTED 0x12
Why this? You didn't have it in v3. The existing STATUS_REJECTED should
be enough, right?
> @@ -2659,6 +2659,8 @@ static void hci_pin_code_request_evt(struct hci_dev *hdev, struct sk_buff *skb)
> else
> secure = 0;
>
> + conn->auth_rejected = false;
> +
> mgmt_pin_code_request(hdev, &ev->bdaddr, secure);
> }
>
I think it would be cleaner to set this to false immediately after the
conn lookup in this function. Also, when HCI_PAIRABLE is not set you
should set auth_rejected to true since that's also a local rejection
(even though it's an automatic one).
> @@ -3139,6 +3141,8 @@ static void hci_io_capa_request_evt(struct hci_dev *hdev, struct sk_buff *skb)
> else
> cp.oob_data = 0x00;
>
> + conn->auth_rejected = false;
> +
> hci_send_cmd(hdev, HCI_OP_IO_CAPABILITY_REPLY,
> sizeof(cp), &cp);
> } else {
Same here.
Johan
next prev parent reply other threads:[~2012-07-15 15:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-13 14:08 [PATCH v4] Bluetooth: Override status if local user rejects pairing Jaganath Kanakkassery
2012-07-15 15:02 ` Johan Hedberg [this message]
2012-07-16 8:02 ` 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=20120715150231.GA1932@x220.P-661HNU-F1 \
--to=johan.hedberg@gmail.com \
--cc=jaganath.k@samsung.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