aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt73usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt73usb.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt73usb.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index 5be49ed4ecf9..767e3c98184c 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -249,43 +249,34 @@ rf_write:
249} 249}
250 250
251#ifdef CONFIG_RT2X00_LIB_DEBUGFS 251#ifdef CONFIG_RT2X00_LIB_DEBUGFS
252#define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) )
253
254static void rt73usb_read_csr(struct rt2x00_dev *rt2x00dev,
255 const unsigned int word, u32 *data)
256{
257 rt73usb_register_read(rt2x00dev, CSR_OFFSET(word), data);
258}
259
260static void rt73usb_write_csr(struct rt2x00_dev *rt2x00dev,
261 const unsigned int word, u32 data)
262{
263 rt73usb_register_write(rt2x00dev, CSR_OFFSET(word), data);
264}
265
266static const struct rt2x00debug rt73usb_rt2x00debug = { 252static const struct rt2x00debug rt73usb_rt2x00debug = {
267 .owner = THIS_MODULE, 253 .owner = THIS_MODULE,
268 .csr = { 254 .csr = {
269 .read = rt73usb_read_csr, 255 .read = rt73usb_register_read,
270 .write = rt73usb_write_csr, 256 .write = rt73usb_register_write,
257 .flags = RT2X00DEBUGFS_OFFSET,
258 .word_base = CSR_REG_BASE,
271 .word_size = sizeof(u32), 259 .word_size = sizeof(u32),
272 .word_count = CSR_REG_SIZE / sizeof(u32), 260 .word_count = CSR_REG_SIZE / sizeof(u32),
273 }, 261 },
274 .eeprom = { 262 .eeprom = {
275 .read = rt2x00_eeprom_read, 263 .read = rt2x00_eeprom_read,
276 .write = rt2x00_eeprom_write, 264 .write = rt2x00_eeprom_write,
265 .word_base = EEPROM_BASE,
277 .word_size = sizeof(u16), 266 .word_size = sizeof(u16),
278 .word_count = EEPROM_SIZE / sizeof(u16), 267 .word_count = EEPROM_SIZE / sizeof(u16),
279 }, 268 },
280 .bbp = { 269 .bbp = {
281 .read = rt73usb_bbp_read, 270 .read = rt73usb_bbp_read,
282 .write = rt73usb_bbp_write, 271 .write = rt73usb_bbp_write,
272 .word_base = BBP_BASE,
283 .word_size = sizeof(u8), 273 .word_size = sizeof(u8),
284 .word_count = BBP_SIZE / sizeof(u8), 274 .word_count = BBP_SIZE / sizeof(u8),
285 }, 275 },
286 .rf = { 276 .rf = {
287 .read = rt2x00_rf_read, 277 .read = rt2x00_rf_read,
288 .write = rt73usb_rf_write, 278 .write = rt73usb_rf_write,
279 .word_base = RF_BASE,
289 .word_size = sizeof(u32), 280 .word_size = sizeof(u32),
290 .word_count = RF_SIZE / sizeof(u32), 281 .word_count = RF_SIZE / sizeof(u32),
291 }, 282 },