[PATCH] libertas: added transmission failures to mesh statistics
Marcelo Tosatti
marcelo at kvack.org
Tue Mar 13 12:54:43 EDT 2007
On Thu, Mar 01, 2007 at 12:03:46PM -0800, Javier Cardona wrote:
> Added transmission failures to mesh statistics.
The following has applied to libertas-2.6.
Thanks
c502254c3107bc11293c8f671ef29219161bf1f4
diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h
index 34fa0f8..22a8e80 100644
--- a/drivers/net/wireless/libertas/dev.h
+++ b/drivers/net/wireless/libertas/dev.h
@@ -124,6 +124,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 81a09ed..d58ac06 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,
@@ -124,6 +125,7 @@ static void libertas_ethtool_get_stats(s
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;
lbs_deb_enter(LBS_DEB_ETHTOOL);
}
@@ -153,6 +155,7 @@ static int libertas_ethtool_get_stats_co
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];
ret = MESH_STATS_NUM;
diff --git a/drivers/net/wireless/libertas/hostcmd.h b/drivers/net/wireless/libertas/hostcmd.h
index 6911820..76cc6cc 100644
--- a/drivers/net/wireless/libertas/hostcmd.h
+++ b/drivers/net/wireless/libertas/hostcmd.h
@@ -621,12 +621,14 @@ struct cmd_ds_fwt_access {
u32 references;
} __attribute__ ((packed));
-#define MESH_STATS_NUM 7
struct cmd_ds_mesh_access {
u16 action;
- u32 data[MESH_STATS_NUM + 1]; /* last position reserved */
+ u32 data[32]; /* last position reserved */
} __attribute__ ((packed));
+/* Number of stats counters returned by the firmware */
+#define MESH_STATS_NUM 8
+
struct cmd_ds_command {
/* command header */
u16 command;
More information about the libertas-dev
mailing list