aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/atmel_pci.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/net/wireless/atmel_pci.c
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'drivers/net/wireless/atmel_pci.c')
-rw-r--r--drivers/net/wireless/atmel_pci.c89
1 files changed, 89 insertions, 0 deletions
diff --git a/drivers/net/wireless/atmel_pci.c b/drivers/net/wireless/atmel_pci.c
new file mode 100644
index 000000000000..2eb00a957bbe
--- /dev/null
+++ b/drivers/net/wireless/atmel_pci.c
@@ -0,0 +1,89 @@
1/*** -*- linux-c -*- **********************************************************
2
3 Driver for Atmel at76c502 at76c504 and at76c506 wireless cards.
4
5 Copyright 2004 Simon Kelley.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 This software is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with Atmel wireless lan drivers; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
21******************************************************************************/
22#include <linux/config.h>
23#include <linux/pci.h>
24#include <linux/kernel.h>
25#include <linux/module.h>
26#include <linux/init.h>
27#include <linux/netdevice.h>
28#include "atmel.h"
29
30MODULE_AUTHOR("Simon Kelley");
31MODULE_DESCRIPTION("Support for Atmel at76c50x 802.11 wireless ethernet cards.");
32MODULE_LICENSE("GPL");
33MODULE_SUPPORTED_DEVICE("Atmel at76c506 PCI wireless cards");
34
35static struct pci_device_id card_ids[] = {
36 { 0x1114, 0x0506, PCI_ANY_ID, PCI_ANY_ID },
37 { 0, }
38};
39
40MODULE_DEVICE_TABLE(pci, card_ids);
41
42static int atmel_pci_probe(struct pci_dev *, const struct pci_device_id *);
43static void atmel_pci_remove(struct pci_dev *);
44
45static struct pci_driver atmel_driver = {
46 .name = "atmel",
47 .id_table = card_ids,
48 .probe = atmel_pci_probe,
49 .remove = __devexit_p(atmel_pci_remove),
50};
51
52
53static int __devinit atmel_pci_probe(struct pci_dev *pdev,
54 const struct pci_device_id *pent)
55{
56 struct net_device *dev;
57
58 if (pci_enable_device(pdev))
59 return -ENODEV;
60
61 pci_set_master(pdev);
62
63 dev = init_atmel_card(pdev->irq, pdev->resource[1].start,
64 ATMEL_FW_TYPE_506,
65 &pdev->dev, NULL, NULL);
66 if (!dev)
67 return -ENODEV;
68
69 pci_set_drvdata(pdev, dev);
70 return 0;
71}
72
73static void __devexit atmel_pci_remove(struct pci_dev *pdev)
74{
75 stop_atmel_card(pci_get_drvdata(pdev), 1);
76}
77
78static int __init atmel_init_module(void)
79{
80 return pci_module_init(&atmel_driver);
81}
82
83static void __exit atmel_cleanup_module(void)
84{
85 pci_unregister_driver(&atmel_driver);
86}
87
88module_init(atmel_init_module);
89module_exit(atmel_cleanup_module);