aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00.h
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2009-03-28 15:51:24 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-04-22 16:54:29 -0400
commit440ddadaee6d0d5e8a7ee53ac913f78a8e5570a1 (patch)
tree2a6f185ae743afce09c684f23084e8290e813fcf /drivers/net/wireless/rt2x00/rt2x00.h
parent32c1628f153a5468cf48be5e5c04cd599ae9e01d (diff)
rt2x00: Move Move pci_dev specific access to rt2x00pci
pci_dev->irq and pci_name(pci_dev) access should be limited to rt2x00pci only. This is more generic and allows a rt2x00 pci driver to be controlled as PCI device but also as platform driver (needed for rt2800pci SoC support). Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00.h')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index 84bd6f19acb0..e03d69975ea4 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -672,6 +672,12 @@ struct rt2x00_dev {
672 unsigned long flags; 672 unsigned long flags;
673 673
674 /* 674 /*
675 * Device information, Bus IRQ and name (PCI, SoC)
676 */
677 int irq;
678 const char *name;
679
680 /*
675 * Chipset identification. 681 * Chipset identification.
676 */ 682 */
677 struct rt2x00_chip chip; 683 struct rt2x00_chip chip;
@@ -860,6 +866,18 @@ static inline void rt2x00_set_chip(struct rt2x00_dev *rt2x00dev,
860 rt2x00dev->chip.rev = rev; 866 rt2x00dev->chip.rev = rev;
861} 867}
862 868
869static inline void rt2x00_set_chip_rt(struct rt2x00_dev *rt2x00dev,
870 const u16 rt)
871{
872 rt2x00dev->chip.rt = rt;
873}
874
875static inline void rt2x00_set_chip_rf(struct rt2x00_dev *rt2x00dev,
876 const u16 rf, const u32 rev)
877{
878 rt2x00_set_chip(rt2x00dev, rt2x00dev->chip.rt, rf, rev);
879}
880
863static inline char rt2x00_rt(const struct rt2x00_chip *chipset, const u16 chip) 881static inline char rt2x00_rt(const struct rt2x00_chip *chipset, const u16 chip)
864{ 882{
865 return (chipset->rt == chip); 883 return (chipset->rt == chip);