Linux bluetooth development
 help / color / mirror / Atom feed
From: "Gix, Brian" <brian.gix@intel.com>
To: "michal.lowas-rzechonek@silvair.com" 
	<michal.lowas-rzechonek@silvair.com>
Cc: "linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>,
	"Stotland, Inga" <inga.stotland@intel.com>
Subject: Re: [PATCH BlueZ] mesh: Implement provisioning loop-back
Date: Sat, 11 Jan 2020 00:53:15 +0000	[thread overview]
Message-ID: <e2042727d45c227344bc1ded696b28b66bb45a93.camel@intel.com> (raw)
In-Reply-To: <20200110234709.ihnstfmahenstspp@kynes>

On Sat, 2020-01-11 at 00:47 +0100, Michał Lowas-Rzechonek wrote:
> Hi Brian,
> 
> On 01/10, Brian Gix wrote:
> > This allows one App using the mesh daemon to provision another.
> 
> This patch contains also some wording cosmetics and other PB-ADV fixes
> that don't seem related to the loopback mechanism.
> 
> Could you please split this into a patchset?

Sure, I will look at this.

> > (...)
> > +	if (session->loop)
> > +		loop_adv(session->loop, buf, init_size + 10);
> > +	else
> > +		mesh_send_pkt(MESH_IO_TX_COUNT_UNLIMITED, 200,
> > +							buf, init_size + 10);
> 
> This condition check is repeated throughout the code. I think it would
> be clearer to replace mesh_send_pkt usages with something like:

Yeah, I can probably do this...  One reason I didn't was because of the count/interval differences from packet
to packet, but sure I could add a level of nesting there...

> 
> static void pb_adv_send(struct pb_adv_session *session, uint8_t count,
> 				uint16_t interval, void *data, uint16_t len)
> {
> 	if (session->loop) {
> 		struct idle_rx *rx = ...
> 	} else {
> 		mesh_send_pkt(count, interval, data, len);
> 	}
> }
> 

      reply	other threads:[~2020-01-11  0:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-10 18:14 [PATCH BlueZ] mesh: Implement provisioning loop-back Brian Gix
2020-01-10 23:47 ` Michał Lowas-Rzechonek
2020-01-11  0:53   ` Gix, Brian [this message]

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=e2042727d45c227344bc1ded696b28b66bb45a93.camel@intel.com \
    --to=brian.gix@intel.com \
    --cc=inga.stotland@intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=michal.lowas-rzechonek@silvair.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox