mirror of
https://github.com/torvalds/linux.git
synced 2024-11-28 23:21:31 +00:00
rtlwifi: set proper udelay within rf_serial_read
Since read RF register is an indirect access that hardware needs time to accomplish read action, but there's no ready bit, so delay is required to guarantee the read value is correct. After investigating internal documents, these delays are reduced as proper values. Reported-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
92541dd9dd
commit
4c8c0d8f70
@ -164,9 +164,9 @@ static u32 _rtl88e_phy_rf_serial_read(struct ieee80211_hw *hw,
|
||||
(newoffset << 23) | BLSSIREADEDGE;
|
||||
rtl_set_bbreg(hw, RFPGA0_XA_HSSIPARAMETER2, MASKDWORD,
|
||||
tmplong & (~BLSSIREADEDGE));
|
||||
mdelay(1);
|
||||
udelay(10);
|
||||
rtl_set_bbreg(hw, pphyreg->rfhssi_para2, MASKDWORD, tmplong2);
|
||||
mdelay(2);
|
||||
udelay(120);
|
||||
if (rfpath == RF90_PATH_A)
|
||||
rfpi_enable = (u8)rtl_get_bbreg(hw, RFPGA0_XA_HSSIPARAMETER1,
|
||||
BIT(8));
|
||||
|
@ -158,9 +158,8 @@ static u32 _rtl92ee_phy_rf_serial_read(struct ieee80211_hw *hw,
|
||||
(newoffset << 23) | BLSSIREADEDGE;
|
||||
rtl_set_bbreg(hw, RFPGA0_XA_HSSIPARAMETER2, MASKDWORD,
|
||||
tmplong & (~BLSSIREADEDGE));
|
||||
mdelay(1);
|
||||
rtl_set_bbreg(hw, pphyreg->rfhssi_para2, MASKDWORD, tmplong2);
|
||||
mdelay(2);
|
||||
udelay(20);
|
||||
if (rfpath == RF90_PATH_A)
|
||||
rfpi_enable = (u8)rtl_get_bbreg(hw, RFPGA0_XA_HSSIPARAMETER1,
|
||||
BIT(8));
|
||||
|
@ -89,12 +89,10 @@ u32 rtl8723_phy_rf_serial_read(struct ieee80211_hw *hw,
|
||||
(newoffset << 23) | BLSSIREADEDGE;
|
||||
rtl_set_bbreg(hw, RFPGA0_XA_HSSIPARAMETER2, MASKDWORD,
|
||||
tmplong & (~BLSSIREADEDGE));
|
||||
mdelay(1);
|
||||
rtl_set_bbreg(hw, pphyreg->rfhssi_para2, MASKDWORD, tmplong2);
|
||||
mdelay(1);
|
||||
rtl_set_bbreg(hw, RFPGA0_XA_HSSIPARAMETER2, MASKDWORD,
|
||||
tmplong | BLSSIREADEDGE);
|
||||
mdelay(1);
|
||||
udelay(120);
|
||||
if (rfpath == RF90_PATH_A)
|
||||
rfpi_enable = (u8) rtl_get_bbreg(hw, RFPGA0_XA_HSSIPARAMETER1,
|
||||
BIT(8));
|
||||
|
Loading…
Reference in New Issue
Block a user