Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH 4/4] mac80211: use IEEE80211_IFSTA_MESH_CTR_INC macro to increment ttl.
@ 2009-01-19 11:50 Rami Rosen
  2009-01-19 11:59 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Rami Rosen @ 2009-01-19 11:50 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, johannes, luisca

This patch replaces decrementing ttl explicitly with the
IEEE80211_IFSTA_MESH_CTR_INC macro in mesh_hwmp.c


Signed-off-by: Rami Rosen <ramirose@gmail.com>

--
(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;
 	}

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 4/4] mac80211: use IEEE80211_IFSTA_MESH_CTR_INC macro to increment ttl.
  2009-01-19 11:50 [PATCH 4/4] mac80211: use IEEE80211_IFSTA_MESH_CTR_INC macro to increment ttl Rami Rosen
@ 2009-01-19 11:59 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2009-01-19 11:59 UTC (permalink / raw)
  To: Rami Rosen; +Cc: linville, linux-wireless, luisca

[-- Attachment #1: Type: text/plain, Size: 830 bytes --]

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 <ramirose@gmail.com>
> 
> --
> (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

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-01-19 12:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-19 11:50 [PATCH 4/4] mac80211: use IEEE80211_IFSTA_MESH_CTR_INC macro to increment ttl Rami Rosen
2009-01-19 11:59 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox