1 /*** -*- linux-c -*- **********************************************************
3 Driver for Atmel at76c502 at76c504 and at76c506 wireless cards.
5 Copyright 2004 Simon Kelley.
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.
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.
17 You should have received a copy of the GNU General Public License
18 along with Atmel wireless lan drivers; if not, see
19 <http://www.gnu.org/licenses/>.
21 ******************************************************************************/
22 #include <linux/pci.h>
23 #include <linux/kernel.h>
24 #include <linux/module.h>
25 #include <linux/netdevice.h>
28 MODULE_AUTHOR("Simon Kelley");
29 MODULE_DESCRIPTION("Support for Atmel at76c50x 802.11 wireless ethernet cards.");
30 MODULE_LICENSE("GPL");
31 MODULE_SUPPORTED_DEVICE("Atmel at76c506 PCI wireless cards");
33 static DEFINE_PCI_DEVICE_TABLE(card_ids) = {
34 { 0x1114, 0x0506, PCI_ANY_ID, PCI_ANY_ID },
38 MODULE_DEVICE_TABLE(pci, card_ids);
40 static int atmel_pci_probe(struct pci_dev *, const struct pci_device_id *);
41 static void atmel_pci_remove(struct pci_dev *);
43 static struct pci_driver atmel_driver = {
46 .probe = atmel_pci_probe,
47 .remove = atmel_pci_remove,
51 static int atmel_pci_probe(struct pci_dev *pdev,
52 const struct pci_device_id *pent)
54 struct net_device *dev;
56 if (pci_enable_device(pdev))
61 dev = init_atmel_card(pdev->irq, pdev->resource[1].start,
63 &pdev->dev, NULL, NULL);
67 pci_set_drvdata(pdev, dev);
71 static void atmel_pci_remove(struct pci_dev *pdev)
73 stop_atmel_card(pci_get_drvdata(pdev));
76 module_pci_driver(atmel_driver);