diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2010-07-11 06:31:23 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-07-12 16:05:37 -0400 |
commit | e796643eaf0889c346e6b69c5afe777c327b1919 (patch) | |
tree | 7cdac8397bc37d7c6daa85d975e88bb828e5fde4 /drivers/net/wireless/rt2x00/rt2800pci.c | |
parent | f31c9a8c1380e20e95d06925f2e42baf61af4db7 (diff) |
rt2x00: Move driver callback functions into the ops structure
All callback functions are gathered in rt2x00dev->ops except
for the callback functions which are used in rt2800lib to
acces rt2800pci/usb.
Move the priv pointer from rt2x00dev to rt2x00dev->ops and
rename it to drv to make it obvious that it is the driver callback
structure.
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/rt2800pci.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800pci.c | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index 0fdd58b9dece..39b3846fa340 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c | |||
@@ -926,27 +926,10 @@ static int rt2800pci_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
926 | return rt2800_validate_eeprom(rt2x00dev); | 926 | return rt2800_validate_eeprom(rt2x00dev); |
927 | } | 927 | } |
928 | 928 | ||
929 | static const struct rt2800_ops rt2800pci_rt2800_ops = { | ||
930 | .register_read = rt2x00pci_register_read, | ||
931 | .register_read_lock = rt2x00pci_register_read, /* same for PCI */ | ||
932 | .register_write = rt2x00pci_register_write, | ||
933 | .register_write_lock = rt2x00pci_register_write, /* same for PCI */ | ||
934 | |||
935 | .register_multiread = rt2x00pci_register_multiread, | ||
936 | .register_multiwrite = rt2x00pci_register_multiwrite, | ||
937 | |||
938 | .regbusy_read = rt2x00pci_regbusy_read, | ||
939 | |||
940 | .drv_write_firmware = rt2800pci_write_firmware, | ||
941 | .drv_init_registers = rt2800pci_init_registers, | ||
942 | }; | ||
943 | |||
944 | static int rt2800pci_probe_hw(struct rt2x00_dev *rt2x00dev) | 929 | static int rt2800pci_probe_hw(struct rt2x00_dev *rt2x00dev) |
945 | { | 930 | { |
946 | int retval; | 931 | int retval; |
947 | 932 | ||
948 | rt2x00dev->priv = (void *)&rt2800pci_rt2800_ops; | ||
949 | |||
950 | /* | 933 | /* |
951 | * Allocate eeprom data. | 934 | * Allocate eeprom data. |
952 | */ | 935 | */ |
@@ -1018,6 +1001,18 @@ static const struct ieee80211_ops rt2800pci_mac80211_ops = { | |||
1018 | .ampdu_action = rt2800_ampdu_action, | 1001 | .ampdu_action = rt2800_ampdu_action, |
1019 | }; | 1002 | }; |
1020 | 1003 | ||
1004 | static const struct rt2800_ops rt2800pci_rt2800_ops = { | ||
1005 | .register_read = rt2x00pci_register_read, | ||
1006 | .register_read_lock = rt2x00pci_register_read, /* same for PCI */ | ||
1007 | .register_write = rt2x00pci_register_write, | ||
1008 | .register_write_lock = rt2x00pci_register_write, /* same for PCI */ | ||
1009 | .register_multiread = rt2x00pci_register_multiread, | ||
1010 | .register_multiwrite = rt2x00pci_register_multiwrite, | ||
1011 | .regbusy_read = rt2x00pci_regbusy_read, | ||
1012 | .drv_write_firmware = rt2800pci_write_firmware, | ||
1013 | .drv_init_registers = rt2800pci_init_registers, | ||
1014 | }; | ||
1015 | |||
1021 | static const struct rt2x00lib_ops rt2800pci_rt2x00_ops = { | 1016 | static const struct rt2x00lib_ops rt2800pci_rt2x00_ops = { |
1022 | .irq_handler = rt2800pci_interrupt, | 1017 | .irq_handler = rt2800pci_interrupt, |
1023 | .irq_handler_thread = rt2800pci_interrupt_thread, | 1018 | .irq_handler_thread = rt2800pci_interrupt_thread, |
@@ -1082,6 +1077,7 @@ static const struct rt2x00_ops rt2800pci_ops = { | |||
1082 | .tx = &rt2800pci_queue_tx, | 1077 | .tx = &rt2800pci_queue_tx, |
1083 | .bcn = &rt2800pci_queue_bcn, | 1078 | .bcn = &rt2800pci_queue_bcn, |
1084 | .lib = &rt2800pci_rt2x00_ops, | 1079 | .lib = &rt2800pci_rt2x00_ops, |
1080 | .drv = &rt2800pci_rt2800_ops, | ||
1085 | .hw = &rt2800pci_mac80211_ops, | 1081 | .hw = &rt2800pci_mac80211_ops, |
1086 | #ifdef CONFIG_RT2X00_LIB_DEBUGFS | 1082 | #ifdef CONFIG_RT2X00_LIB_DEBUGFS |
1087 | .debugfs = &rt2800_rt2x00debug, | 1083 | .debugfs = &rt2800_rt2x00debug, |