Search Linux Wireless

Re: [PATCH v2] mac80211: fix the RANN propagation issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday, March 22, 2012 20:13:28 Javier Cardona wrote:
> On Thu, Mar 22, 2012 at 11:58 AM, Marek Lindner <lindner_marek@xxxxxxxx> 
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
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux