diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2008-10-31 12:54:13 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-11-10 15:17:34 -0500 |
commit | 946d1c22644a5de07efc1c847fb64bb0cf8f82f2 (patch) | |
tree | 466c8baccb22b59e4170fbe6f5c64c06d0a89d9e | |
parent | a3d67bc2e9e25f09151971192946fe3b68543649 (diff) |
rtl8187: Remove msleep calls after calls to rtl8225_write
Routine rtl8225_write() calls either rtl8225_write_bitbang() or
rtl8225_write_8051(), both of which end with an msleep() command. As a
result, a rtl8225_write() immediately followed by an msleep() is not needed.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Tested-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/rtl8187_rtl8225.c | 117 |
1 files changed, 59 insertions, 58 deletions
diff --git a/drivers/net/wireless/rtl8187_rtl8225.c b/drivers/net/wireless/rtl8187_rtl8225.c index 9ecac76aa52c..053eb220a19e 100644 --- a/drivers/net/wireless/rtl8187_rtl8225.c +++ b/drivers/net/wireless/rtl8187_rtl8225.c | |||
@@ -333,21 +333,21 @@ static void rtl8225_rf_init(struct ieee80211_hw *dev) | |||
333 | struct rtl8187_priv *priv = dev->priv; | 333 | struct rtl8187_priv *priv = dev->priv; |
334 | int i; | 334 | int i; |
335 | 335 | ||
336 | rtl8225_write(dev, 0x0, 0x067); msleep(1); | 336 | rtl8225_write(dev, 0x0, 0x067); |
337 | rtl8225_write(dev, 0x1, 0xFE0); msleep(1); | 337 | rtl8225_write(dev, 0x1, 0xFE0); |
338 | rtl8225_write(dev, 0x2, 0x44D); msleep(1); | 338 | rtl8225_write(dev, 0x2, 0x44D); |
339 | rtl8225_write(dev, 0x3, 0x441); msleep(1); | 339 | rtl8225_write(dev, 0x3, 0x441); |
340 | rtl8225_write(dev, 0x4, 0x486); msleep(1); | 340 | rtl8225_write(dev, 0x4, 0x486); |
341 | rtl8225_write(dev, 0x5, 0xBC0); msleep(1); | 341 | rtl8225_write(dev, 0x5, 0xBC0); |
342 | rtl8225_write(dev, 0x6, 0xAE6); msleep(1); | 342 | rtl8225_write(dev, 0x6, 0xAE6); |
343 | rtl8225_write(dev, 0x7, 0x82A); msleep(1); | 343 | rtl8225_write(dev, 0x7, 0x82A); |
344 | rtl8225_write(dev, 0x8, 0x01F); msleep(1); | 344 | rtl8225_write(dev, 0x8, 0x01F); |
345 | rtl8225_write(dev, 0x9, 0x334); msleep(1); | 345 | rtl8225_write(dev, 0x9, 0x334); |
346 | rtl8225_write(dev, 0xA, 0xFD4); msleep(1); | 346 | rtl8225_write(dev, 0xA, 0xFD4); |
347 | rtl8225_write(dev, 0xB, 0x391); msleep(1); | 347 | rtl8225_write(dev, 0xB, 0x391); |
348 | rtl8225_write(dev, 0xC, 0x050); msleep(1); | 348 | rtl8225_write(dev, 0xC, 0x050); |
349 | rtl8225_write(dev, 0xD, 0x6DB); msleep(1); | 349 | rtl8225_write(dev, 0xD, 0x6DB); |
350 | rtl8225_write(dev, 0xE, 0x029); msleep(1); | 350 | rtl8225_write(dev, 0xE, 0x029); |
351 | rtl8225_write(dev, 0xF, 0x914); msleep(100); | 351 | rtl8225_write(dev, 0xF, 0x914); msleep(100); |
352 | 352 | ||
353 | rtl8225_write(dev, 0x2, 0xC4D); msleep(200); | 353 | rtl8225_write(dev, 0x2, 0xC4D); msleep(200); |
@@ -685,22 +685,23 @@ static void rtl8225z2_rf_init(struct ieee80211_hw *dev) | |||
685 | struct rtl8187_priv *priv = dev->priv; | 685 | struct rtl8187_priv *priv = dev->priv; |
686 | int i; | 686 | int i; |
687 | 687 | ||
688 | rtl8225_write(dev, 0x0, 0x2BF); msleep(1); | 688 | rtl8225_write(dev, 0x0, 0x2BF); |
689 | rtl8225_write(dev, 0x1, 0xEE0); msleep(1); | 689 | rtl8225_write(dev, 0x1, 0xEE0); |
690 | rtl8225_write(dev, 0x2, 0x44D); msleep(1); | 690 | rtl8225_write(dev, 0x2, 0x44D); |
691 | rtl8225_write(dev, 0x3, 0x441); msleep(1); | 691 | rtl8225_write(dev, 0x3, 0x441); |
692 | rtl8225_write(dev, 0x4, 0x8C3); msleep(1); | 692 | rtl8225_write(dev, 0x4, 0x8C3); |
693 | rtl8225_write(dev, 0x5, 0xC72); msleep(1); | 693 | rtl8225_write(dev, 0x5, 0xC72); |
694 | rtl8225_write(dev, 0x6, 0x0E6); msleep(1); | 694 | rtl8225_write(dev, 0x6, 0x0E6); |
695 | rtl8225_write(dev, 0x7, 0x82A); msleep(1); | 695 | rtl8225_write(dev, 0x7, 0x82A); |
696 | rtl8225_write(dev, 0x8, 0x03F); msleep(1); | 696 | rtl8225_write(dev, 0x8, 0x03F); |
697 | rtl8225_write(dev, 0x9, 0x335); msleep(1); | 697 | rtl8225_write(dev, 0x9, 0x335); |
698 | rtl8225_write(dev, 0xa, 0x9D4); msleep(1); | 698 | rtl8225_write(dev, 0xa, 0x9D4); |
699 | rtl8225_write(dev, 0xb, 0x7BB); msleep(1); | 699 | rtl8225_write(dev, 0xb, 0x7BB); |
700 | rtl8225_write(dev, 0xc, 0x850); msleep(1); | 700 | rtl8225_write(dev, 0xc, 0x850); |
701 | rtl8225_write(dev, 0xd, 0xCDF); msleep(1); | 701 | rtl8225_write(dev, 0xd, 0xCDF); |
702 | rtl8225_write(dev, 0xe, 0x02B); msleep(1); | 702 | rtl8225_write(dev, 0xe, 0x02B); |
703 | rtl8225_write(dev, 0xf, 0x114); msleep(100); | 703 | rtl8225_write(dev, 0xf, 0x114); |
704 | msleep(100); | ||
704 | 705 | ||
705 | rtl8225_write(dev, 0x0, 0x1B7); | 706 | rtl8225_write(dev, 0x0, 0x1B7); |
706 | 707 | ||
@@ -831,38 +832,38 @@ static void rtl8225z2_b_rf_init(struct ieee80211_hw *dev) | |||
831 | struct rtl8187_priv *priv = dev->priv; | 832 | struct rtl8187_priv *priv = dev->priv; |
832 | int i; | 833 | int i; |
833 | 834 | ||
834 | rtl8225_write(dev, 0x0, 0x0B7); msleep(1); | 835 | rtl8225_write(dev, 0x0, 0x0B7); |
835 | rtl8225_write(dev, 0x1, 0xEE0); msleep(1); | 836 | rtl8225_write(dev, 0x1, 0xEE0); |
836 | rtl8225_write(dev, 0x2, 0x44D); msleep(1); | 837 | rtl8225_write(dev, 0x2, 0x44D); |
837 | rtl8225_write(dev, 0x3, 0x441); msleep(1); | 838 | rtl8225_write(dev, 0x3, 0x441); |
838 | rtl8225_write(dev, 0x4, 0x8C3); msleep(1); | 839 | rtl8225_write(dev, 0x4, 0x8C3); |
839 | rtl8225_write(dev, 0x5, 0xC72); msleep(1); | 840 | rtl8225_write(dev, 0x5, 0xC72); |
840 | rtl8225_write(dev, 0x6, 0x0E6); msleep(1); | 841 | rtl8225_write(dev, 0x6, 0x0E6); |
841 | rtl8225_write(dev, 0x7, 0x82A); msleep(1); | 842 | rtl8225_write(dev, 0x7, 0x82A); |
842 | rtl8225_write(dev, 0x8, 0x03F); msleep(1); | 843 | rtl8225_write(dev, 0x8, 0x03F); |
843 | rtl8225_write(dev, 0x9, 0x335); msleep(1); | 844 | rtl8225_write(dev, 0x9, 0x335); |
844 | rtl8225_write(dev, 0xa, 0x9D4); msleep(1); | 845 | rtl8225_write(dev, 0xa, 0x9D4); |
845 | rtl8225_write(dev, 0xb, 0x7BB); msleep(1); | 846 | rtl8225_write(dev, 0xb, 0x7BB); |
846 | rtl8225_write(dev, 0xc, 0x850); msleep(1); | 847 | rtl8225_write(dev, 0xc, 0x850); |
847 | rtl8225_write(dev, 0xd, 0xCDF); msleep(1); | 848 | rtl8225_write(dev, 0xd, 0xCDF); |
848 | rtl8225_write(dev, 0xe, 0x02B); msleep(1); | 849 | rtl8225_write(dev, 0xe, 0x02B); |
849 | rtl8225_write(dev, 0xf, 0x114); msleep(1); | 850 | rtl8225_write(dev, 0xf, 0x114); |
850 | 851 | ||
851 | rtl8225_write(dev, 0x0, 0x1B7); msleep(1); | 852 | rtl8225_write(dev, 0x0, 0x1B7); |
852 | 853 | ||
853 | for (i = 0; i < ARRAY_SIZE(rtl8225z2_rxgain); i++) { | 854 | for (i = 0; i < ARRAY_SIZE(rtl8225z2_rxgain); i++) { |
854 | rtl8225_write(dev, 0x1, i + 1); msleep(1); | 855 | rtl8225_write(dev, 0x1, i + 1); |
855 | rtl8225_write(dev, 0x2, rtl8225z2_rxgain[i]); msleep(1); | 856 | rtl8225_write(dev, 0x2, rtl8225z2_rxgain[i]); |
856 | } | 857 | } |
857 | 858 | ||
858 | rtl8225_write(dev, 0x3, 0x080); msleep(1); | 859 | rtl8225_write(dev, 0x3, 0x080); |
859 | rtl8225_write(dev, 0x5, 0x004); msleep(1); | 860 | rtl8225_write(dev, 0x5, 0x004); |
860 | rtl8225_write(dev, 0x0, 0x0B7); msleep(1); | 861 | rtl8225_write(dev, 0x0, 0x0B7); |
861 | 862 | ||
862 | rtl8225_write(dev, 0x2, 0xC4D); msleep(1); | 863 | rtl8225_write(dev, 0x2, 0xC4D); |
863 | 864 | ||
864 | rtl8225_write(dev, 0x2, 0x44D); msleep(1); | 865 | rtl8225_write(dev, 0x2, 0x44D); |
865 | rtl8225_write(dev, 0x0, 0x2BF); msleep(1); | 866 | rtl8225_write(dev, 0x0, 0x2BF); |
866 | 867 | ||
867 | rtl818x_iowrite8(priv, &priv->map->TX_GAIN_CCK, 0x03); | 868 | rtl818x_iowrite8(priv, &priv->map->TX_GAIN_CCK, 0x03); |
868 | rtl818x_iowrite8(priv, &priv->map->TX_GAIN_OFDM, 0x07); | 869 | rtl818x_iowrite8(priv, &priv->map->TX_GAIN_OFDM, 0x07); |
@@ -896,7 +897,7 @@ static void rtl8225_rf_stop(struct ieee80211_hw *dev) | |||
896 | u8 reg; | 897 | u8 reg; |
897 | struct rtl8187_priv *priv = dev->priv; | 898 | struct rtl8187_priv *priv = dev->priv; |
898 | 899 | ||
899 | rtl8225_write(dev, 0x4, 0x1f); msleep(1); | 900 | rtl8225_write(dev, 0x4, 0x1f); |
900 | 901 | ||
901 | rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_CONFIG); | 902 | rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_CONFIG); |
902 | reg = rtl818x_ioread8(priv, &priv->map->CONFIG3); | 903 | reg = rtl818x_ioread8(priv, &priv->map->CONFIG3); |