linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Cc: linux-wireless@vger.kernel.org, javier@cozybit.com,
	linville@tuxdriver.com, devel@lists.open80211s.org
Subject: Re: [PATCH] mac80211: Fix the generation of PREQs in proactive RANN mechanism of HWMP
Date: Tue, 21 Feb 2012 14:06:00 +0100	[thread overview]
Message-ID: <1329829560.3361.7.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1329829506.3361.6.camel@jlt3.sipsolutions.net> (sfid-20120221_140516_491524_D9C8E35C)

On Tue, 2012-02-21 at 14:05 +0100, Johannes Berg wrote:
> On Wed, 2012-02-22 at 02:53 +0800, Chun-Yeow Yeoh wrote:
> 
> > +++ b/net/mac80211/mesh_hwmp.c
> > @@ -590,12 +590,22 @@ static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata,
> >  		flags = PREQ_IE_FLAGS(preq_elem);
> >  		preq_id = PREQ_IE_PREQ_ID(preq_elem);
> >  		hopcount = PREQ_IE_HOPCOUNT(preq_elem) + 1;
> > +		if (mpath && mpath->is_root) {
> > +			mesh_path_sel_frame_tx(MPATH_PREQ, flags, orig_addr,
> > +				cpu_to_le32(orig_sn), target_flags, target_addr,
> > +				cpu_to_le32(target_sn), mpath->rann_snd_addr,
> > +				hopcount, ttl, cpu_to_le32(lifetime),
> > +				cpu_to_le32(metric), cpu_to_le32(preq_id),
> > +				sdata);
> > +			goto endpreq;
> > +		}
> >  		mesh_path_sel_frame_tx(MPATH_PREQ, flags, orig_addr,
> >  				cpu_to_le32(orig_sn), target_flags, target_addr,
> >  				cpu_to_le32(target_sn), broadcast_addr,
> >  				hopcount, ttl, cpu_to_le32(lifetime),
> >  				cpu_to_le32(metric), cpu_to_le32(preq_id),
> >  				sdata);
> > +endpreq:
> 
> maybe "else {..." instead of the goto?

actually, since only one parameter is different, it's probably better to
just introduce a local variable for that parameter.

johannes


      reply	other threads:[~2012-02-21 13:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-21 18:53 [PATCH] mac80211: Fix the generation of PREQs in proactive RANN mechanism of HWMP Chun-Yeow Yeoh
2012-02-21 13:05 ` Johannes Berg
2012-02-21 13:06   ` Johannes Berg [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=1329829560.3361.7.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=devel@lists.open80211s.org \
    --cc=javier@cozybit.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=yeohchunyeow@gmail.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;
as well as URLs for NNTP newsgroup(s).