1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*** -*- linux-c -*- **********************************************************
4 Driver for Atmel at76c502 at76c504 and at76c506 wireless cards.
6 Copyright 2004 Simon Kelley.
9 ******************************************************************************/
10 #include <linux/pci.h>
11 #include <linux/kernel.h>
12 #include <linux/module.h>
13 #include <linux/netdevice.h>
16 MODULE_AUTHOR("Simon Kelley");
17 MODULE_DESCRIPTION("Support for Atmel at76c50x 802.11 wireless ethernet cards.");
18 MODULE_LICENSE("GPL");
19 MODULE_SUPPORTED_DEVICE("Atmel at76c506 PCI wireless cards");
21 static const struct pci_device_id card_ids
[] = {
22 { 0x1114, 0x0506, PCI_ANY_ID
, PCI_ANY_ID
},
26 MODULE_DEVICE_TABLE(pci
, card_ids
);
28 static int atmel_pci_probe(struct pci_dev
*, const struct pci_device_id
*);
29 static void atmel_pci_remove(struct pci_dev
*);
31 static struct pci_driver atmel_driver
= {
34 .probe
= atmel_pci_probe
,
35 .remove
= atmel_pci_remove
,
39 static int atmel_pci_probe(struct pci_dev
*pdev
,
40 const struct pci_device_id
*pent
)
42 struct net_device
*dev
;
44 if (pci_enable_device(pdev
))
49 dev
= init_atmel_card(pdev
->irq
, pdev
->resource
[1].start
,
51 &pdev
->dev
, NULL
, NULL
);
53 pci_disable_device(pdev
);
57 pci_set_drvdata(pdev
, dev
);
61 static void atmel_pci_remove(struct pci_dev
*pdev
)
63 stop_atmel_card(pci_get_drvdata(pdev
));
66 module_pci_driver(atmel_driver
);