aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJavier Cardona <javier@cozybit.com>2007-05-25 12:12:06 -0400
committerJohn W. Linville <linville@tuxdriver.com>2007-06-11 14:28:39 -0400
commit0601e7ee463f2736586de9a24025f8791db7f5a8 (patch)
treee6307e09ced771509d170100fb99b32a4820d04c /drivers
parent6a8121572e2f2d188f04673bfa460ccfcedeb008 (diff)
[PATCH] libertas: added transmission failures to mesh statistics
Added transmission failures to mesh statistics. Removed whitespace before newlines. Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/libertas/dev.h1
-rw-r--r--drivers/net/wireless/libertas/ethtool.c5
-rw-r--r--drivers/net/wireless/libertas/hostcmd.h6
3 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h
index 0dc4fc3b0b23..d7673c91f480 100644
--- a/drivers/net/wireless/libertas/dev.h
+++ b/drivers/net/wireless/libertas/dev.h
@@ -123,6 +123,7 @@ struct wlan_mesh_stats {
123 u32 fwd_drop_noroute; /* Fwd: No route to Destination */ 123 u32 fwd_drop_noroute; /* Fwd: No route to Destination */
124 u32 fwd_drop_nobuf; /* Fwd: Run out of internal buffers */ 124 u32 fwd_drop_nobuf; /* Fwd: Run out of internal buffers */
125 u32 drop_blind; /* Rx: Dropped by blinding table */ 125 u32 drop_blind; /* Rx: Dropped by blinding table */
126 u32 tx_failed_cnt; /* Tx: Failed transmissions */
126}; 127};
127 128
128/** Private structure for the MV device */ 129/** Private structure for the MV device */
diff --git a/drivers/net/wireless/libertas/ethtool.c b/drivers/net/wireless/libertas/ethtool.c
index 4655953730cc..c3a26fce02ca 100644
--- a/drivers/net/wireless/libertas/ethtool.c
+++ b/drivers/net/wireless/libertas/ethtool.c
@@ -17,7 +17,8 @@ static const char * mesh_stat_strings[]= {
17 "drop_no_buffers", 17 "drop_no_buffers",
18 "fwded_unicast_cnt", 18 "fwded_unicast_cnt",
19 "fwded_bcast_cnt", 19 "fwded_bcast_cnt",
20 "drop_blind_table" 20 "drop_blind_table",
21 "tx_failed_cnt"
21}; 22};
22 23
23static void libertas_ethtool_get_drvinfo(struct net_device *dev, 24static void libertas_ethtool_get_drvinfo(struct net_device *dev,
@@ -124,6 +125,7 @@ static void libertas_ethtool_get_stats(struct net_device * dev,
124 data[4] = priv->mstats.fwd_unicast_cnt; 125 data[4] = priv->mstats.fwd_unicast_cnt;
125 data[5] = priv->mstats.fwd_bcast_cnt; 126 data[5] = priv->mstats.fwd_bcast_cnt;
126 data[6] = priv->mstats.drop_blind; 127 data[6] = priv->mstats.drop_blind;
128 data[7] = priv->mstats.tx_failed_cnt;
127 129
128 lbs_deb_enter(LBS_DEB_ETHTOOL); 130 lbs_deb_enter(LBS_DEB_ETHTOOL);
129} 131}
@@ -153,6 +155,7 @@ static int libertas_ethtool_get_stats_count(struct net_device * dev)
153 priv->mstats.fwd_unicast_cnt = mesh_access.data[4]; 155 priv->mstats.fwd_unicast_cnt = mesh_access.data[4];
154 priv->mstats.fwd_bcast_cnt = mesh_access.data[5]; 156 priv->mstats.fwd_bcast_cnt = mesh_access.data[5];
155 priv->mstats.drop_blind = mesh_access.data[6]; 157 priv->mstats.drop_blind = mesh_access.data[6];
158 priv->mstats.tx_failed_cnt = mesh_access.data[7];
156 159
157 ret = MESH_STATS_NUM; 160 ret = MESH_STATS_NUM;
158 161
diff --git a/drivers/net/wireless/libertas/hostcmd.h b/drivers/net/wireless/libertas/hostcmd.h
index f239e5d2435b..e7745fc2865e 100644
--- a/drivers/net/wireless/libertas/hostcmd.h
+++ b/drivers/net/wireless/libertas/hostcmd.h
@@ -621,12 +621,14 @@ struct cmd_ds_fwt_access {
621 u32 references; 621 u32 references;
622} __attribute__ ((packed)); 622} __attribute__ ((packed));
623 623
624#define MESH_STATS_NUM 7
625struct cmd_ds_mesh_access { 624struct cmd_ds_mesh_access {
626 u16 action; 625 u16 action;
627 u32 data[MESH_STATS_NUM + 1]; /* last position reserved */ 626 u32 data[32]; /* last position reserved */
628} __attribute__ ((packed)); 627} __attribute__ ((packed));
629 628
629/* Number of stats counters returned by the firmware */
630#define MESH_STATS_NUM 8
631
630struct cmd_ds_command { 632struct cmd_ds_command {
631 /* command header */ 633 /* command header */
632 u16 command; 634 u16 command;