All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: SpoorthiX K <spoorthix.k@intel.com>
Cc: linux-bluetooth@vger.kernel.org, linux-bluetooth-owner@vger.kernel.org
Subject: Re: [PATCH] Add Support for LE Ping feature
Date: Wed, 27 Mar 2019 18:29:47 +0100	[thread overview]
Message-ID: <A7F336FF-1D53-4DC9-94ED-392011649A5E@gmail.com> (raw)
In-Reply-To: <1553661793-10304-1-git-send-email-spoorthix.k@intel.com>

Hi Spoorthi,

On 27 Mar 2019, at 5.43, SpoorthiX K <spoorthix.k@intel.com> wrote:
> +#define HCI_OP_WRITE_AUTH_PAYLOAD_TO    0x0c7c
> +struct hci_cp_write_auth_payload_to {
> +	__le16	handle;
> +	__u16	timeout;

As Marcel (and now also the build test robot) pointed out this should be __le16.

> #if IS_ENABLED(CONFIG_BT_LEDS)
> 	struct led_trigger	*power_led;
> @@ -500,6 +501,7 @@ struct hci_conn {
> 	__u8		remote_id;
> 
> 	unsigned int	sent;
> +	bool		auth_payload_timeout_set;

Would it make sense to add this to the flags instead of increasing the hci_conn struct size?

> +	/* Set the default Authenticated Payload Timeout after
> +	 * an LE Link is established.

The test further below also includes BR/EDR links, i.e. the above comment doesn’t match that.

> +	 * Section 3.3, the HCI command WRITE_AUTH_PAYLOAD_TIMEOUT should be
> +	 * sent when the link is active and Encryption is enabled, the conn
> +	 * type can be either LE or ACL and controller must support LMP Ping.
> +	 * Ensure for AES-CCM encryption as well.
> +	 */
> +	if ((conn->type == LE_LINK || conn->type == ACL_LINK) &

That ‘&’ the end should probably be a ‘&&’, shouldn’t it?

> +	} else {
> +		conn->state = BT_CONNECTED;
> +		hci_connect_cfm(conn, ev->status);
> +	}

Why is this being added? Such a transition to BT_CONNECTED state at this point in the code didn’t exist previously, and this doesn’t seem to be related to the new feature.

Johan

  parent reply	other threads:[~2019-03-27 17:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-27  4:43 [PATCH] Add Support for LE Ping feature SpoorthiX K
2019-03-27 13:38 ` kbuild test robot
2019-03-27 17:29 ` Johan Hedberg [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-03-25 10:52 SpoorthiX K
2019-03-25 12:01 ` Marcel Holtmann
2019-03-18 10:37 [PATCH] Add support for LE ping feature SpoorthiX K
2019-03-18 17:02 ` Marcel Holtmann
2019-03-18 21:10 ` kbuild test robot

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=A7F336FF-1D53-4DC9-94ED-392011649A5E@gmail.com \
    --to=johan.hedberg@gmail.com \
    --cc=linux-bluetooth-owner@vger.kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=spoorthix.k@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.