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>
This commit is contained in:
parent
eea57d42fb
commit
1258d97616
5 changed files with 6 additions and 6 deletions
|
@ -471,7 +471,7 @@ IEEE80211_IF_FILE(dropped_frames_congestion,
|
||||||
u.mesh.mshstats.dropped_frames_congestion, DEC);
|
u.mesh.mshstats.dropped_frames_congestion, DEC);
|
||||||
IEEE80211_IF_FILE(dropped_frames_no_route,
|
IEEE80211_IF_FILE(dropped_frames_no_route,
|
||||||
u.mesh.mshstats.dropped_frames_no_route, DEC);
|
u.mesh.mshstats.dropped_frames_no_route, DEC);
|
||||||
IEEE80211_IF_FILE(estab_plinks, u.mesh.mshstats.estab_plinks, ATOMIC);
|
IEEE80211_IF_FILE(estab_plinks, u.mesh.estab_plinks, ATOMIC);
|
||||||
|
|
||||||
/* Mesh parameters */
|
/* Mesh parameters */
|
||||||
IEEE80211_IF_FILE(dot11MeshMaxRetries,
|
IEEE80211_IF_FILE(dot11MeshMaxRetries,
|
||||||
|
|
|
@ -316,7 +316,6 @@ struct mesh_stats {
|
||||||
__u32 dropped_frames_ttl; /* Not transmitted since mesh_ttl == 0*/
|
__u32 dropped_frames_ttl; /* Not transmitted since mesh_ttl == 0*/
|
||||||
__u32 dropped_frames_no_route; /* Not transmitted, no route found */
|
__u32 dropped_frames_no_route; /* Not transmitted, no route found */
|
||||||
__u32 dropped_frames_congestion;/* Not forwarded due to congestion */
|
__u32 dropped_frames_congestion;/* Not forwarded due to congestion */
|
||||||
atomic_t estab_plinks;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define PREQ_Q_F_START 0x1
|
#define PREQ_Q_F_START 0x1
|
||||||
|
@ -599,6 +598,7 @@ struct ieee80211_if_mesh {
|
||||||
int preq_queue_len;
|
int preq_queue_len;
|
||||||
struct mesh_stats mshstats;
|
struct mesh_stats mshstats;
|
||||||
struct mesh_config mshcfg;
|
struct mesh_config mshcfg;
|
||||||
|
atomic_t estab_plinks;
|
||||||
u32 mesh_seqnum;
|
u32 mesh_seqnum;
|
||||||
bool accepting_plinks;
|
bool accepting_plinks;
|
||||||
int num_gates;
|
int num_gates;
|
||||||
|
|
|
@ -264,7 +264,7 @@ mesh_add_meshconf_ie(struct sk_buff *skb, struct ieee80211_sub_if_data *sdata)
|
||||||
/* Authentication Protocol identifier */
|
/* Authentication Protocol identifier */
|
||||||
*pos++ = ifmsh->mesh_auth_id;
|
*pos++ = ifmsh->mesh_auth_id;
|
||||||
/* Mesh Formation Info - number of neighbors */
|
/* Mesh Formation Info - number of neighbors */
|
||||||
neighbors = atomic_read(&ifmsh->mshstats.estab_plinks);
|
neighbors = atomic_read(&ifmsh->estab_plinks);
|
||||||
/* Number of neighbor mesh STAs or 15 whichever is smaller */
|
/* Number of neighbor mesh STAs or 15 whichever is smaller */
|
||||||
neighbors = (neighbors > 15) ? 15 : neighbors;
|
neighbors = (neighbors > 15) ? 15 : neighbors;
|
||||||
*pos++ = neighbors << 1;
|
*pos++ = neighbors << 1;
|
||||||
|
|
|
@ -324,7 +324,7 @@ extern int mesh_allocated;
|
||||||
static inline int mesh_plink_free_count(struct ieee80211_sub_if_data *sdata)
|
static inline int mesh_plink_free_count(struct ieee80211_sub_if_data *sdata)
|
||||||
{
|
{
|
||||||
return sdata->u.mesh.mshcfg.dot11MeshMaxPeerLinks -
|
return sdata->u.mesh.mshcfg.dot11MeshMaxPeerLinks -
|
||||||
atomic_read(&sdata->u.mesh.mshstats.estab_plinks);
|
atomic_read(&sdata->u.mesh.estab_plinks);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool mesh_plink_availables(struct ieee80211_sub_if_data *sdata)
|
static inline bool mesh_plink_availables(struct ieee80211_sub_if_data *sdata)
|
||||||
|
|
|
@ -50,14 +50,14 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata,
|
||||||
static inline
|
static inline
|
||||||
u32 mesh_plink_inc_estab_count(struct ieee80211_sub_if_data *sdata)
|
u32 mesh_plink_inc_estab_count(struct ieee80211_sub_if_data *sdata)
|
||||||
{
|
{
|
||||||
atomic_inc(&sdata->u.mesh.mshstats.estab_plinks);
|
atomic_inc(&sdata->u.mesh.estab_plinks);
|
||||||
return mesh_accept_plinks_update(sdata);
|
return mesh_accept_plinks_update(sdata);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline
|
static inline
|
||||||
u32 mesh_plink_dec_estab_count(struct ieee80211_sub_if_data *sdata)
|
u32 mesh_plink_dec_estab_count(struct ieee80211_sub_if_data *sdata)
|
||||||
{
|
{
|
||||||
atomic_dec(&sdata->u.mesh.mshstats.estab_plinks);
|
atomic_dec(&sdata->u.mesh.estab_plinks);
|
||||||
return mesh_accept_plinks_update(sdata);
|
return mesh_accept_plinks_update(sdata);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue