Linux bluetooth development
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Alfonso Acosta <fons@spotify.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH v3] Bluetooth: Include ADV_IND report in Device Connected event
Date: Sat, 4 Oct 2014 16:24:38 +0300	[thread overview]
Message-ID: <20141004132438.GA314@t440s.P-661HNU-F1> (raw)
In-Reply-To: <1412338971-14306-1-git-send-email-fons@spotify.com>

Hi Alfonso,

On Fri, Oct 03, 2014, Alfonso Acosta wrote:
>  void mgmt_device_connected(struct hci_dev *hdev, struct hci_conn *conn,
> -			   u32 flags, u8 *name, u8 name_len);
> +			   u32 flags, u8 *name, u8 name_len,
> +			   u8 *adv, u8 adv_len);

Now that you're already passing the full hci_conn to this function I
guess it's a bit pointless to add new parameters to it which would
anyway come from that same hci_conn object.

>  void mgmt_device_connected(struct hci_dev *hdev, struct hci_conn *conn,
> -			   u32 flags, u8 *name, u8 name_len)
> +			   u32 flags, u8 *name, u8 name_len,
> +			   u8 *adv, u8 adv_len)
>  {
>  	char buf[512];
>  	struct mgmt_ev_device_connected *ev = (void *) buf;
> @@ -6183,13 +6184,24 @@ void mgmt_device_connected(struct hci_dev *hdev, struct hci_conn *conn,
>  
>  	ev->flags = __cpu_to_le32(flags);
>  
> -	if (name_len > 0)
> -		eir_len = eir_append_data(ev->eir, 0, EIR_NAME_COMPLETE,
> -					  name, name_len);
> +	/* We must ensure that the EIR Data fields are ordered and
> +	 * unique. Keep it simple for now and avoid the problem by not
> +	 * adding any BR/EDR data to the LE adv.
> +	 */
> +	if (adv) {

And once you do the earlier fix I suppose this check becomes:

	if (conn->le_adv_data_len > 0) {

Besides this one issue with the unnecessary extra parameters both of
your patches look good to me.

Johan

  reply	other threads:[~2014-10-04 13:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-03 12:22 [PATCH v3] Bluetooth: Include ADV_IND report in Device Connected event Alfonso Acosta
2014-10-04 13:24 ` Johan Hedberg [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-10-06 23:12 [PATCH v4] " Alfonso Acosta
2014-10-06 23:14 ` [PATCH v3] " Alfonso Acosta

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=20141004132438.GA314@t440s.P-661HNU-F1 \
    --to=johan.hedberg@gmail.com \
    --cc=fons@spotify.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