rt2800usb: add rt2800_rf_[read,write]() wrappers
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Wed, 4 Nov 2009 17:34:18 +0000 (18:34 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 6 Nov 2009 21:48:51 +0000 (16:48 -0500)
Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2800usb.c

index 8cfb5573b883e183165cde72038d4235b9098274..15aed2916e0c9d7732ec2e4ada9c283b8622aae0 100644 (file)
@@ -226,6 +226,12 @@ static void rt2800usb_rf_write(struct rt2x00_dev *rt2x00dev,
        mutex_unlock(&rt2x00dev->csr_mutex);
 }
 
+static inline void rt2800_rf_write(struct rt2x00_dev *rt2x00dev,
+                                  const unsigned int word, const u32 value)
+{
+       rt2800usb_rf_write(rt2x00dev, word, value);
+}
+
 static void rt2800usb_mcu_request(struct rt2x00_dev *rt2x00dev,
                                  const u8 command, const u8 token,
                                  const u8 arg0, const u8 arg1)
@@ -280,7 +286,7 @@ static const struct rt2x00debug rt2800usb_rt2x00debug = {
        },
        .rf     = {
                .read           = rt2x00_rf_read,
-               .write          = rt2800usb_rf_write,
+               .write          = rt2800_rf_write,
                .word_base      = RF_BASE,
                .word_size      = sizeof(u32),
                .word_count     = RF_SIZE / sizeof(u32),
@@ -747,24 +753,24 @@ static void rt2800usb_config_channel_rt2x(struct rt2x00_dev *rt2x00dev,
 
        rt2x00_set_field32(&rf->rf4, RF4_HT40, conf_is_ht40(conf));
 
-       rt2800usb_rf_write(rt2x00dev, 1, rf->rf1);
-       rt2800usb_rf_write(rt2x00dev, 2, rf->rf2);
-       rt2800usb_rf_write(rt2x00dev, 3, rf->rf3 & ~0x00000004);
-       rt2800usb_rf_write(rt2x00dev, 4, rf->rf4);
+       rt2800_rf_write(rt2x00dev, 1, rf->rf1);
+       rt2800_rf_write(rt2x00dev, 2, rf->rf2);
+       rt2800_rf_write(rt2x00dev, 3, rf->rf3 & ~0x00000004);
+       rt2800_rf_write(rt2x00dev, 4, rf->rf4);
 
        udelay(200);
 
-       rt2800usb_rf_write(rt2x00dev, 1, rf->rf1);
-       rt2800usb_rf_write(rt2x00dev, 2, rf->rf2);
-       rt2800usb_rf_write(rt2x00dev, 3, rf->rf3 | 0x00000004);
-       rt2800usb_rf_write(rt2x00dev, 4, rf->rf4);
+       rt2800_rf_write(rt2x00dev, 1, rf->rf1);
+       rt2800_rf_write(rt2x00dev, 2, rf->rf2);
+       rt2800_rf_write(rt2x00dev, 3, rf->rf3 | 0x00000004);
+       rt2800_rf_write(rt2x00dev, 4, rf->rf4);
 
        udelay(200);
 
-       rt2800usb_rf_write(rt2x00dev, 1, rf->rf1);
-       rt2800usb_rf_write(rt2x00dev, 2, rf->rf2);
-       rt2800usb_rf_write(rt2x00dev, 3, rf->rf3 & ~0x00000004);
-       rt2800usb_rf_write(rt2x00dev, 4, rf->rf4);
+       rt2800_rf_write(rt2x00dev, 1, rf->rf1);
+       rt2800_rf_write(rt2x00dev, 2, rf->rf2);
+       rt2800_rf_write(rt2x00dev, 3, rf->rf3 & ~0x00000004);
+       rt2800_rf_write(rt2x00dev, 4, rf->rf4);
 }
 
 static void rt2800usb_config_channel_rt3x(struct rt2x00_dev *rt2x00dev,