From: Marek Lindner <lindner_marek@yahoo.de>
To: Javier Cardona <javier@cozybit.com>
Cc: "Chun-Yeow Yeoh" <yeohchunyeow@gmail.com>,
linux-wireless@vger.kernel.org, johannes@sipsolutions.net,
thomas@cozybit.com, linville@tuxdriver.com,
devel@lists.open80211s.org
Subject: Re: [PATCH v2] mac80211: fix the RANN propagation issues
Date: Thu, 22 Mar 2012 20:35:49 +0100 [thread overview]
Message-ID: <201203222035.50568.lindner_marek@yahoo.de> (raw)
In-Reply-To: <CAPjQAd-j0mP9faqSkwuDWErX1v+dbzYqO+rL6sKN-2ZMYr_FGA@mail.gmail.com>
On Thursday, March 22, 2012 20:13:28 Javier Cardona wrote:
> On Thu, Mar 22, 2012 at 11:58 AM, Marek Lindner <lindner_marek@yahoo.de>
wrote:
> > On Thursday, March 22, 2012 17:31:33 Javier Cardona wrote:
> >> >> #define SN_GT(x, y) ((long) (y) - (long) (x) < 0)
> >> >> #define SN_LT(x, y) ((long) (x) - (long) (y) < 0)
> >> >
> >> > Your macros tried to address the problem but casting your sequence
> >> > number to long also breaks the wrap around.
> >>
> >> Ah, thanks for your help. I guess we do need those macros after all
> >> but they'd have to be re-written as
> >>
> >> #define SN_LT(x, y) ((s32)(x - y) < 0)
> >> #define SN_GT(x, y) ((s32)(x - y) > 0)
> >
> > No, you need unsigned values for this arithmetic to work (which is why
> > long also fails).
>
> The macro is always used on u32 values, so the arithmetic would be
> unsigned in this case.
Ok - then you should be on the safe side.
Regards,
Marek
next prev parent reply other threads:[~2012-03-22 19:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-22 12:56 [PATCH v2] mac80211: fix the RANN propagation issues Chun-Yeow Yeoh
2012-03-22 4:21 ` Javier Cardona
2012-03-22 10:33 ` Marek Lindner
2012-03-22 16:31 ` Javier Cardona
2012-03-22 18:58 ` Marek Lindner
2012-03-22 19:13 ` Javier Cardona
2012-03-22 19:35 ` Marek Lindner [this message]
2012-03-23 0:47 ` Yeoh Chun-Yeow
2012-03-23 0:54 ` Javier Cardona
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=201203222035.50568.lindner_marek@yahoo.de \
--to=lindner_marek@yahoo.de \
--cc=devel@lists.open80211s.org \
--cc=javier@cozybit.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=thomas@cozybit.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).