diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2008-10-31 12:52:58 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-11-10 15:17:34 -0500 |
commit | a3d67bc2e9e25f09151971192946fe3b68543649 (patch) | |
tree | f994be964fec20097a9a415ca028653c4f21712e | |
parent | 35cc988a5620cea03fd97e96c530e1f259ef913b (diff) |
rtl8187: Remove CCK delays
Routine rtl8225_write_phy_cck() calls rtl8225_write_phy(), which concludes
with a sleep of 1 msec; therefore a call to rtl8225_write_phy_cck()
immediately followed by an msleep(1) is not needed.
Signed-off-by: Larry Finger <Larry.Finger@larry.finger>
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 | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/drivers/net/wireless/rtl8187_rtl8225.c b/drivers/net/wireless/rtl8187_rtl8225.c index 7ae7b84111f8..9ecac76aa52c 100644 --- a/drivers/net/wireless/rtl8187_rtl8225.c +++ b/drivers/net/wireless/rtl8187_rtl8225.c | |||
@@ -423,40 +423,40 @@ static void rtl8225_rf_init(struct ieee80211_hw *dev) | |||
423 | rtl8225_write_phy_ofdm(dev, 0x1d, rtl8225_gain[2 * 4 + 3]); | 423 | rtl8225_write_phy_ofdm(dev, 0x1d, rtl8225_gain[2 * 4 + 3]); |
424 | rtl8225_write_phy_ofdm(dev, 0x23, rtl8225_gain[2 * 4 + 1]); | 424 | rtl8225_write_phy_ofdm(dev, 0x23, rtl8225_gain[2 * 4 + 1]); |
425 | 425 | ||
426 | rtl8225_write_phy_cck(dev, 0x00, 0x98); msleep(1); | 426 | rtl8225_write_phy_cck(dev, 0x00, 0x98); |
427 | rtl8225_write_phy_cck(dev, 0x03, 0x20); msleep(1); | 427 | rtl8225_write_phy_cck(dev, 0x03, 0x20); |
428 | rtl8225_write_phy_cck(dev, 0x04, 0x7e); msleep(1); | 428 | rtl8225_write_phy_cck(dev, 0x04, 0x7e); |
429 | rtl8225_write_phy_cck(dev, 0x05, 0x12); msleep(1); | 429 | rtl8225_write_phy_cck(dev, 0x05, 0x12); |
430 | rtl8225_write_phy_cck(dev, 0x06, 0xfc); msleep(1); | 430 | rtl8225_write_phy_cck(dev, 0x06, 0xfc); |
431 | rtl8225_write_phy_cck(dev, 0x07, 0x78); msleep(1); | 431 | rtl8225_write_phy_cck(dev, 0x07, 0x78); |
432 | rtl8225_write_phy_cck(dev, 0x08, 0x2e); msleep(1); | 432 | rtl8225_write_phy_cck(dev, 0x08, 0x2e); |
433 | rtl8225_write_phy_cck(dev, 0x10, 0x9b); msleep(1); | 433 | rtl8225_write_phy_cck(dev, 0x10, 0x9b); |
434 | rtl8225_write_phy_cck(dev, 0x11, 0x88); msleep(1); | 434 | rtl8225_write_phy_cck(dev, 0x11, 0x88); |
435 | rtl8225_write_phy_cck(dev, 0x12, 0x47); msleep(1); | 435 | rtl8225_write_phy_cck(dev, 0x12, 0x47); |
436 | rtl8225_write_phy_cck(dev, 0x13, 0xd0); | 436 | rtl8225_write_phy_cck(dev, 0x13, 0xd0); |
437 | rtl8225_write_phy_cck(dev, 0x19, 0x00); | 437 | rtl8225_write_phy_cck(dev, 0x19, 0x00); |
438 | rtl8225_write_phy_cck(dev, 0x1a, 0xa0); | 438 | rtl8225_write_phy_cck(dev, 0x1a, 0xa0); |
439 | rtl8225_write_phy_cck(dev, 0x1b, 0x08); | 439 | rtl8225_write_phy_cck(dev, 0x1b, 0x08); |
440 | rtl8225_write_phy_cck(dev, 0x40, 0x86); | 440 | rtl8225_write_phy_cck(dev, 0x40, 0x86); |
441 | rtl8225_write_phy_cck(dev, 0x41, 0x8d); msleep(1); | 441 | rtl8225_write_phy_cck(dev, 0x41, 0x8d); |
442 | rtl8225_write_phy_cck(dev, 0x42, 0x15); msleep(1); | 442 | rtl8225_write_phy_cck(dev, 0x42, 0x15); |
443 | rtl8225_write_phy_cck(dev, 0x43, 0x18); msleep(1); | 443 | rtl8225_write_phy_cck(dev, 0x43, 0x18); |
444 | rtl8225_write_phy_cck(dev, 0x44, 0x1f); msleep(1); | 444 | rtl8225_write_phy_cck(dev, 0x44, 0x1f); |
445 | rtl8225_write_phy_cck(dev, 0x45, 0x1e); msleep(1); | 445 | rtl8225_write_phy_cck(dev, 0x45, 0x1e); |
446 | rtl8225_write_phy_cck(dev, 0x46, 0x1a); msleep(1); | 446 | rtl8225_write_phy_cck(dev, 0x46, 0x1a); |
447 | rtl8225_write_phy_cck(dev, 0x47, 0x15); msleep(1); | 447 | rtl8225_write_phy_cck(dev, 0x47, 0x15); |
448 | rtl8225_write_phy_cck(dev, 0x48, 0x10); msleep(1); | 448 | rtl8225_write_phy_cck(dev, 0x48, 0x10); |
449 | rtl8225_write_phy_cck(dev, 0x49, 0x0a); msleep(1); | 449 | rtl8225_write_phy_cck(dev, 0x49, 0x0a); |
450 | rtl8225_write_phy_cck(dev, 0x4a, 0x05); msleep(1); | 450 | rtl8225_write_phy_cck(dev, 0x4a, 0x05); |
451 | rtl8225_write_phy_cck(dev, 0x4b, 0x02); msleep(1); | 451 | rtl8225_write_phy_cck(dev, 0x4b, 0x02); |
452 | rtl8225_write_phy_cck(dev, 0x4c, 0x05); msleep(1); | 452 | rtl8225_write_phy_cck(dev, 0x4c, 0x05); |
453 | 453 | ||
454 | rtl818x_iowrite8(priv, &priv->map->TESTR, 0x0D); | 454 | rtl818x_iowrite8(priv, &priv->map->TESTR, 0x0D); |
455 | 455 | ||
456 | rtl8225_rf_set_tx_power(dev, 1); | 456 | rtl8225_rf_set_tx_power(dev, 1); |
457 | 457 | ||
458 | /* RX antenna default to A */ | 458 | /* RX antenna default to A */ |
459 | rtl8225_write_phy_cck(dev, 0x10, 0x9b); msleep(1); /* B: 0xDB */ | 459 | rtl8225_write_phy_cck(dev, 0x10, 0x9b); /* B: 0xDB */ |
460 | rtl8225_write_phy_ofdm(dev, 0x26, 0x90); /* B: 0x10 */ | 460 | rtl8225_write_phy_ofdm(dev, 0x26, 0x90); /* B: 0x10 */ |
461 | 461 | ||
462 | rtl818x_iowrite8(priv, &priv->map->TX_ANTENNA, 0x03); /* B: 0x00 */ | 462 | rtl818x_iowrite8(priv, &priv->map->TX_ANTENNA, 0x03); /* B: 0x00 */ |
@@ -785,40 +785,40 @@ static void rtl8225z2_rf_init(struct ieee80211_hw *dev) | |||
785 | rtl8225_write_phy_ofdm(dev, 0x1d, rtl8225z2_gain_bg[4 * 3 + 2]); | 785 | rtl8225_write_phy_ofdm(dev, 0x1d, rtl8225z2_gain_bg[4 * 3 + 2]); |
786 | rtl8225_write_phy_ofdm(dev, 0x21, 0x37); | 786 | rtl8225_write_phy_ofdm(dev, 0x21, 0x37); |
787 | 787 | ||
788 | rtl8225_write_phy_cck(dev, 0x00, 0x98); msleep(1); | 788 | rtl8225_write_phy_cck(dev, 0x00, 0x98); |
789 | rtl8225_write_phy_cck(dev, 0x03, 0x20); msleep(1); | 789 | rtl8225_write_phy_cck(dev, 0x03, 0x20); |
790 | rtl8225_write_phy_cck(dev, 0x04, 0x7e); msleep(1); | 790 | rtl8225_write_phy_cck(dev, 0x04, 0x7e); |
791 | rtl8225_write_phy_cck(dev, 0x05, 0x12); msleep(1); | 791 | rtl8225_write_phy_cck(dev, 0x05, 0x12); |
792 | rtl8225_write_phy_cck(dev, 0x06, 0xfc); msleep(1); | 792 | rtl8225_write_phy_cck(dev, 0x06, 0xfc); |
793 | rtl8225_write_phy_cck(dev, 0x07, 0x78); msleep(1); | 793 | rtl8225_write_phy_cck(dev, 0x07, 0x78); |
794 | rtl8225_write_phy_cck(dev, 0x08, 0x2e); msleep(1); | 794 | rtl8225_write_phy_cck(dev, 0x08, 0x2e); |
795 | rtl8225_write_phy_cck(dev, 0x10, 0x9b); msleep(1); | 795 | rtl8225_write_phy_cck(dev, 0x10, 0x9b); |
796 | rtl8225_write_phy_cck(dev, 0x11, 0x88); msleep(1); | 796 | rtl8225_write_phy_cck(dev, 0x11, 0x88); |
797 | rtl8225_write_phy_cck(dev, 0x12, 0x47); msleep(1); | 797 | rtl8225_write_phy_cck(dev, 0x12, 0x47); |
798 | rtl8225_write_phy_cck(dev, 0x13, 0xd0); | 798 | rtl8225_write_phy_cck(dev, 0x13, 0xd0); |
799 | rtl8225_write_phy_cck(dev, 0x19, 0x00); | 799 | rtl8225_write_phy_cck(dev, 0x19, 0x00); |
800 | rtl8225_write_phy_cck(dev, 0x1a, 0xa0); | 800 | rtl8225_write_phy_cck(dev, 0x1a, 0xa0); |
801 | rtl8225_write_phy_cck(dev, 0x1b, 0x08); | 801 | rtl8225_write_phy_cck(dev, 0x1b, 0x08); |
802 | rtl8225_write_phy_cck(dev, 0x40, 0x86); | 802 | rtl8225_write_phy_cck(dev, 0x40, 0x86); |
803 | rtl8225_write_phy_cck(dev, 0x41, 0x8d); msleep(1); | 803 | rtl8225_write_phy_cck(dev, 0x41, 0x8d); |
804 | rtl8225_write_phy_cck(dev, 0x42, 0x15); msleep(1); | 804 | rtl8225_write_phy_cck(dev, 0x42, 0x15); |
805 | rtl8225_write_phy_cck(dev, 0x43, 0x18); msleep(1); | 805 | rtl8225_write_phy_cck(dev, 0x43, 0x18); |
806 | rtl8225_write_phy_cck(dev, 0x44, 0x36); msleep(1); | 806 | rtl8225_write_phy_cck(dev, 0x44, 0x36); |
807 | rtl8225_write_phy_cck(dev, 0x45, 0x35); msleep(1); | 807 | rtl8225_write_phy_cck(dev, 0x45, 0x35); |
808 | rtl8225_write_phy_cck(dev, 0x46, 0x2e); msleep(1); | 808 | rtl8225_write_phy_cck(dev, 0x46, 0x2e); |
809 | rtl8225_write_phy_cck(dev, 0x47, 0x25); msleep(1); | 809 | rtl8225_write_phy_cck(dev, 0x47, 0x25); |
810 | rtl8225_write_phy_cck(dev, 0x48, 0x1c); msleep(1); | 810 | rtl8225_write_phy_cck(dev, 0x48, 0x1c); |
811 | rtl8225_write_phy_cck(dev, 0x49, 0x12); msleep(1); | 811 | rtl8225_write_phy_cck(dev, 0x49, 0x12); |
812 | rtl8225_write_phy_cck(dev, 0x4a, 0x09); msleep(1); | 812 | rtl8225_write_phy_cck(dev, 0x4a, 0x09); |
813 | rtl8225_write_phy_cck(dev, 0x4b, 0x04); msleep(1); | 813 | rtl8225_write_phy_cck(dev, 0x4b, 0x04); |
814 | rtl8225_write_phy_cck(dev, 0x4c, 0x05); msleep(1); | 814 | rtl8225_write_phy_cck(dev, 0x4c, 0x05); |
815 | 815 | ||
816 | rtl818x_iowrite8(priv, (u8 *)0xFF5B, 0x0D); msleep(1); | 816 | rtl818x_iowrite8(priv, (u8 *)0xFF5B, 0x0D); msleep(1); |
817 | 817 | ||
818 | rtl8225z2_rf_set_tx_power(dev, 1); | 818 | rtl8225z2_rf_set_tx_power(dev, 1); |
819 | 819 | ||
820 | /* RX antenna default to A */ | 820 | /* RX antenna default to A */ |
821 | rtl8225_write_phy_cck(dev, 0x10, 0x9b); msleep(1); /* B: 0xDB */ | 821 | rtl8225_write_phy_cck(dev, 0x10, 0x9b); /* B: 0xDB */ |
822 | rtl8225_write_phy_ofdm(dev, 0x26, 0x90); /* B: 0x10 */ | 822 | rtl8225_write_phy_ofdm(dev, 0x26, 0x90); /* B: 0x10 */ |
823 | 823 | ||
824 | rtl818x_iowrite8(priv, &priv->map->TX_ANTENNA, 0x03); /* B: 0x00 */ | 824 | rtl818x_iowrite8(priv, &priv->map->TX_ANTENNA, 0x03); /* B: 0x00 */ |