1 --- zd1211-4916-r0/src/zd1205.h.orig 2005-01-28 22:55:15.000000000 -0800
2 +++ zd1211-4916-r0/src/zd1205.h 2005-03-04 13:41:16.879006208 -0800
4 ***************************************************************************/
\r
5 struct driver_stats {
\r
6 struct net_device_stats net_stats;
\r
7 +#ifdef CONFIG_NET_WIRELESS
8 + struct iw_statistics iw_stats;
10 unsigned long tx_late_col;
\r
11 unsigned long tx_ok_defrd;
\r
12 unsigned long tx_one_retry;
\r
13 --- zd1211-4916-r0/src/zd1205.c.orig 2005-03-03 18:43:48.000000000 -0800
14 +++ zd1211-4916-r0/src/zd1205.c 2005-03-04 13:45:07.134002128 -0800
15 @@ -4196,6 +4196,42 @@
16 return &(macp->drv_stats.net_stats);
\r
20 + * zd1205wext_iw_get_stats - get driver statistics
22 + * @dev: adapter's net_device struct
24 + * This routine is called when the OS wants the adapter's wireless
25 + * stats returned. It returns the address of the iw_statistics
26 + * stucture for the device. If the statistics are currently being
27 + * updated, then they might be incorrect for a short while. However,
28 + * since this cannot actually cause damage, no locking is used.
30 +#if WIRELESS_EXT > 12
31 +struct iw_statistics *
32 +zd1205wext_iw_get_stats(struct net_device *dev)
34 + struct zd1205_private *macp = dev->priv;
35 + struct iw_statistics *iw_stats = &macp->drv_stats.iw_stats;
37 + iw_stats->qual.noise = 161;
38 + iw_stats->qual.qual = 0;//macp->rxInfo.rxSignalQuality;
39 + iw_stats->qual.level = 0;//macp->rxInfo.rxSignalStrength;
40 + iw_stats->qual.updated = 7;
42 + iw_stats->discard.nwid = 0;
43 + iw_stats->discard.code = 0;
44 + iw_stats->discard.fragment = 0;
45 + iw_stats->discard.retries = macp->retryFailCnt;
46 + iw_stats->discard.misc = macp->DropFirstFragCnt + macp->ErrLongFrmCnt +
47 + macp->ErrShortFrmCnt + macp->ErrZeroLenFrmCnt;
49 + iw_stats->miss.beacon = 0;
57 * zd1205_set_mac - set the MAC address
\r
58 --- zd1211-4916-r0/src/zd1211.c.orig 2005-03-03 18:43:49.000000000 -0800
59 +++ zd1211-4916-r0/src/zd1211.c 2005-03-04 13:44:31.122476712 -0800
61 #define ZD1211_TX_TIMEOUT (HZ*10)
\r
62 #define ZD1211_MTU 1500
\r
63 extern struct iw_handler_def p80211wext_handler_def;
\r
64 +#ifdef CONFIG_NET_WIRELESS
65 +extern struct iw_statistics *zd1205wext_iw_get_stats(struct net_device *);
68 u8 zd1211_InitSetup(struct net_device *dev, struct zd1205_private *macp)
\r
72 #if WIRELESS_EXT > 12
\r
73 dev->wireless_handlers = (struct iw_handler_def *)&p80211wext_handler_def;
\r
74 + dev->get_wireless_stats = &zd1205wext_iw_get_stats;
77 dev->hard_start_xmit = zd1205_xmit_frame;
\r