aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2500pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2500pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2500pci.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
index 66a94c2f1b3c..928452f30c25 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/rt2x00/rt2500pci.c
@@ -188,43 +188,34 @@ static void rt2500pci_eepromregister_write(struct eeprom_93cx6 *eeprom)
188} 188}
189 189
190#ifdef CONFIG_RT2X00_LIB_DEBUGFS 190#ifdef CONFIG_RT2X00_LIB_DEBUGFS
191#define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) )
192
193static void rt2500pci_read_csr(struct rt2x00_dev *rt2x00dev,
194 const unsigned int word, u32 *data)
195{
196 rt2x00pci_register_read(rt2x00dev, CSR_OFFSET(word), data);
197}
198
199static void rt2500pci_write_csr(struct rt2x00_dev *rt2x00dev,
200 const unsigned int word, u32 data)
201{
202 rt2x00pci_register_write(rt2x00dev, CSR_OFFSET(word), data);
203}
204
205static const struct rt2x00debug rt2500pci_rt2x00debug = { 191static const struct rt2x00debug rt2500pci_rt2x00debug = {
206 .owner = THIS_MODULE, 192 .owner = THIS_MODULE,
207 .csr = { 193 .csr = {
208 .read = rt2500pci_read_csr, 194 .read = rt2x00pci_register_read,
209 .write = rt2500pci_write_csr, 195 .write = rt2x00pci_register_write,
196 .flags = RT2X00DEBUGFS_OFFSET,
197 .word_base = CSR_REG_BASE,
210 .word_size = sizeof(u32), 198 .word_size = sizeof(u32),
211 .word_count = CSR_REG_SIZE / sizeof(u32), 199 .word_count = CSR_REG_SIZE / sizeof(u32),
212 }, 200 },
213 .eeprom = { 201 .eeprom = {
214 .read = rt2x00_eeprom_read, 202 .read = rt2x00_eeprom_read,
215 .write = rt2x00_eeprom_write, 203 .write = rt2x00_eeprom_write,
204 .word_base = EEPROM_BASE,
216 .word_size = sizeof(u16), 205 .word_size = sizeof(u16),
217 .word_count = EEPROM_SIZE / sizeof(u16), 206 .word_count = EEPROM_SIZE / sizeof(u16),
218 }, 207 },
219 .bbp = { 208 .bbp = {
220 .read = rt2500pci_bbp_read, 209 .read = rt2500pci_bbp_read,
221 .write = rt2500pci_bbp_write, 210 .write = rt2500pci_bbp_write,
211 .word_base = BBP_BASE,
222 .word_size = sizeof(u8), 212 .word_size = sizeof(u8),
223 .word_count = BBP_SIZE / sizeof(u8), 213 .word_count = BBP_SIZE / sizeof(u8),
224 }, 214 },
225 .rf = { 215 .rf = {
226 .read = rt2x00_rf_read, 216 .read = rt2x00_rf_read,
227 .write = rt2500pci_rf_write, 217 .write = rt2500pci_rf_write,
218 .word_base = RF_BASE,
228 .word_size = sizeof(u32), 219 .word_size = sizeof(u32),
229 .word_count = RF_SIZE / sizeof(u32), 220 .word_count = RF_SIZE / sizeof(u32),
230 }, 221 },