19 #include <linux/module.h>
20 #include <linux/kernel.h>
22 #include <linux/string.h>
24 #include <linux/netdevice.h>
26 #include <asm/uaccess.h>
29 #define FT1000_PROC "ft1000"
30 #define MAX_FILE_LEN 255
32 #define PUTM_TO_PAGE(len, page, args...) \
33 len += snprintf(page+len, PAGE_SIZE - len, args)
35 #define PUTX_TO_PAGE(len, page, message, size, var) \
36 len += snprintf(page+len, PAGE_SIZE - len, message); \
37 for(i = 0; i < (size - 1); i++) { \
38 len += snprintf(page+len, PAGE_SIZE - len, "%02x:", var[i]); \
40 len += snprintf(page+len, PAGE_SIZE - len, "%02x\n", var[i])
42 #define PUTD_TO_PAGE(len, page, message, size, var) \
43 len += snprintf(page+len, PAGE_SIZE - len, message); \
44 for(i = 0; i < (size - 1); i++) { \
45 len += snprintf(page+len, PAGE_SIZE - len, "%d.", var[i]); \
47 len += snprintf(page+len, PAGE_SIZE - len, "%d\n", var[i])
57 "Idle (Disconnect)",
"Searching",
"Active (Connected)",
58 "Waiting for L2",
"Sleep",
"No Coverage",
"",
""
60 char *signal[] = {
"",
"*",
"**",
"***",
"****" };
67 info = netdev_priv(dev);
119 i = (info->
LedStat >> 8) & 0xf;
140 PUTM_TO_PAGE(len, page,
"Connection Time: %02ld:%02ld:%02ld\n",
141 ((delta / 3600) % 24), ((delta / 60) % 60), (delta % 60));
142 PUTM_TO_PAGE(len, page,
"Connection Time[s]: %ld\n", delta);
158 status[((info->
ConStat) & 0x7)]);
163 PUTM_TO_PAGE(len, page,
"Signal Strength: %s\n", signal[strength]);
164 PUTM_TO_PAGE(len, page,
"Signal Quality: %s\n", signal[quality]);
174 info = netdev_priv(dev);
180 ft1000ReadProc, dev);
188 .notifier_call = ft1000NotifyProc
195 info = netdev_priv(dev);
199 ft1000ReadProc, dev);
208 info = netdev_priv(dev);