Lines 6-12
Link Here
|
6 |
* Taiwan, R.O.C. |
6 |
* Taiwan, R.O.C. |
7 |
* |
7 |
* |
8 |
* (c) Copyright 2002-2010, Ralink Technology, Inc. |
8 |
* (c) Copyright 2002-2010, Ralink Technology, Inc. |
9 |
* |
9 |
* Portions © 2013, Jesse Crews <jcrews at gridlox dot net> |
10 |
* This program is free software; you can redistribute it and/or modify * |
10 |
* This program is free software; you can redistribute it and/or modify * |
11 |
* it under the terms of the GNU General Public License as published by * |
11 |
* it under the terms of the GNU General Public License as published by * |
12 |
* the Free Software Foundation; either version 2 of the License, or * |
12 |
* the Free Software Foundation; either version 2 of the License, or * |
Lines 39-46
Link Here
|
39 |
/*extern int rt28xx_close(IN struct net_device *net_dev); */ |
39 |
/*extern int rt28xx_close(IN struct net_device *net_dev); */ |
40 |
/*extern int rt28xx_open(struct net_device *net_dev); */ |
40 |
/*extern int rt28xx_open(struct net_device *net_dev); */ |
41 |
|
41 |
|
|
|
42 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0) |
43 |
static VOID rt2860_remove_one(struct pci_dev *pci_dev); |
44 |
static INT rt2860_probe(struct pci_dev *pci_dev, const struct pci_device_id *ent); |
45 |
#else |
42 |
static VOID __devexit rt2860_remove_one(struct pci_dev *pci_dev); |
46 |
static VOID __devexit rt2860_remove_one(struct pci_dev *pci_dev); |
43 |
static INT __devinit rt2860_probe(struct pci_dev *pci_dev, const struct pci_device_id *ent); |
47 |
static INT __devinit rt2860_probe(struct pci_dev *pci_dev, const struct pci_device_id *ent); |
|
|
48 |
#endif |
49 |
|
44 |
static void __exit rt2860_cleanup_module(void); |
50 |
static void __exit rt2860_cleanup_module(void); |
45 |
static int __init rt2860_init_module(void); |
51 |
static int __init rt2860_init_module(void); |
46 |
|
52 |
|
Lines 59-65
static int rt2860_resume(struct pci_dev *pci_dev);
Link Here
|
59 |
/* */ |
65 |
/* */ |
60 |
/* Ralink PCI device table, include all supported chipsets */ |
66 |
/* Ralink PCI device table, include all supported chipsets */ |
61 |
/* */ |
67 |
/* */ |
|
|
68 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0) |
69 |
static struct pci_device_id rt2860_pci_tbl[] = |
70 |
#else |
62 |
static struct pci_device_id rt2860_pci_tbl[] __devinitdata = |
71 |
static struct pci_device_id rt2860_pci_tbl[] __devinitdata = |
|
|
72 |
#endif |
63 |
{ |
73 |
{ |
64 |
#ifdef RT5592 |
74 |
#ifdef RT5592 |
65 |
{PCI_DEVICE(NIC_PCI_VENDOR_ID, NIC5592_PCIe_DEVICE_ID)}, |
75 |
{PCI_DEVICE(NIC_PCI_VENDOR_ID, NIC5592_PCIe_DEVICE_ID)}, |
Lines 86-96
static struct pci_driver rt2860_driver =
Link Here
|
86 |
name: RTMP_DRV_NAME, |
96 |
name: RTMP_DRV_NAME, |
87 |
id_table: rt2860_pci_tbl, |
97 |
id_table: rt2860_pci_tbl, |
88 |
probe: rt2860_probe, |
98 |
probe: rt2860_probe, |
89 |
#if LINUX_VERSION_CODE >= 0x20412 |
99 |
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0) /* 3.8 check */ |
|
|
100 |
#if LINUX_VERSION_CODE >= 0x20412 |
90 |
remove: __devexit_p(rt2860_remove_one), |
101 |
remove: __devexit_p(rt2860_remove_one), |
91 |
#else |
102 |
#else |
92 |
remove: __devexit(rt2860_remove_one), |
103 |
remove: __devexit(rt2860_remove_one), |
93 |
#endif |
104 |
#endif |
|
|
105 |
#endif /* 3.8 check */ |
94 |
|
106 |
|
95 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) |
107 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) |
96 |
#ifdef CONFIG_PM |
108 |
#ifdef CONFIG_PM |
Lines 291-297
module_exit(rt2860_cleanup_module);
Link Here
|
291 |
/* */ |
303 |
/* */ |
292 |
/* PCI device probe & initialization function */ |
304 |
/* PCI device probe & initialization function */ |
293 |
/* */ |
305 |
/* */ |
|
|
306 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0) |
307 |
static INT rt2860_probe( |
308 |
#else |
294 |
static INT __devinit rt2860_probe( |
309 |
static INT __devinit rt2860_probe( |
|
|
310 |
#endif |
295 |
IN struct pci_dev *pci_dev, |
311 |
IN struct pci_dev *pci_dev, |
296 |
IN const struct pci_device_id *pci_id) |
312 |
IN const struct pci_device_id *pci_id) |
297 |
{ |
313 |
{ |
Lines 461-468
err_out:
Link Here
|
461 |
return -ENODEV; /* probe fail */ |
477 |
return -ENODEV; /* probe fail */ |
462 |
} |
478 |
} |
463 |
|
479 |
|
464 |
|
480 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0) |
|
|
481 |
static VOID rt2860_remove_one( |
482 |
#else |
465 |
static VOID __devexit rt2860_remove_one( |
483 |
static VOID __devexit rt2860_remove_one( |
|
|
484 |
#endif |
466 |
IN struct pci_dev *pci_dev) |
485 |
IN struct pci_dev *pci_dev) |
467 |
{ |
486 |
{ |
468 |
PNET_DEV net_dev = pci_get_drvdata(pci_dev); |
487 |
PNET_DEV net_dev = pci_get_drvdata(pci_dev); |