diff options
-rw-r--r-- | net/mac80211/debugfs_netdev.c | 6 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 6 | ||||
-rw-r--r-- | net/mac80211/mesh_hwmp.c | 3 | ||||
-rw-r--r-- | net/mac80211/rx.c | 8 |
4 files changed, 21 insertions, 2 deletions
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c index e9ec6cae2d39..61234e79022b 100644 --- a/net/mac80211/debugfs_netdev.c +++ b/net/mac80211/debugfs_netdev.c | |||
@@ -116,6 +116,8 @@ IEEE80211_IF_FILE(peer, u.wds.remote_addr, MAC); | |||
116 | 116 | ||
117 | #ifdef CONFIG_MAC80211_MESH | 117 | #ifdef CONFIG_MAC80211_MESH |
118 | /* Mesh stats attributes */ | 118 | /* Mesh stats attributes */ |
119 | IEEE80211_IF_FILE(fwded_mcast, u.mesh.mshstats.fwded_mcast, DEC); | ||
120 | IEEE80211_IF_FILE(fwded_unicast, u.mesh.mshstats.fwded_unicast, DEC); | ||
119 | IEEE80211_IF_FILE(fwded_frames, u.mesh.mshstats.fwded_frames, DEC); | 121 | IEEE80211_IF_FILE(fwded_frames, u.mesh.mshstats.fwded_frames, DEC); |
120 | IEEE80211_IF_FILE(dropped_frames_ttl, u.mesh.mshstats.dropped_frames_ttl, DEC); | 122 | IEEE80211_IF_FILE(dropped_frames_ttl, u.mesh.mshstats.dropped_frames_ttl, DEC); |
121 | IEEE80211_IF_FILE(dropped_frames_no_route, | 123 | IEEE80211_IF_FILE(dropped_frames_no_route, |
@@ -205,6 +207,8 @@ static void add_mesh_stats(struct ieee80211_sub_if_data *sdata) | |||
205 | { | 207 | { |
206 | sdata->mesh_stats_dir = debugfs_create_dir("mesh_stats", | 208 | sdata->mesh_stats_dir = debugfs_create_dir("mesh_stats", |
207 | sdata->debugfsdir); | 209 | sdata->debugfsdir); |
210 | MESHSTATS_ADD(fwded_mcast); | ||
211 | MESHSTATS_ADD(fwded_unicast); | ||
208 | MESHSTATS_ADD(fwded_frames); | 212 | MESHSTATS_ADD(fwded_frames); |
209 | MESHSTATS_ADD(dropped_frames_ttl); | 213 | MESHSTATS_ADD(dropped_frames_ttl); |
210 | MESHSTATS_ADD(dropped_frames_no_route); | 214 | MESHSTATS_ADD(dropped_frames_no_route); |
@@ -327,6 +331,8 @@ static void del_monitor_files(struct ieee80211_sub_if_data *sdata) | |||
327 | 331 | ||
328 | static void del_mesh_stats(struct ieee80211_sub_if_data *sdata) | 332 | static void del_mesh_stats(struct ieee80211_sub_if_data *sdata) |
329 | { | 333 | { |
334 | MESHSTATS_DEL(fwded_mcast); | ||
335 | MESHSTATS_DEL(fwded_unicast); | ||
330 | MESHSTATS_DEL(fwded_frames); | 336 | MESHSTATS_DEL(fwded_frames); |
331 | MESHSTATS_DEL(dropped_frames_ttl); | 337 | MESHSTATS_DEL(dropped_frames_ttl); |
332 | MESHSTATS_DEL(dropped_frames_no_route); | 338 | MESHSTATS_DEL(dropped_frames_no_route); |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index a07f01736a91..93e618a980d1 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -212,7 +212,9 @@ struct ieee80211_if_vlan { | |||
212 | }; | 212 | }; |
213 | 213 | ||
214 | struct mesh_stats { | 214 | struct mesh_stats { |
215 | __u32 fwded_frames; /* Mesh forwarded frames */ | 215 | __u32 fwded_mcast; /* Mesh forwarded multicast frames */ |
216 | __u32 fwded_unicast; /* Mesh forwarded unicast frames */ | ||
217 | __u32 fwded_frames; /* Mesh total forwarded frames */ | ||
216 | __u32 dropped_frames_ttl; /* Not transmitted since mesh_ttl == 0*/ | 218 | __u32 dropped_frames_ttl; /* Not transmitted since mesh_ttl == 0*/ |
217 | __u32 dropped_frames_no_route; /* Not transmitted, no route found */ | 219 | __u32 dropped_frames_no_route; /* Not transmitted, no route found */ |
218 | atomic_t estab_plinks; | 220 | atomic_t estab_plinks; |
@@ -506,6 +508,8 @@ struct ieee80211_sub_if_data { | |||
506 | #ifdef CONFIG_MAC80211_MESH | 508 | #ifdef CONFIG_MAC80211_MESH |
507 | struct dentry *mesh_stats_dir; | 509 | struct dentry *mesh_stats_dir; |
508 | struct { | 510 | struct { |
511 | struct dentry *fwded_mcast; | ||
512 | struct dentry *fwded_unicast; | ||
509 | struct dentry *fwded_frames; | 513 | struct dentry *fwded_frames; |
510 | struct dentry *dropped_frames_ttl; | 514 | struct dentry *dropped_frames_ttl; |
511 | struct dentry *dropped_frames_no_route; | 515 | struct dentry *dropped_frames_no_route; |
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c index 7aeba00ac502..e12a786e26b8 100644 --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c | |||
@@ -497,6 +497,7 @@ static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata, | |||
497 | hopcount, ttl, cpu_to_le32(lifetime), | 497 | hopcount, ttl, cpu_to_le32(lifetime), |
498 | cpu_to_le32(metric), cpu_to_le32(preq_id), | 498 | cpu_to_le32(metric), cpu_to_le32(preq_id), |
499 | sdata); | 499 | sdata); |
500 | ifmsh->mshstats.fwded_mcast++; | ||
500 | ifmsh->mshstats.fwded_frames++; | 501 | ifmsh->mshstats.fwded_frames++; |
501 | } | 502 | } |
502 | } | 503 | } |
@@ -555,6 +556,8 @@ static void hwmp_prep_frame_process(struct ieee80211_sub_if_data *sdata, | |||
555 | cpu_to_le32(lifetime), cpu_to_le32(metric), | 556 | cpu_to_le32(lifetime), cpu_to_le32(metric), |
556 | 0, sdata); | 557 | 0, sdata); |
557 | rcu_read_unlock(); | 558 | rcu_read_unlock(); |
559 | |||
560 | sdata->u.mesh.mshstats.fwded_unicast++; | ||
558 | sdata->u.mesh.mshstats.fwded_frames++; | 561 | sdata->u.mesh.mshstats.fwded_frames++; |
559 | return; | 562 | return; |
560 | 563 | ||
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 4cd9e45b1443..7065fd7e7ba2 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -1550,7 +1550,10 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx) | |||
1550 | info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING; | 1550 | info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING; |
1551 | info->control.vif = &rx->sdata->vif; | 1551 | info->control.vif = &rx->sdata->vif; |
1552 | ieee80211_select_queue(local, fwd_skb); | 1552 | ieee80211_select_queue(local, fwd_skb); |
1553 | if (!is_multicast_ether_addr(fwd_hdr->addr1)) { | 1553 | if (is_multicast_ether_addr(fwd_hdr->addr1)) |
1554 | IEEE80211_IFSTA_MESH_CTR_INC(&sdata->u.mesh, | ||
1555 | fwded_mcast); | ||
1556 | else { | ||
1554 | int err; | 1557 | int err; |
1555 | /* | 1558 | /* |
1556 | * Save TA to addr1 to send TA a path error if a | 1559 | * Save TA to addr1 to send TA a path error if a |
@@ -1564,6 +1567,9 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx) | |||
1564 | * later to the pending skb queue. */ | 1567 | * later to the pending skb queue. */ |
1565 | if (err) | 1568 | if (err) |
1566 | return RX_DROP_MONITOR; | 1569 | return RX_DROP_MONITOR; |
1570 | |||
1571 | IEEE80211_IFSTA_MESH_CTR_INC(&sdata->u.mesh, | ||
1572 | fwded_unicast); | ||
1567 | } | 1573 | } |
1568 | IEEE80211_IFSTA_MESH_CTR_INC(&sdata->u.mesh, | 1574 | IEEE80211_IFSTA_MESH_CTR_INC(&sdata->u.mesh, |
1569 | fwded_frames); | 1575 | fwded_frames); |