1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
diff -urp ipw2100-1.1.4/ipw2100.c ipw2100-1.1.4-fix/ipw2100.c
--- ipw2100-1.1.4/ipw2100.c 2006-01-09 14:30:55.000000000 +0800
+++ ipw2100-1.1.4-fix/ipw2100.c 2006-01-12 18:11:15.259145736 +0800
@@ -296,16 +296,6 @@ static const char *command_types[] = {
};
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
-static void *kzalloc(size_t size, gfp_t flags)
-{
- void *ret = kmalloc(size, flags);
- if (ret)
- memset(ret, 0, size);
- return ret;
-}
-#endif
-
/* Pre-decl until we get the code solid and then we can clean it up */
static void ipw2100_tx_send_commands(struct ipw2100_priv *priv);
static void ipw2100_tx_send_data(struct ipw2100_priv *priv);
@@ -6440,8 +6430,12 @@ static struct net_device *ipw2100_alloc_
dev->ethtool_ops = &ipw2100_ethtool_ops;
dev->tx_timeout = ipw2100_tx_timeout;
dev->wireless_handlers = &ipw2100_wx_handler_def;
+#if IW_HANDLER_VERSION > 6
priv->wireless_data.ieee80211 = priv->ieee;
dev->wireless_data = &priv->wireless_data;
+#else
+ dev->get_wireless_stats = ipw2100_wx_wireless_stats;
+#endif
dev->set_mac_address = ipw2100_set_address;
dev->watchdog_timeo = 3 * HZ;
dev->irq = 0;
@@ -7303,10 +7297,12 @@ static int ipw2100_wx_get_range(struct n
}
range->num_frequency = val;
+#if WIRELESS_EXT >= 17
/* Event capability (kernel + driver) */
range->event_capa[0] = (IW_EVENT_CAPA_K_0 |
IW_EVENT_CAPA_MASK(SIOCGIWAP));
range->event_capa[1] = IW_EVENT_CAPA_K_1;
+#endif
IPW_DEBUG_WX("GET Range\n");
@@ -8725,7 +8721,9 @@ static struct iw_handler_def ipw2100_wx_
sizeof(struct iw_priv_args),
.private = (iw_handler *) ipw2100_private_handler,
.private_args = (struct iw_priv_args *)ipw2100_private_args,
+#if WIRELESS_EXT >= 17
.get_wireless_stats = ipw2100_wx_wireless_stats,
+#endif
};
static void ipw2100_wx_event_work(struct ipw2100_priv *priv)
diff -urp ipw2100-1.1.4/ipw2100.h ipw2100-1.1.4-fix/ipw2100.h
--- ipw2100-1.1.4/ipw2100.h 2006-01-09 14:30:55.000000000 +0800
+++ ipw2100-1.1.4-fix/ipw2100.h 2006-01-12 18:11:15.289141176 +0800
@@ -574,7 +574,9 @@ struct ipw2100_priv {
struct net_device *net_dev;
struct iw_statistics wstats;
+#if IW_HANDLER_VERSION > 6
struct iw_public_data wireless_data;
+#endif
struct tasklet_struct irq_tasklet;
|