This patch replaces decrementing ttl explicitly with the
IEEE80211_IFSTA_MESH_CTR_INC macro in mesh_hwmp.c
Signed-off-by: Rami Rosen <[email protected]>
--
(wireless-testing)
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index 4f862b2..1828d80 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -507,7 +507,7 @@ static void hwmp_prep_frame_process(struct
ieee80211_sub_if_data *sdata,
ttl = PREP_IE_TTL(prep_elem);
if (ttl <= 1) {
- sdata->u.mesh.mshstats.dropped_frames_ttl++;
+ IEEE80211_IFSTA_MESH_CTR_INC(&sdata->u.mesh,dropped_frames_ttl);
return;
}
@@ -735,7 +735,7 @@ void mesh_path_start_discovery(struct
ieee80211_sub_if_data *sdata)
lifetime = default_lifetime(sdata);
ttl = sdata->u.mesh.mshcfg.dot11MeshTTL;
if (ttl == 0) {
- sdata->u.mesh.mshstats.dropped_frames_ttl++;
+ IEEE80211_IFSTA_MESH_CTR_INC(&sdata->u.mesh,dropped_frames_ttl);
spin_unlock_bh(&mpath->state_lock);
goto enddiscovery;
}
On Mon, 2009-01-19 at 13:50 +0200, Rami Rosen wrote:
> This patch replaces decrementing ttl explicitly with the
> IEEE80211_IFSTA_MESH_CTR_INC macro in mesh_hwmp.c
>
>
> Signed-off-by: Rami Rosen <[email protected]>
>
> --
> (wireless-testing)
>
> diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
> index 4f862b2..1828d80 100644
> --- a/net/mac80211/mesh_hwmp.c
> +++ b/net/mac80211/mesh_hwmp.c
> @@ -507,7 +507,7 @@ static void hwmp_prep_frame_process(struct
> ieee80211_sub_if_data *sdata,
>
> ttl = PREP_IE_TTL(prep_elem);
> if (ttl <= 1) {
> - sdata->u.mesh.mshstats.dropped_frames_ttl++;
> + IEEE80211_IFSTA_MESH_CTR_INC(&sdata->u.mesh,dropped_frames_ttl);
For one, this is whitespace damaged, secondly, it's not necessary to use
the macro in a mesh-only file.
johannes