[PATCH] libertas: added transmission failures to mesh statistics
Javier Cardona
javier at cozybit.com
Thu Mar 1 15:03:46 EST 2007
Added transmission failures to mesh statistics.
Removed whitespace before newlines.
Signed-off-by: Javier Cardona <javier at cozybit.com>
---
drivers/net/wireless/libertas/dev.h | 1 +
drivers/net/wireless/libertas/ethtool.c | 19 +++++++++++--------
drivers/net/wireless/libertas/hostcmd.h | 7 +++++--
3 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/drivers/net/wireless/libertas/dev.h
b/drivers/net/wireless/libertas/dev.h
index f43b137..b794cf0 100644
--- a/drivers/net/wireless/libertas/dev.h
+++ b/drivers/net/wireless/libertas/dev.h
@@ -123,6 +123,7 @@ struct wlan_mesh_stats {
u32 fwd_drop_noroute; /* Fwd: No route to Destination */
u32 fwd_drop_nobuf; /* Fwd: Run out of internal buffers */
u32 drop_blind; /* Rx: Dropped by blinding table */
+ u32 tx_failed_cnt; /* Tx: Failed transmissions */
};
/** Private structure for the MV device */
diff --git a/drivers/net/wireless/libertas/ethtool.c
b/drivers/net/wireless/libertas/ethtool.c
index e557edb..52eb65e 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[]=
"drop_no_buffers",
"fwded_unicast_cnt",
"fwded_bcast_cnt",
- "drop_blind_table"
+ "drop_blind_table",
+ "tx_failed_cnt"
};
static void libertas_ethtool_get_drvinfo(struct net_device *dev,
@@ -121,6 +122,7 @@ void libertas_ethtool_get_stats(struct n
data[4] = priv->mstats.fwd_unicast_cnt;
data[5] = priv->mstats.fwd_bcast_cnt;
data[6] = priv->mstats.drop_blind;
+ data[7] = priv->mstats.tx_failed_cnt;
LEAVE();
}
@@ -142,13 +144,14 @@ int libertas_ethtool_get_stats_count(str
return 0;
}
- priv->mstats.fwd_drop_rbt = mesh_access.data[0];
- priv->mstats.fwd_drop_ttl = mesh_access.data[1];
- priv->mstats.fwd_drop_noroute = mesh_access.data[2];
- priv->mstats.fwd_drop_nobuf = mesh_access.data[3];
- priv->mstats.fwd_unicast_cnt = mesh_access.data[4];
- priv->mstats.fwd_bcast_cnt = mesh_access.data[5];
- priv->mstats.drop_blind = mesh_access.data[6];
+ priv->mstats.fwd_drop_rbt = mesh_access.data[0];
+ priv->mstats.fwd_drop_ttl = mesh_access.data[1];
+ priv->mstats.fwd_drop_noroute = mesh_access.data[2];
+ priv->mstats.fwd_drop_nobuf = mesh_access.data[3];
+ priv->mstats.fwd_unicast_cnt = mesh_access.data[4];
+ priv->mstats.fwd_bcast_cnt = mesh_access.data[5];
+ priv->mstats.drop_blind = mesh_access.data[6];
+ priv->mstats.tx_failed_cnt = mesh_access.data[7];
LEAVE();
return MESH_STATS_NUM;
diff --git a/drivers/net/wireless/libertas/hostcmd.h
b/drivers/net/wireless/libertas/hostcmd.h
index bcf350d..63bb39e 100644
--- a/drivers/net/wireless/libertas/hostcmd.h
+++ b/drivers/net/wireless/libertas/hostcmd.h
@@ -743,13 +743,16 @@ struct HostCmd_DS_FWT_ACCESS {
u32 references;
} __attribute__ ((packed));
+
/* HostCmd_CMD_MESH_ACCESS */
-#define MESH_STATS_NUM 7
struct HostCmd_DS_MESH_ACCESS {
u16 action;
- u32 data[MESH_STATS_NUM + 1]; /* last position reserved */
+ u32 data[32];
} __attribute__ ((packed));
+/* Number of stat counters returned by the firmware */
+#define MESH_STATS_NUM 8
+
/* HostCmd_DS_COMMAND */
struct HostCmd_DS_COMMAND {
/* Command Header */
--
1.4.1
More information about the libertas-dev
mailing list