2012-11-06 21:43:56

by Chaoxing Lin

[permalink] [raw]
Subject: minor bug on these three macros for mesh

Net/mac80211/mesh_hwmp.c

#define max_preq_retries(s) (s->u.mesh.mshcfg.dot11MeshHWMPmaxPREQretries)
#define disc_timeout_jiff(s) \
msecs_to_jiffies(sdata->u.mesh.mshcfg.min_discovery_timeout)
#define root_path_confirmation_jiffies(s) \
msecs_to_jiffies(sdata->u.mesh.mshcfg.dot11MeshHWMPconfirmationInterval)


The "sdata" in these 3 macros should be "s".
For now, code just happens to work since caller always passes in "sdata"



2012-11-06 22:11:36

by Johannes Berg

[permalink] [raw]
Subject: Re: minor bug on these three macros for mesh

On Tue, 2012-11-06 at 21:43 +0000, Chaoxing Lin wrote:
> Net/mac80211/mesh_hwmp.c
>
> #define max_preq_retries(s) (s->u.mesh.mshcfg.dot11MeshHWMPmaxPREQretries)
> #define disc_timeout_jiff(s) \
> msecs_to_jiffies(sdata->u.mesh.mshcfg.min_discovery_timeout)
> #define root_path_confirmation_jiffies(s) \
> msecs_to_jiffies(sdata->u.mesh.mshcfg.dot11MeshHWMPconfirmationInterval)
>
>
> The "sdata" in these 3 macros should be "s".
> For now, code just happens to work since caller always passes in "sdata"

They should probably all just be static inlines, care to send a patch?

johannes