]> err.no Git - linux-2.6/commitdiff
[PATCH] libertas: added transmission failures to mesh statistics
authorJavier Cardona <javier@cozybit.com>
Fri, 25 May 2007 16:12:06 +0000 (12:12 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 11 Jun 2007 18:28:39 +0000 (14:28 -0400)
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>
drivers/net/wireless/libertas/dev.h
drivers/net/wireless/libertas/ethtool.c
drivers/net/wireless/libertas/hostcmd.h

index 0dc4fc3b0b231bfb8fe2b1a061ad4c454784e92f..d7673c91f480bebecdfda4f85af6b20d7ae1394e 100644 (file)
@@ -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 */
index 4655953730cc9dac2dec5cb8fd24dedf17e22510..c3a26fce02ca00c2670cab8bafd44defd4616fc2 100644 (file)
@@ -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(struct net_device * dev,
         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_count(struct net_device * dev)
         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;
 
index f239e5d2435b159d863f54d22a8026d81c54b02b..e7745fc2865e172cc9cae1f4ddde64ae8fca7580 100644 (file)
@@ -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;