aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAshok Nagarajan <ashok@cozybit.com>2012-10-09 16:27:47 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-10-17 05:02:13 -0400
commit1258d97616fdca9abc0c21f2edeb1d5b21dcb128 (patch)
treea882b7f737871aae3a3351ed735b327de861fd23
parenteea57d42fb148a078ebc2f54731b580fb9edeaf7 (diff)
mac80211: move out the non-statistics variable estab_plinks from mesh_stat
estab_plinks is not a statistics member. Hence move estab_plinks from struct mesh_stat to struct ieee80211_if_mesh Signed-off-by: Ashok Nagarajan <ashok@cozybit.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--net/mac80211/debugfs_netdev.c2
-rw-r--r--net/mac80211/ieee80211_i.h2
-rw-r--r--net/mac80211/mesh.c2
-rw-r--r--net/mac80211/mesh.h2
-rw-r--r--net/mac80211/mesh_plink.c4
5 files changed, 6 insertions, 6 deletions
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
index 34e17397657..8802b8d7be1 100644
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -471,7 +471,7 @@ IEEE80211_IF_FILE(dropped_frames_congestion,
471 u.mesh.mshstats.dropped_frames_congestion, DEC); 471 u.mesh.mshstats.dropped_frames_congestion, DEC);
472IEEE80211_IF_FILE(dropped_frames_no_route, 472IEEE80211_IF_FILE(dropped_frames_no_route,
473 u.mesh.mshstats.dropped_frames_no_route, DEC); 473 u.mesh.mshstats.dropped_frames_no_route, DEC);
474IEEE80211_IF_FILE(estab_plinks, u.mesh.mshstats.estab_plinks, ATOMIC); 474IEEE80211_IF_FILE(estab_plinks, u.mesh.estab_plinks, ATOMIC);
475 475
476/* Mesh parameters */ 476/* Mesh parameters */
477IEEE80211_IF_FILE(dot11MeshMaxRetries, 477IEEE80211_IF_FILE(dot11MeshMaxRetries,
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index f17c41acb31..b7382454d0a 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -316,7 +316,6 @@ struct mesh_stats {
316 __u32 dropped_frames_ttl; /* Not transmitted since mesh_ttl == 0*/ 316 __u32 dropped_frames_ttl; /* Not transmitted since mesh_ttl == 0*/
317 __u32 dropped_frames_no_route; /* Not transmitted, no route found */ 317 __u32 dropped_frames_no_route; /* Not transmitted, no route found */
318 __u32 dropped_frames_congestion;/* Not forwarded due to congestion */ 318 __u32 dropped_frames_congestion;/* Not forwarded due to congestion */
319 atomic_t estab_plinks;
320}; 319};
321 320
322#define PREQ_Q_F_START 0x1 321#define PREQ_Q_F_START 0x1
@@ -599,6 +598,7 @@ struct ieee80211_if_mesh {
599 int preq_queue_len; 598 int preq_queue_len;
600 struct mesh_stats mshstats; 599 struct mesh_stats mshstats;
601 struct mesh_config mshcfg; 600 struct mesh_config mshcfg;
601 atomic_t estab_plinks;
602 u32 mesh_seqnum; 602 u32 mesh_seqnum;
603 bool accepting_plinks; 603 bool accepting_plinks;
604 int num_gates; 604 int num_gates;
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index 19725e0a051..5bed4fd5ee1 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -264,7 +264,7 @@ mesh_add_meshconf_ie(struct sk_buff *skb, struct ieee80211_sub_if_data *sdata)
264 /* Authentication Protocol identifier */ 264 /* Authentication Protocol identifier */
265 *pos++ = ifmsh->mesh_auth_id; 265 *pos++ = ifmsh->mesh_auth_id;
266 /* Mesh Formation Info - number of neighbors */ 266 /* Mesh Formation Info - number of neighbors */
267 neighbors = atomic_read(&ifmsh->mshstats.estab_plinks); 267 neighbors = atomic_read(&ifmsh->estab_plinks);
268 /* Number of neighbor mesh STAs or 15 whichever is smaller */ 268 /* Number of neighbor mesh STAs or 15 whichever is smaller */
269 neighbors = (neighbors > 15) ? 15 : neighbors; 269 neighbors = (neighbors > 15) ? 15 : neighbors;
270 *pos++ = neighbors << 1; 270 *pos++ = neighbors << 1;
diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h
index 25d0f17dec7..8334e944519 100644
--- a/net/mac80211/mesh.h
+++ b/net/mac80211/mesh.h
@@ -324,7 +324,7 @@ extern int mesh_allocated;
324static inline int mesh_plink_free_count(struct ieee80211_sub_if_data *sdata) 324static inline int mesh_plink_free_count(struct ieee80211_sub_if_data *sdata)
325{ 325{
326 return sdata->u.mesh.mshcfg.dot11MeshMaxPeerLinks - 326 return sdata->u.mesh.mshcfg.dot11MeshMaxPeerLinks -
327 atomic_read(&sdata->u.mesh.mshstats.estab_plinks); 327 atomic_read(&sdata->u.mesh.estab_plinks);
328} 328}
329 329
330static inline bool mesh_plink_availables(struct ieee80211_sub_if_data *sdata) 330static inline bool mesh_plink_availables(struct ieee80211_sub_if_data *sdata)
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index 8a8b459610b..234fe755968 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -50,14 +50,14 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata,
50static inline 50static inline
51u32 mesh_plink_inc_estab_count(struct ieee80211_sub_if_data *sdata) 51u32 mesh_plink_inc_estab_count(struct ieee80211_sub_if_data *sdata)
52{ 52{
53 atomic_inc(&sdata->u.mesh.mshstats.estab_plinks); 53 atomic_inc(&sdata->u.mesh.estab_plinks);
54 return mesh_accept_plinks_update(sdata); 54 return mesh_accept_plinks_update(sdata);
55} 55}
56 56
57static inline 57static inline
58u32 mesh_plink_dec_estab_count(struct ieee80211_sub_if_data *sdata) 58u32 mesh_plink_dec_estab_count(struct ieee80211_sub_if_data *sdata)
59{ 59{
60 atomic_dec(&sdata->u.mesh.mshstats.estab_plinks); 60 atomic_dec(&sdata->u.mesh.estab_plinks);
61 return mesh_accept_plinks_update(sdata); 61 return mesh_accept_plinks_update(sdata);
62} 62}
63 63