rt2x00: change function pointers for register accessors
authorArnd Bergmann <arnd@arndb.de>
Wed, 17 May 2017 14:46:53 +0000 (16:46 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 24 May 2017 13:45:32 +0000 (16:45 +0300)
This prepares the driver for changing all the 'read' register accessors
to return the value instead of passing it by reference. Since a lot
of them are used in callbacks, this takes care of the callbacks first,
adding a couple of helpers that will be removed again one at a time.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
15 files changed:
drivers/net/wireless/ralink/rt2x00/rt2400pci.c
drivers/net/wireless/ralink/rt2x00/rt2500pci.c
drivers/net/wireless/ralink/rt2x00/rt2500usb.c
drivers/net/wireless/ralink/rt2x00/rt2800lib.c
drivers/net/wireless/ralink/rt2x00/rt2800lib.h
drivers/net/wireless/ralink/rt2x00/rt2800pci.c
drivers/net/wireless/ralink/rt2x00/rt2800soc.c
drivers/net/wireless/ralink/rt2x00/rt2800usb.c
drivers/net/wireless/ralink/rt2x00/rt2x00.h
drivers/net/wireless/ralink/rt2x00/rt2x00debug.c
drivers/net/wireless/ralink/rt2x00/rt2x00debug.h
drivers/net/wireless/ralink/rt2x00/rt2x00mmio.h
drivers/net/wireless/ralink/rt2x00/rt2x00usb.h
drivers/net/wireless/ralink/rt2x00/rt61pci.c
drivers/net/wireless/ralink/rt2x00/rt73usb.c

index 19874439ac40fc6419ccee96e062846a972067c8..3ba9a1674e1d9d71a706e00a847ef0766ff88e32 100644 (file)
@@ -164,10 +164,20 @@ static void rt2400pci_eepromregister_write(struct eeprom_93cx6 *eeprom)
 }
 
 #ifdef CONFIG_RT2X00_LIB_DEBUGFS
+static u8 _rt2400pci_bbp_read(struct rt2x00_dev *rt2x00dev,
+                             const unsigned int word)
+{
+       u8 value;
+
+       rt2400pci_bbp_read(rt2x00dev, word, &value);
+
+       return value;
+}
+
 static const struct rt2x00debug rt2400pci_rt2x00debug = {
        .owner  = THIS_MODULE,
        .csr    = {
-               .read           = rt2x00mmio_register_read,
+               .read           = _rt2x00mmio_register_read,
                .write          = rt2x00mmio_register_write,
                .flags          = RT2X00DEBUGFS_OFFSET,
                .word_base      = CSR_REG_BASE,
@@ -175,21 +185,21 @@ static const struct rt2x00debug rt2400pci_rt2x00debug = {
                .word_count     = CSR_REG_SIZE / sizeof(u32),
        },
        .eeprom = {
-               .read           = rt2x00_eeprom_read,
+               .read           = _rt2x00_eeprom_read,
                .write          = rt2x00_eeprom_write,
                .word_base      = EEPROM_BASE,
                .word_size      = sizeof(u16),
                .word_count     = EEPROM_SIZE / sizeof(u16),
        },
        .bbp    = {
-               .read           = rt2400pci_bbp_read,
+               .read           = _rt2400pci_bbp_read,
                .write          = rt2400pci_bbp_write,
                .word_base      = BBP_BASE,
                .word_size      = sizeof(u8),
                .word_count     = BBP_SIZE / sizeof(u8),
        },
        .rf     = {
-               .read           = rt2x00_rf_read,
+               .read           = _rt2x00_rf_read,
                .write          = rt2400pci_rf_write,
                .word_base      = RF_BASE,
                .word_size      = sizeof(u32),
index 791434de8052e7ecba344c9a5f379a7b78b1f35e..d9b061b73e83852164756e035c2a660b80594479 100644 (file)
@@ -164,10 +164,20 @@ static void rt2500pci_eepromregister_write(struct eeprom_93cx6 *eeprom)
 }
 
 #ifdef CONFIG_RT2X00_LIB_DEBUGFS
+static u8 _rt2500pci_bbp_read(struct rt2x00_dev *rt2x00dev,
+                             const unsigned int word)
+{
+       u8 value;
+
+       rt2500pci_bbp_read(rt2x00dev, word, &value);
+
+       return value;
+}
+
 static const struct rt2x00debug rt2500pci_rt2x00debug = {
        .owner  = THIS_MODULE,
        .csr    = {
-               .read           = rt2x00mmio_register_read,
+               .read           = _rt2x00mmio_register_read,
                .write          = rt2x00mmio_register_write,
                .flags          = RT2X00DEBUGFS_OFFSET,
                .word_base      = CSR_REG_BASE,
@@ -175,21 +185,21 @@ static const struct rt2x00debug rt2500pci_rt2x00debug = {
                .word_count     = CSR_REG_SIZE / sizeof(u32),
        },
        .eeprom = {
-               .read           = rt2x00_eeprom_read,
+               .read           = _rt2x00_eeprom_read,
                .write          = rt2x00_eeprom_write,
                .word_base      = EEPROM_BASE,
                .word_size      = sizeof(u16),
                .word_count     = EEPROM_SIZE / sizeof(u16),
        },
        .bbp    = {
-               .read           = rt2500pci_bbp_read,
+               .read           = _rt2500pci_bbp_read,
                .write          = rt2500pci_bbp_write,
                .word_base      = BBP_BASE,
                .word_size      = sizeof(u8),
                .word_count     = BBP_SIZE / sizeof(u8),
        },
        .rf     = {
-               .read           = rt2x00_rf_read,
+               .read           = _rt2x00_rf_read,
                .write          = rt2500pci_rf_write,
                .word_base      = RF_BASE,
                .word_size      = sizeof(u32),
index 0d2670a56c4c5c116ac0c9108ace68bb1bfe261e..5bd160f732deb4fd6b5a8a44367a1f54df5ce14d 100644 (file)
@@ -216,14 +216,14 @@ static void rt2500usb_rf_write(struct rt2x00_dev *rt2x00dev,
 }
 
 #ifdef CONFIG_RT2X00_LIB_DEBUGFS
-static void _rt2500usb_register_read(struct rt2x00_dev *rt2x00dev,
-                                    const unsigned int offset,
-                                    u32 *value)
+static u32 _rt2500usb_register_read(struct rt2x00_dev *rt2x00dev,
+                                    const unsigned int offset)
 {
        u16 tmp;
 
        rt2500usb_register_read(rt2x00dev, offset, &tmp);
-       *value = tmp;
+
+       return tmp;
 }
 
 static void _rt2500usb_register_write(struct rt2x00_dev *rt2x00dev,
@@ -233,6 +233,16 @@ static void _rt2500usb_register_write(struct rt2x00_dev *rt2x00dev,
        rt2500usb_register_write(rt2x00dev, offset, value);
 }
 
+static u8 _rt2500usb_bbp_read(struct rt2x00_dev *rt2x00dev,
+                             const unsigned int word)
+{
+       u8 value;
+
+       rt2500usb_bbp_read(rt2x00dev, word, &value);
+
+       return value;
+}
+
 static const struct rt2x00debug rt2500usb_rt2x00debug = {
        .owner  = THIS_MODULE,
        .csr    = {
@@ -244,21 +254,21 @@ static const struct rt2x00debug rt2500usb_rt2x00debug = {
                .word_count     = CSR_REG_SIZE / sizeof(u16),
        },
        .eeprom = {
-               .read           = rt2x00_eeprom_read,
+               .read           = _rt2x00_eeprom_read,
                .write          = rt2x00_eeprom_write,
                .word_base      = EEPROM_BASE,
                .word_size      = sizeof(u16),
                .word_count     = EEPROM_SIZE / sizeof(u16),
        },
        .bbp    = {
-               .read           = rt2500usb_bbp_read,
+               .read           = _rt2500usb_bbp_read,
                .write          = rt2500usb_bbp_write,
                .word_base      = BBP_BASE,
                .word_size      = sizeof(u8),
                .word_count     = BBP_SIZE / sizeof(u8),
        },
        .rf     = {
-               .read           = rt2x00_rf_read,
+               .read           = _rt2x00_rf_read,
                .write          = rt2500usb_rf_write,
                .word_base      = RF_BASE,
                .word_size      = sizeof(u32),
index d11c7b210e8133174b59688994f0c1e9c22c09ad..87cfc135e564115e8062e4728d2b3f7e25dd0e63 100644 (file)
@@ -1225,10 +1225,28 @@ void rt2800_clear_beacon(struct queue_entry *entry)
 EXPORT_SYMBOL_GPL(rt2800_clear_beacon);
 
 #ifdef CONFIG_RT2X00_LIB_DEBUGFS
+static u8 _rt2800_bbp_read(struct rt2x00_dev *rt2x00dev, const unsigned int word)
+{
+       u8 value;
+
+       rt2800_bbp_read(rt2x00dev, word, &value);
+
+       return value;
+}
+
+static u8 _rt2800_rfcsr_read(struct rt2x00_dev *rt2x00dev, const unsigned int word)
+{
+       u8 value;
+
+       rt2800_rfcsr_read(rt2x00dev, word, &value);
+
+       return value;
+}
+
 const struct rt2x00debug rt2800_rt2x00debug = {
        .owner  = THIS_MODULE,
        .csr    = {
-               .read           = rt2800_register_read,
+               .read           = _rt2800_register_read,
                .write          = rt2800_register_write,
                .flags          = RT2X00DEBUGFS_OFFSET,
                .word_base      = CSR_REG_BASE,
@@ -1239,28 +1257,28 @@ const struct rt2x00debug rt2800_rt2x00debug = {
                /* NOTE: The local EEPROM access functions can't
                 * be used here, use the generic versions instead.
                 */
-               .read           = rt2x00_eeprom_read,
+               .read           = _rt2x00_eeprom_read,
                .write          = rt2x00_eeprom_write,
                .word_base      = EEPROM_BASE,
                .word_size      = sizeof(u16),
                .word_count     = EEPROM_SIZE / sizeof(u16),
        },
        .bbp    = {
-               .read           = rt2800_bbp_read,
+               .read           = _rt2800_bbp_read,
                .write          = rt2800_bbp_write,
                .word_base      = BBP_BASE,
                .word_size      = sizeof(u8),
                .word_count     = BBP_SIZE / sizeof(u8),
        },
        .rf     = {
-               .read           = rt2x00_rf_read,
+               .read           = _rt2x00_rf_read,
                .write          = rt2800_rf_write,
                .word_base      = RF_BASE,
                .word_size      = sizeof(u32),
                .word_count     = RF_SIZE / sizeof(u32),
        },
        .rfcsr  = {
-               .read           = rt2800_rfcsr_read,
+               .read           = _rt2800_rfcsr_read,
                .write          = rt2800_rfcsr_write,
                .word_base      = RFCSR_BASE,
                .word_size      = sizeof(u8),
index f357531d9488d99d97033ac049d4ebbe99b70be2..6bed0d5e930e400e863bd27392e091177007bf80 100644 (file)
@@ -49,10 +49,10 @@ struct rt2800_drv_data {
 };
 
 struct rt2800_ops {
-       void (*register_read)(struct rt2x00_dev *rt2x00dev,
-                             const unsigned int offset, u32 *value);
-       void (*register_read_lock)(struct rt2x00_dev *rt2x00dev,
-                                  const unsigned int offset, u32 *value);
+       u32 (*register_read)(struct rt2x00_dev *rt2x00dev,
+                             const unsigned int offset);
+       u32 (*register_read_lock)(struct rt2x00_dev *rt2x00dev,
+                                  const unsigned int offset);
        void (*register_write)(struct rt2x00_dev *rt2x00dev,
                               const unsigned int offset, u32 value);
        void (*register_write_lock)(struct rt2x00_dev *rt2x00dev,
@@ -84,7 +84,7 @@ static inline void rt2800_register_read(struct rt2x00_dev *rt2x00dev,
 {
        const struct rt2800_ops *rt2800ops = rt2x00dev->ops->drv;
 
-       rt2800ops->register_read(rt2x00dev, offset, value);
+       *value = rt2800ops->register_read(rt2x00dev, offset);
 }
 
 static inline void rt2800_register_read_lock(struct rt2x00_dev *rt2x00dev,
@@ -93,7 +93,15 @@ static inline void rt2800_register_read_lock(struct rt2x00_dev *rt2x00dev,
 {
        const struct rt2800_ops *rt2800ops = rt2x00dev->ops->drv;
 
-       rt2800ops->register_read_lock(rt2x00dev, offset, value);
+       *value = rt2800ops->register_read_lock(rt2x00dev, offset);
+}
+
+static inline u32 _rt2800_register_read(struct rt2x00_dev *rt2x00dev,
+                                       const unsigned int offset)
+{
+       const struct rt2800_ops *rt2800ops = rt2x00dev->ops->drv;
+
+       return rt2800ops->register_read(rt2x00dev, offset);
 }
 
 static inline void rt2800_register_write(struct rt2x00_dev *rt2x00dev,
index 0af22573a2eb5daa478ffbe0dadcca7feb2eb104..98f16312e3f1ffb93bcc0d58cf70edc305ca2f95 100644 (file)
@@ -325,8 +325,8 @@ static const struct ieee80211_ops rt2800pci_mac80211_ops = {
 };
 
 static const struct rt2800_ops rt2800pci_rt2800_ops = {
-       .register_read          = rt2x00mmio_register_read,
-       .register_read_lock     = rt2x00mmio_register_read, /* same for PCI */
+       .register_read          = _rt2x00mmio_register_read,
+       .register_read_lock     = _rt2x00mmio_register_read, /* same for PCI */
        .register_write         = rt2x00mmio_register_write,
        .register_write_lock    = rt2x00mmio_register_write, /* same for PCI */
        .register_multiread     = rt2x00mmio_register_multiread,
index a985a5a7945e77173867667a38f2dbe43d869cca..c1eda3798b9bc0f5bb7813ad091cf3fc731cb940 100644 (file)
@@ -164,8 +164,8 @@ static const struct ieee80211_ops rt2800soc_mac80211_ops = {
 };
 
 static const struct rt2800_ops rt2800soc_rt2800_ops = {
-       .register_read          = rt2x00mmio_register_read,
-       .register_read_lock     = rt2x00mmio_register_read, /* same for SoCs */
+       .register_read          = _rt2x00mmio_register_read,
+       .register_read_lock     = _rt2x00mmio_register_read, /* same for SoCs */
        .register_write         = rt2x00mmio_register_write,
        .register_write_lock    = rt2x00mmio_register_write, /* same for SoCs */
        .register_multiread     = rt2x00mmio_register_multiread,
index f11e3f532a84e48e17e9d530030c3f066099fe7f..7fd7e6114c0c9effc3253a30dd680570c6cbc7f3 100644 (file)
@@ -802,8 +802,8 @@ static const struct ieee80211_ops rt2800usb_mac80211_ops = {
 };
 
 static const struct rt2800_ops rt2800usb_rt2800_ops = {
-       .register_read          = rt2x00usb_register_read,
-       .register_read_lock     = rt2x00usb_register_read_lock,
+       .register_read          = _rt2x00usb_register_read,
+       .register_read_lock     = _rt2x00usb_register_read_lock,
        .register_write         = rt2x00usb_register_write,
        .register_write_lock    = rt2x00usb_register_write_lock,
        .register_multiread     = rt2x00usb_register_multiread,
index 1bc353eafe37dea8408428ffc0b710ddd7ffadc9..f2ae33bf2ef2da4b509cbcb0163b9cc0b1643d4b 100644 (file)
@@ -1056,6 +1056,13 @@ static inline void rt2x00_rf_read(struct rt2x00_dev *rt2x00dev,
        *data = rt2x00dev->rf[word - 1];
 }
 
+static inline u32 _rt2x00_rf_read(struct rt2x00_dev *rt2x00dev,
+                                 const unsigned int word)
+{
+       BUG_ON(word < 1 || word > rt2x00dev->ops->rf_size / sizeof(u32));
+       return rt2x00dev->rf[word - 1];
+}
+
 static inline void rt2x00_rf_write(struct rt2x00_dev *rt2x00dev,
                                   const unsigned int word, u32 data)
 {
@@ -1078,6 +1085,12 @@ static inline void rt2x00_eeprom_read(struct rt2x00_dev *rt2x00dev,
        *data = le16_to_cpu(rt2x00dev->eeprom[word]);
 }
 
+static inline u16 _rt2x00_eeprom_read(struct rt2x00_dev *rt2x00dev,
+                                     const unsigned int word)
+{
+       return le16_to_cpu(rt2x00dev->eeprom[word]);
+}
+
 static inline void rt2x00_eeprom_write(struct rt2x00_dev *rt2x00dev,
                                       const unsigned int word, u16 data)
 {
index 964aefdc11f004593d4f171a87895687dde57108..4a1bca1b1e2678e97387d19d338a46cb3b62aa34 100644 (file)
@@ -460,7 +460,7 @@ static ssize_t rt2x00debug_read_##__name(struct file *file, \
        if (debug->__name.flags & RT2X00DEBUGFS_OFFSET)         \
                index *= debug->__name.word_size;               \
                                                                \
-       debug->__name.read(intf->rt2x00dev, index, &value);     \
+       value = debug->__name.read(intf->rt2x00dev, index);     \
                                                                \
        size = sprintf(line, __format, value);                  \
                                                                \
index e65712c235bd2829f12a1b3f7d4daa1209837ec0..a357a0727a0b90def5b009f824d4d7c55945bf0a 100644 (file)
@@ -38,8 +38,8 @@ enum rt2x00debugfs_entry_flags {
 
 #define RT2X00DEBUGFS_REGISTER_ENTRY(__name, __type)           \
 struct reg##__name {                                           \
-       void (*read)(struct rt2x00_dev *rt2x00dev,              \
-                    const unsigned int word, __type *data);    \
+       __type (*read)(struct rt2x00_dev *rt2x00dev,            \
+                    const unsigned int word);                  \
        void (*write)(struct rt2x00_dev *rt2x00dev,             \
                      const unsigned int word, __type data);    \
                                                                \
index 701c3127efb96bdb647ff19e21684134fc25e9e1..6d7a27ee644472fafc660059476e5ca178c4907c 100644 (file)
@@ -36,6 +36,12 @@ static inline void rt2x00mmio_register_read(struct rt2x00_dev *rt2x00dev,
        *value = readl(rt2x00dev->csr.base + offset);
 }
 
+static inline u32 _rt2x00mmio_register_read(struct rt2x00_dev *rt2x00dev,
+                                          const unsigned int offset)
+{
+       return readl(rt2x00dev->csr.base + offset);
+}
+
 static inline void rt2x00mmio_register_multiread(struct rt2x00_dev *rt2x00dev,
                                                 const unsigned int offset,
                                                 void *value, const u32 length)
index 569363da00a2999fca8cac2d425347d759a62b08..4cad1beec791d2875617aba347855ca4d4e92a21 100644 (file)
@@ -206,6 +206,16 @@ static inline void rt2x00usb_register_read(struct rt2x00_dev *rt2x00dev,
        *value = le32_to_cpu(reg);
 }
 
+static inline u32 _rt2x00usb_register_read(struct rt2x00_dev *rt2x00dev,
+                                          const unsigned int offset)
+{
+       __le32 reg = 0;
+       rt2x00usb_vendor_request_buff(rt2x00dev, USB_MULTI_READ,
+                                     USB_VENDOR_REQUEST_IN, offset,
+                                     &reg, sizeof(reg));
+       return le32_to_cpu(reg);
+}
+
 /**
  * rt2x00usb_register_read_lock - Read 32bit register word
  * @rt2x00dev: Device pointer, see &struct rt2x00_dev.
@@ -216,7 +226,7 @@ static inline void rt2x00usb_register_read(struct rt2x00_dev *rt2x00dev,
  * through rt2x00usb_vendor_req_buff_lock().
  */
 static inline void rt2x00usb_register_read_lock(struct rt2x00_dev *rt2x00dev,
-                                               const unsigned int offset,
+                                               const unsigned int offset,
                                                u32 *value)
 {
        __le32 reg = 0;
@@ -226,6 +236,16 @@ static inline void rt2x00usb_register_read_lock(struct rt2x00_dev *rt2x00dev,
        *value = le32_to_cpu(reg);
 }
 
+static inline u32 _rt2x00usb_register_read_lock(struct rt2x00_dev *rt2x00dev,
+                                               const unsigned int offset)
+{
+       __le32 reg = 0;
+       rt2x00usb_vendor_req_buff_lock(rt2x00dev, USB_MULTI_READ,
+                                      USB_VENDOR_REQUEST_IN, offset,
+                                      &reg, sizeof(reg), REGISTER_TIMEOUT);
+       return le32_to_cpu(reg);
+}
+
 /**
  * rt2x00usb_register_multiread - Read 32bit register words
  * @rt2x00dev: Device pointer, see &struct rt2x00_dev.
index 973d418b81130321a95d0f4e1dacb11c4a225e20..efe8a766b25126f790ea3b98527280da377f5df1 100644 (file)
@@ -202,10 +202,19 @@ static void rt61pci_eepromregister_write(struct eeprom_93cx6 *eeprom)
 }
 
 #ifdef CONFIG_RT2X00_LIB_DEBUGFS
+static u8 _rt61pci_bbp_read(struct rt2x00_dev *rt2x00dev, const unsigned int word)
+{
+       u8 value;
+
+       rt61pci_bbp_read(rt2x00dev, word, &value);
+
+       return value;
+}
+
 static const struct rt2x00debug rt61pci_rt2x00debug = {
        .owner  = THIS_MODULE,
        .csr    = {
-               .read           = rt2x00mmio_register_read,
+               .read           = _rt2x00mmio_register_read,
                .write          = rt2x00mmio_register_write,
                .flags          = RT2X00DEBUGFS_OFFSET,
                .word_base      = CSR_REG_BASE,
@@ -213,21 +222,21 @@ static const struct rt2x00debug rt61pci_rt2x00debug = {
                .word_count     = CSR_REG_SIZE / sizeof(u32),
        },
        .eeprom = {
-               .read           = rt2x00_eeprom_read,
+               .read           = _rt2x00_eeprom_read,
                .write          = rt2x00_eeprom_write,
                .word_base      = EEPROM_BASE,
                .word_size      = sizeof(u16),
                .word_count     = EEPROM_SIZE / sizeof(u16),
        },
        .bbp    = {
-               .read           = rt61pci_bbp_read,
+               .read           = _rt61pci_bbp_read,
                .write          = rt61pci_bbp_write,
                .word_base      = BBP_BASE,
                .word_size      = sizeof(u8),
                .word_count     = BBP_SIZE / sizeof(u8),
        },
        .rf     = {
-               .read           = rt2x00_rf_read,
+               .read           = _rt2x00_rf_read,
                .write          = rt61pci_rf_write,
                .word_base      = RF_BASE,
                .word_size      = sizeof(u32),
index bb8d307a789ff77a619dc05fc045e58f79ee624b..5db174922120501d599b65b78a9805fa7c2f07ee 100644 (file)
@@ -147,10 +147,19 @@ static void rt73usb_rf_write(struct rt2x00_dev *rt2x00dev,
 }
 
 #ifdef CONFIG_RT2X00_LIB_DEBUGFS
+static u8 _rt73usb_bbp_read(struct rt2x00_dev *rt2x00dev, const unsigned int word)
+{
+       u8 value;
+
+       rt73usb_bbp_read(rt2x00dev, word, &value);
+
+       return value;
+}
+
 static const struct rt2x00debug rt73usb_rt2x00debug = {
        .owner  = THIS_MODULE,
        .csr    = {
-               .read           = rt2x00usb_register_read,
+               .read           = _rt2x00usb_register_read,
                .write          = rt2x00usb_register_write,
                .flags          = RT2X00DEBUGFS_OFFSET,
                .word_base      = CSR_REG_BASE,
@@ -158,21 +167,21 @@ static const struct rt2x00debug rt73usb_rt2x00debug = {
                .word_count     = CSR_REG_SIZE / sizeof(u32),
        },
        .eeprom = {
-               .read           = rt2x00_eeprom_read,
+               .read           = _rt2x00_eeprom_read,
                .write          = rt2x00_eeprom_write,
                .word_base      = EEPROM_BASE,
                .word_size      = sizeof(u16),
                .word_count     = EEPROM_SIZE / sizeof(u16),
        },
        .bbp    = {
-               .read           = rt73usb_bbp_read,
+               .read           = _rt73usb_bbp_read,
                .write          = rt73usb_bbp_write,
                .word_base      = BBP_BASE,
                .word_size      = sizeof(u8),
                .word_count     = BBP_SIZE / sizeof(u8),
        },
        .rf     = {
-               .read           = rt2x00_rf_read,
+               .read           = _rt2x00_rf_read,
                .write          = rt73usb_rf_write,
                .word_base      = RF_BASE,
                .word_size      = sizeof(u32),