summaryrefslogtreecommitdiffstats
path: root/network/rtl-wifi/patch_2_6_24.diff
blob: e13feae1c11b2a9533b5ea91dd6e7d906903946e (plain)
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
diff -U 3 -Nar o/ieee80211/ieee80211_crypt_tkip.c n/ieee80211/ieee80211_crypt_tkip.c
--- o/ieee80211/ieee80211_crypt_tkip.c	2008-02-16 13:47:42.000000000 +0300
+++ n/ieee80211/ieee80211_crypt_tkip.c	2008-02-16 14:12:34.000000000 +0300
@@ -412,9 +412,13 @@
 	icv[3] = crc >> 24;
 
 	crypto_blkcipher_setkey(tkey->tx_tfm_arc4, rc4key, 16);
+#if(LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))	
 	sg.page = virt_to_page(pos);
 	sg.offset = offset_in_page(pos);
 	sg.length = len + 4;
+#else
+	sg_init_one(&sg, pos, len + 4);
+#endif
 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,18)
 	return crypto_blkcipher_encrypt(&desc, &sg, &sg, len + 4);
 #else
@@ -512,9 +516,13 @@
 	plen = skb->len - hdr_len - 12;
 
 	crypto_blkcipher_setkey(tkey->rx_tfm_arc4, rc4key, 16);
+#if(LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))	
 	sg.page = virt_to_page(pos);
 	sg.offset = offset_in_page(pos);
 	sg.length = plen + 4;
+#else
+	sg_init_one(&sg, pos, plen + 4);
+#endif
 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,18)
 	if (crypto_blkcipher_decrypt(&desc, &sg, &sg, plen + 4)) {
 #else
@@ -572,6 +580,7 @@
 		printk(KERN_WARNING "michael_mic: tfm_michael == NULL\n");
 		return -1;
 	}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)	
 	sg[0].page = virt_to_page(hdr);
 	sg[0].offset = offset_in_page(hdr);
 	sg[0].length = 16;
@@ -579,6 +588,11 @@
 	sg[1].page = virt_to_page(data);
 	sg[1].offset = offset_in_page(data);
 	sg[1].length = data_len;
+#else
+	sg_init_table(sg, 2);
+	sg_set_buf(&sg[0], hdr, 16);
+	sg_set_buf(&sg[1], data, data_len);
+#endif
 
 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,18)
 	if (crypto_hash_setkey(tfm_michael, key, 8))
diff -U 3 -Nar o/ieee80211/ieee80211_crypt_wep.c n/ieee80211/ieee80211_crypt_wep.c
--- o/ieee80211/ieee80211_crypt_wep.c	2008-02-16 13:47:42.000000000 +0300
+++ n/ieee80211/ieee80211_crypt_wep.c	2008-02-16 14:16:59.000000000 +0300
@@ -187,9 +187,13 @@
 	icv[3] = crc >> 24;
 
 	crypto_blkcipher_setkey(wep->tx_tfm, key, klen);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)	
 	sg.page = virt_to_page(pos);
 	sg.offset = offset_in_page(pos);
 	sg.length = len + 4;
+#else
+	sg_init_one(&sg, pos, len + 4);
+#endif
 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,18)
 	return crypto_blkcipher_encrypt(&desc, &sg, &sg, len + 4);
 #else
@@ -235,9 +239,13 @@
 	plen = skb->len - hdr_len - 8;
 
 	crypto_blkcipher_setkey(wep->rx_tfm, key, klen);
+#if(LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))	
 	sg.page = virt_to_page(pos);
 	sg.offset = offset_in_page(pos);
 	sg.length = plen + 4;
+#else
+	sg_init_one(&sg, pos, plen + 4);
+#endif
 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,18)
 	if (crypto_blkcipher_decrypt(&desc, &sg, &sg, plen + 4))
 #else
diff -U 3 -Nar o/rtl8187-dev/ieee80211_crypt_wep.c n/rtl8187-dev/ieee80211_crypt_wep.c
--- o/rtl8187-dev/ieee80211_crypt_wep.c	2008-02-16 13:47:45.000000000 +0300
+++ n/rtl8187-dev/ieee80211_crypt_wep.c	2008-02-16 21:24:09.000000000 +0300
@@ -64,7 +64,12 @@
 	u8 key[WEP_KEY_LEN + 1];
 	u8 key_len;
 	u8 key_idx;
+#if(LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21))
 	struct crypto_tfm *tfm;
+#else
+	struct crypto_blkcipher *tx_tfm;
+	struct crypto_blkcipher *rx_tfm;
+#endif
 };
 
 
@@ -85,19 +90,38 @@
 	memset(priv, 0, sizeof(*priv));
 	priv->key_idx = keyidx;
 
+	
+#if(LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21))
 	priv->tfm = crypto_alloc_tfm("arc4", 0);
 	if (priv->tfm == NULL) {
-		printk(KERN_DEBUG "ieee80211_crypt_wep: could not allocate "
-		       "crypto API arc4\n");
-		goto fail;
+	    printk(KERN_DEBUG "ieee80211_crypt_wep: could not allocate "
+		"crypto API arc4\n");
+	    goto fail;
 	}
-
+#else
+	priv->tx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC);
+	if (IS_ERR(priv->tx_tfm)) {
+	    printk(KERN_DEBUG "ieee80211_crypt_wep: could not allocate "
+		"crypto API arc4\n");
+	    priv->tx_tfm = NULL;
+	    goto fail;
+	}
+	priv->rx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC);
+	if (IS_ERR(priv->rx_tfm)) {
+	    printk(KERN_DEBUG "ieee80211_crypt_wep: could not allocate "
+		"crypto API arc4\n");
+	    priv->rx_tfm = NULL;
+	    goto fail;
+	}
+#endif
+							
 	/* start WEP IV from a random value */
 	get_random_bytes(&priv->iv, 4);
 
 	return priv;
 
 fail:
+	#if(LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21))
 	if (priv) {
 		if (priv->tfm)
 			crypto_free_tfm(priv->tfm);
@@ -107,8 +131,17 @@
 	module_put(THIS_MODULE);
 #else
 	MOD_DEC_USE_COUNT;
-#endif
+#endif 
+	#else
+	if (priv) {
+	    if (priv->tx_tfm)
+		crypto_free_blkcipher(priv->tx_tfm);
+	    if (priv->rx_tfm)
+		crypto_free_blkcipher(priv->rx_tfm);
+	    kfree(priv);
+	}
 
+	#endif
 	return NULL;
 }
 
@@ -116,8 +149,18 @@
 static void prism2_wep_deinit(void *priv)
 {
 	struct prism2_wep_data *_priv = priv;
-	if (_priv && _priv->tfm)
-		crypto_free_tfm(_priv->tfm);
+#if(LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21))
+    if (_priv && _priv->tfm)
+    crypto_free_tfm(_priv->tfm);
+#else
+    if (_priv) {
+	if (_priv->tx_tfm)
+	    crypto_free_blkcipher(_priv->tx_tfm);
+        if (_priv->rx_tfm)
+	    crypto_free_blkcipher(_priv->rx_tfm);
+    }
+#endif
+			
 	kfree(priv);
 #ifdef NEW_MODULE_CODE
 	module_put(THIS_MODULE);
@@ -136,6 +179,10 @@
 static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
 {
 	struct prism2_wep_data *wep = priv;
+#if(LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21))
+	struct blkcipher_desc desc = {.tfm = wep->tx_tfm};
+#endif
+
 	u32 crc, klen, len;
 	u8 key[WEP_KEY_LEN + 3];
 	u8 *pos, *icv;
@@ -180,13 +227,24 @@
 	icv[2] = crc >> 16;
 	icv[3] = crc >> 24;
 
+	#if(LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21))
 	crypto_cipher_setkey(wep->tfm, key, klen);
 	sg.page = virt_to_page(pos);
 	sg.offset = offset_in_page(pos);
 	sg.length = len + 4;
 	crypto_cipher_encrypt(wep->tfm, &sg, &sg, len + 4);
-
 	return 0;
+	#else
+	crypto_blkcipher_setkey(wep->tx_tfm, key, klen);
+#if(LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
+	sg.page = virt_to_page(pos);
+	sg.offset = offset_in_page(pos);
+	sg.length = len + 4;
+#else
+	sg_init_one(&sg, pos, len + 4);
+#endif
+	return crypto_blkcipher_encrypt(&desc, &sg, &sg, len + 4);
+	#endif
 }
 
 
@@ -200,6 +258,9 @@
 static int prism2_wep_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
 {
 	struct prism2_wep_data *wep = priv;
+#if(LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21))
+	struct blkcipher_desc desc = {.tfm = wep->rx_tfm};
+#endif
 	u32 crc, klen, plen;
 	u8 key[WEP_KEY_LEN + 3];
 	u8 keyidx, *pos, icv[4];
@@ -224,11 +285,24 @@
 	/* Apply RC4 to data and compute CRC32 over decrypted data */
 	plen = skb->len - hdr_len - 8;
 
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21))
 	crypto_cipher_setkey(wep->tfm, key, klen);
 	sg.page = virt_to_page(pos);
 	sg.offset = offset_in_page(pos);
 	sg.length = plen + 4;
 	crypto_cipher_decrypt(wep->tfm, &sg, &sg, plen + 4);
+#else
+	crypto_blkcipher_setkey(wep->rx_tfm, key, klen);
+#if(LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
+	sg.page = virt_to_page(pos);
+	sg.offset = offset_in_page(pos);
+	sg.length = plen + 4;
+#else
+	sg_init_one(&sg, pos, plen + 4);
+#endif
+	if (crypto_blkcipher_decrypt(&desc, &sg, &sg, plen + 4))
+		return -7;
+#endif
 
 	crc = ~crc32_le(~0, pos, plen);
 	icv[0] = crc;
diff -U 3 -Nar o/rtl8187-dev/ieee80211_module.c n/rtl8187-dev/ieee80211_module.c
--- o/rtl8187-dev/ieee80211_module.c	2008-02-16 13:47:45.000000000 +0300
+++ n/rtl8187-dev/ieee80211_module.c	2008-02-16 18:50:10.000000000 +0300
@@ -670,8 +670,14 @@
 	ieee->associate_timer.function = ieee80211_associate_abort_;
 /*	init_waitqueue_head(&ieee->assoc_queue);
 	ieee->workqueue = create_workqueue(DRV_NAME);*/
+/* Below is had to be discussed !!! */	
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20))	
 	INIT_WORK(&ieee->associate_wq,(void(*)(void*)) ieee80211_associate_step1,ieee);
 	INIT_WORK(&ieee->associate_complete_wq,(void(*)(void*)) ieee80211_associate_complete,ieee);
+#else
+	INIT_WORK(&ieee->associate_wq,(void(*)(void*)) ieee80211_associate_step1); 
+	INIT_WORK(&ieee->associate_complete_wq,(void(*)(void*)) ieee80211_associate_complete); 
+#endif
 	init_htables(ieee);
 	
 	return ieee;
diff -U 3 -Nar o/rtl8187-dev/ieee80211_rx.c n/rtl8187-dev/ieee80211_rx.c
--- o/rtl8187-dev/ieee80211_rx.c	2008-02-16 13:47:45.000000000 +0300
+++ n/rtl8187-dev/ieee80211_rx.c	2008-02-16 15:01:25.000000000 +0300
@@ -1153,8 +1153,13 @@
 	if (skb2 != NULL) {
 		/* send to wireless media */
 		skb2->protocol = __constant_htons(ETH_P_802_3);
+/* These needs to be discussed */
+#if(LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22))		
 		skb2->mac.raw = skb2->nh.raw = skb2->data;
+#else
+		skb2->mac_header= skb2->network_header = skb2->data;
 		/* skb2->nh.raw = skb2->data + ETH_HLEN; */
+#endif
 		skb2->dev = dev;
 		dev_queue_xmit(skb2);
 	}
diff -U 3 -Nar o/rtl8187-dev/r8187_core.c n/rtl8187-dev/r8187_core.c
--- o/rtl8187-dev/r8187_core.c	2008-02-16 13:47:45.000000000 +0300
+++ n/rtl8187-dev/r8187_core.c	2008-02-16 21:42:41.000000000 +0300
@@ -89,24 +89,33 @@
 static int hwseqnum = 0;
 static int hwwep = 0;
 static int channels = 0x3fff;
-
+static int force_card = 0;
 
 MODULE_LICENSE("GPL");
 MODULE_DEVICE_TABLE(usb, rtl8187_usb_id_tbl);
 MODULE_AUTHOR("Andrea Merello <andreamrl@tiscali.it>");
 MODULE_DESCRIPTION("Linux driver for Realtek RTL8187 WiFi cards");
-
+#if  LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 9)
 MODULE_PARM(ifname,"s");
 MODULE_PARM_DESC(devname," Net interface name, wlan%d=default");
 
 MODULE_PARM(hwseqnum,"i");
 MODULE_PARM_DESC(hwseqnum," Try to use hardware 802.11 header sequence numbers. Zero=default");
+
 #if 0
 MODULE_PARM(hwwep,"i");
 MODULE_PARM_DESC(hwwep," Try to use hardware WEP support. Still broken and not available on all cards");
 #endif
 MODULE_PARM(channels,"i");
 MODULE_PARM_DESC(channels," Channel bitmask for specific locales. NYI");
+#else
+module_param(ifname, charp, S_IRUGO|S_IWUSR );
+/* Uncomment following if needed */
+/*module_param(hwseqnum,int, S_IRUGO|S_IWUSR);
+module_param(hwwep,int, S_IRUGO|S_IWUSR);*/
+module_param(channels,int, S_IRUGO|S_IWUSR);
+module_param(force_card, int, S_IRUGO|S_IWUSR);
+#endif
 
 
 static int __devinit rtl8187_usb_probe(struct usb_interface *intf,
@@ -115,7 +124,9 @@
 static void __devexit rtl8187_usb_disconnect(struct usb_interface *intf);
 
 static struct usb_driver rtl8187_usb_driver = {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 15)    
 	.owner		= THIS_MODULE,
+#endif	
 	.name		= RTL8187_MODULE_NAME,	          /* Driver name   */
 	.id_table	= rtl8187_usb_id_tbl,	          /* PCI_ID table  */
 	.probe		= rtl8187_usb_probe,	          /* probe fn      */
@@ -479,13 +490,21 @@
 void rtl8180_proc_module_init(void)
 {	
 	DMESG("Initializing proc filesystem");
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)	
 	rtl8180_proc=create_proc_entry(RTL8187_MODULE_NAME, S_IFDIR, proc_net);
+#else
+	rtl8180_proc=create_proc_entry(RTL8187_MODULE_NAME, S_IFDIR, init_net.proc_net);
+#endif
 }
 
 
 void rtl8180_proc_module_remove(void)
 {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
 	remove_proc_entry(RTL8187_MODULE_NAME, proc_net);
+#else
+        remove_proc_entry(RTL8187_MODULE_NAME, init_net.proc_net);
+#endif
 }
 
 
@@ -2978,9 +2997,13 @@
 #endif
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
 	INIT_WORK(&priv->IBSS_work,(void(*)(void*)) rtl8180_IBSS_create_wq,dev);
 	INIT_WORK(&priv->scan_work,(void(*)(void*)) rtl8180_scan_wq,dev);
-	
+#else
+	INIT_WORK(&priv->IBSS_work,(void(*)(void*)) rtl8180_IBSS_create_wq);
+	INIT_WORK(&priv->scan_work,(void(*)(void*)) rtl8180_scan_wq);
+#endif
 	tasklet_init(&priv->irq_rx_tasklet,
 		     (void(*)(unsigned long)) rtl8180_irq_rx_tasklet,
 		     (unsigned long)priv);
@@ -3973,8 +3996,10 @@
 	struct usb_device *udev = interface_to_usbdev(intf);
 	
 	dev = alloc_etherdev(sizeof(*priv));
-	
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
 	SET_MODULE_OWNER(dev);
+#endif
 	usb_set_intfdata(intf, dev);	
 	//pci_set_drvdata(pdev, dev);
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)	
diff -U 3 -Nar o/rtl8187-newstack/r8187_core.c n/rtl8187-newstack/r8187_core.c
--- o/rtl8187-newstack/r8187_core.c	2008-02-16 13:47:47.000000000 +0300
+++ n/rtl8187-newstack/r8187_core.c	2008-02-16 23:37:53.000000000 +0300
@@ -407,13 +407,21 @@
 void rtl8180_proc_module_init(void)
 {	
 	DMESG("Initializing proc filesystem");
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
 	rtl8180_proc=create_proc_entry(RTL8187_MODULE_NAME, S_IFDIR, proc_net);
+#else
+	rtl8180_proc=create_proc_entry(RTL8187_MODULE_NAME, S_IFDIR, init_net.proc_net);
+#endif
 }
 
 
 void rtl8180_proc_module_remove(void)
 {
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)) 
 	remove_proc_entry(RTL8187_MODULE_NAME, proc_net);
+#else
+	remove_proc_entry(RTL8187_MODULE_NAME, init_net.proc_net);
+#endif
 }
 
 
@@ -2407,7 +2415,9 @@
 	
 	dev = alloc_ieee80211(sizeof(struct r8180_priv));
 	
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
 	SET_MODULE_OWNER(dev);
+#endif	
 	usb_set_intfdata(intf, dev);	
 	
 	SET_NETDEV_DEV(dev, &intf->dev);
diff -U 3 -Nar o/rtl818x-newstack/r8180.h n/rtl818x-newstack/r8180.h
--- o/rtl818x-newstack/r8180.h	2008-02-16 13:47:49.000000000 +0300
+++ n/rtl818x-newstack/r8180.h	2008-02-17 01:09:28.000000000 +0300
@@ -46,13 +46,14 @@
 #include <linux/delay.h>
 #include <linux/rtnetlink.h>	//for rtnl_lock()
 #include <linux/wireless.h>
-#include <net/mac80211.h>
-#include <net/ieee80211softmac.h>
+//#include <net/mac80211.h>
+//#include <net/ieee80211softmac.h>
 #include <linux/timer.h>
 #include <linux/proc_fs.h>	// Necessary because we use the proc fs
 #include <linux/if_arp.h>
 #include <asm/io.h>
 #include <asm/semaphore.h>
+#include "ieee80211.h"
 
 #define EPROM_93c46 0
 #define EPROM_93c56 1
@@ -244,44 +245,7 @@
 	short ack_tx_to_ieee;
 }r8180_priv;
 
-enum ieee80211_state {
 
-        /* the card is not linked at all */
-        IEEE80211_NOLINK = 0,
-
-        /* IEEE80211_ASSOCIATING* are for BSS client mode
-         * the driver shall not perform RX filtering unless
-         * the state is LINKED.
-         * The driver shall just check for the state LINKED and
-         * defaults to NOLINK for ALL the other states (including
-         * LINKED_SCANNING)
-         */
-
-        /* the association procedure will start (wq scheduling)*/
-        IEEE80211_ASSOCIATING,
-        IEEE80211_ASSOCIATING_RETRY,
-
-        /* the association procedure is sending AUTH request*/
-        IEEE80211_ASSOCIATING_AUTHENTICATING,
-  
-        /* the association procedure has successfully authentcated
-         * and is sending association request
-         */
-        IEEE80211_ASSOCIATING_AUTHENTICATED,
-
-        /* the link is ok. the card associated to a BSS or linked
-         * to a ibss cell or acting as an AP and creating the bss
-         */
-        IEEE80211_LINKED,
-
-        /* same as LINKED, but the driver shall apply RX filter
-         * rules as we are in NO_LINK mode. As the card is still
-         * logically linked, but it is doing a syncro site survey
-         * then it will be back to LINKED state.
-         */
-        IEEE80211_LINKED_SCANNING,
-
-};
 
 #define BEACON_PRIORITY 3
 #define LOW_PRIORITY 1
diff -U 3 -Nar o/rtl818x-newstack/r8180_core.c n/rtl818x-newstack/r8180_core.c
--- o/rtl818x-newstack/r8180_core.c	2008-02-16 13:47:49.000000000 +0300
+++ n/rtl818x-newstack/r8180_core.c	2008-02-17 01:30:29.000000000 +0300
@@ -529,13 +529,21 @@
 void rtl8180_proc_module_init(void)
 {	
 	DMESG("Initializing proc filesystem");
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))	
 	rtl8180_proc=create_proc_entry(RTL8180_MODULE_NAME, S_IFDIR, proc_net);
+#else
+	rtl8180_proc=create_proc_entry(RTL8180_MODULE_NAME, S_IFDIR, init_net.proc_net); 
+#endif
 }
 
 
 void rtl8180_proc_module_remove(void)
 {
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)) 
 	remove_proc_entry(RTL8180_MODULE_NAME, proc_net);
+#else
+	remove_proc_entry(RTL8180_MODULE_NAME, init_net.proc_net); 
+#endif
 }
 
 
@@ -3265,7 +3273,11 @@
 		else 
 			DMESG ("104-bit WEP is NOT supported in hardware");
 	}
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))	
 	if(request_irq(dev->irq, rtl8180_interrupt, SA_SHIRQ, dev->name, dev)){
+#else
+	if(request_irq(dev->irq, rtl8180_interrupt, IRQF_SHARED, dev->name, dev)){
+#endif
 		DMESGE("Error allocating IRQ %d",dev->irq);
 		return -1;
 	}else{ 
@@ -3949,9 +3961,10 @@
 		return -ENOMEM;
 	priv = ieee80211_priv(dev);
 	priv->ieee80211 = netdev_priv(dev);
-	
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))	
 	SET_MODULE_OWNER(dev);
-	
+#endif	
 	pci_set_drvdata(pdev, dev);
 	SET_NETDEV_DEV(dev, &pdev->dev);