diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt61pci.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt61pci.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index bd4a6e1ec9dd..3f272793412a 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -228,43 +228,34 @@ static void rt61pci_eepromregister_write(struct eeprom_93cx6 *eeprom) | |||
228 | } | 228 | } |
229 | 229 | ||
230 | #ifdef CONFIG_RT2X00_LIB_DEBUGFS | 230 | #ifdef CONFIG_RT2X00_LIB_DEBUGFS |
231 | #define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) ) | ||
232 | |||
233 | static void rt61pci_read_csr(struct rt2x00_dev *rt2x00dev, | ||
234 | const unsigned int word, u32 *data) | ||
235 | { | ||
236 | rt2x00pci_register_read(rt2x00dev, CSR_OFFSET(word), data); | ||
237 | } | ||
238 | |||
239 | static void rt61pci_write_csr(struct rt2x00_dev *rt2x00dev, | ||
240 | const unsigned int word, u32 data) | ||
241 | { | ||
242 | rt2x00pci_register_write(rt2x00dev, CSR_OFFSET(word), data); | ||
243 | } | ||
244 | |||
245 | static const struct rt2x00debug rt61pci_rt2x00debug = { | 231 | static const struct rt2x00debug rt61pci_rt2x00debug = { |
246 | .owner = THIS_MODULE, | 232 | .owner = THIS_MODULE, |
247 | .csr = { | 233 | .csr = { |
248 | .read = rt61pci_read_csr, | 234 | .read = rt2x00pci_register_read, |
249 | .write = rt61pci_write_csr, | 235 | .write = rt2x00pci_register_write, |
236 | .flags = RT2X00DEBUGFS_OFFSET, | ||
237 | .word_base = CSR_REG_BASE, | ||
250 | .word_size = sizeof(u32), | 238 | .word_size = sizeof(u32), |
251 | .word_count = CSR_REG_SIZE / sizeof(u32), | 239 | .word_count = CSR_REG_SIZE / sizeof(u32), |
252 | }, | 240 | }, |
253 | .eeprom = { | 241 | .eeprom = { |
254 | .read = rt2x00_eeprom_read, | 242 | .read = rt2x00_eeprom_read, |
255 | .write = rt2x00_eeprom_write, | 243 | .write = rt2x00_eeprom_write, |
244 | .word_base = EEPROM_BASE, | ||
256 | .word_size = sizeof(u16), | 245 | .word_size = sizeof(u16), |
257 | .word_count = EEPROM_SIZE / sizeof(u16), | 246 | .word_count = EEPROM_SIZE / sizeof(u16), |
258 | }, | 247 | }, |
259 | .bbp = { | 248 | .bbp = { |
260 | .read = rt61pci_bbp_read, | 249 | .read = rt61pci_bbp_read, |
261 | .write = rt61pci_bbp_write, | 250 | .write = rt61pci_bbp_write, |
251 | .word_base = BBP_BASE, | ||
262 | .word_size = sizeof(u8), | 252 | .word_size = sizeof(u8), |
263 | .word_count = BBP_SIZE / sizeof(u8), | 253 | .word_count = BBP_SIZE / sizeof(u8), |
264 | }, | 254 | }, |
265 | .rf = { | 255 | .rf = { |
266 | .read = rt2x00_rf_read, | 256 | .read = rt2x00_rf_read, |
267 | .write = rt61pci_rf_write, | 257 | .write = rt61pci_rf_write, |
258 | .word_base = RF_BASE, | ||
268 | .word_size = sizeof(u32), | 259 | .word_size = sizeof(u32), |
269 | .word_count = RF_SIZE / sizeof(u32), | 260 | .word_count = RF_SIZE / sizeof(u32), |
270 | }, | 261 | }, |