diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-11-04 12:34:25 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-11-06 16:48:51 -0500 |
commit | ada0394cede08702b604a4c8ee13409a4109e773 (patch) | |
tree | d6b61e1e13eea45c4e4357cb3f6801d5100ae268 | |
parent | 5c70e5bb36584a1c1d5be85e40aabac3a8f68d83 (diff) |
rt2800pci: add rt2800_rf_[read,write]() wrappers
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>
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800pci.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index 37a55527a48f..83fe1babd5bb 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c | |||
@@ -239,6 +239,12 @@ static void rt2800pci_rf_write(struct rt2x00_dev *rt2x00dev, | |||
239 | mutex_unlock(&rt2x00dev->csr_mutex); | 239 | mutex_unlock(&rt2x00dev->csr_mutex); |
240 | } | 240 | } |
241 | 241 | ||
242 | static inline void rt2800_rf_write(struct rt2x00_dev *rt2x00dev, | ||
243 | const unsigned int word, const u32 value) | ||
244 | { | ||
245 | rt2800pci_rf_write(rt2x00dev, word, value); | ||
246 | } | ||
247 | |||
242 | static void rt2800pci_mcu_request(struct rt2x00_dev *rt2x00dev, | 248 | static void rt2800pci_mcu_request(struct rt2x00_dev *rt2x00dev, |
243 | const u8 command, const u8 token, | 249 | const u8 command, const u8 token, |
244 | const u8 arg0, const u8 arg1) | 250 | const u8 arg0, const u8 arg1) |
@@ -431,7 +437,7 @@ static const struct rt2x00debug rt2800pci_rt2x00debug = { | |||
431 | }, | 437 | }, |
432 | .rf = { | 438 | .rf = { |
433 | .read = rt2x00_rf_read, | 439 | .read = rt2x00_rf_read, |
434 | .write = rt2800pci_rf_write, | 440 | .write = rt2800_rf_write, |
435 | .word_base = RF_BASE, | 441 | .word_base = RF_BASE, |
436 | .word_size = sizeof(u32), | 442 | .word_size = sizeof(u32), |
437 | .word_count = RF_SIZE / sizeof(u32), | 443 | .word_count = RF_SIZE / sizeof(u32), |
@@ -900,24 +906,24 @@ static void rt2800pci_config_channel_rt2x(struct rt2x00_dev *rt2x00dev, | |||
900 | 906 | ||
901 | rt2x00_set_field32(&rf->rf4, RF4_HT40, conf_is_ht40(conf)); | 907 | rt2x00_set_field32(&rf->rf4, RF4_HT40, conf_is_ht40(conf)); |
902 | 908 | ||
903 | rt2800pci_rf_write(rt2x00dev, 1, rf->rf1); | 909 | rt2800_rf_write(rt2x00dev, 1, rf->rf1); |
904 | rt2800pci_rf_write(rt2x00dev, 2, rf->rf2); | 910 | rt2800_rf_write(rt2x00dev, 2, rf->rf2); |
905 | rt2800pci_rf_write(rt2x00dev, 3, rf->rf3 & ~0x00000004); | 911 | rt2800_rf_write(rt2x00dev, 3, rf->rf3 & ~0x00000004); |
906 | rt2800pci_rf_write(rt2x00dev, 4, rf->rf4); | 912 | rt2800_rf_write(rt2x00dev, 4, rf->rf4); |
907 | 913 | ||
908 | udelay(200); | 914 | udelay(200); |
909 | 915 | ||
910 | rt2800pci_rf_write(rt2x00dev, 1, rf->rf1); | 916 | rt2800_rf_write(rt2x00dev, 1, rf->rf1); |
911 | rt2800pci_rf_write(rt2x00dev, 2, rf->rf2); | 917 | rt2800_rf_write(rt2x00dev, 2, rf->rf2); |
912 | rt2800pci_rf_write(rt2x00dev, 3, rf->rf3 | 0x00000004); | 918 | rt2800_rf_write(rt2x00dev, 3, rf->rf3 | 0x00000004); |
913 | rt2800pci_rf_write(rt2x00dev, 4, rf->rf4); | 919 | rt2800_rf_write(rt2x00dev, 4, rf->rf4); |
914 | 920 | ||
915 | udelay(200); | 921 | udelay(200); |
916 | 922 | ||
917 | rt2800pci_rf_write(rt2x00dev, 1, rf->rf1); | 923 | rt2800_rf_write(rt2x00dev, 1, rf->rf1); |
918 | rt2800pci_rf_write(rt2x00dev, 2, rf->rf2); | 924 | rt2800_rf_write(rt2x00dev, 2, rf->rf2); |
919 | rt2800pci_rf_write(rt2x00dev, 3, rf->rf3 & ~0x00000004); | 925 | rt2800_rf_write(rt2x00dev, 3, rf->rf3 & ~0x00000004); |
920 | rt2800pci_rf_write(rt2x00dev, 4, rf->rf4); | 926 | rt2800_rf_write(rt2x00dev, 4, rf->rf4); |
921 | } | 927 | } |
922 | 928 | ||
923 | static void rt2800pci_config_channel_rt3x(struct rt2x00_dev *rt2x00dev, | 929 | static void rt2800pci_config_channel_rt3x(struct rt2x00_dev *rt2x00dev, |