Commit f056658b authored by Zhu, Yi's avatar Zhu, Yi Committed by John W. Linville

iwlwifi: fix time interval misuse in iwl_poll_{direct_}bit

The patch fixes the misuse of microsecond with millisecond in the
polling mechanism of the iwlwifi driver. The impact of this problem
is the unacceptable latency for the whole system (especially during
bringing down the wlan interface).
Signed-off-by: default avatarZhu Yi <yi.zhu@intel.com>
Acked-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 7262796a
...@@ -93,7 +93,7 @@ static inline int _iwl3945_poll_bit(struct iwl3945_priv *priv, u32 addr, ...@@ -93,7 +93,7 @@ static inline int _iwl3945_poll_bit(struct iwl3945_priv *priv, u32 addr,
do { do {
if ((_iwl3945_read32(priv, addr) & mask) == (bits & mask)) if ((_iwl3945_read32(priv, addr) & mask) == (bits & mask))
return i; return i;
mdelay(10); udelay(10);
i += 10; i += 10;
} while (i < timeout); } while (i < timeout);
...@@ -276,7 +276,7 @@ static inline int _iwl3945_poll_direct_bit(struct iwl3945_priv *priv, ...@@ -276,7 +276,7 @@ static inline int _iwl3945_poll_direct_bit(struct iwl3945_priv *priv,
do { do {
if ((_iwl3945_read_direct32(priv, addr) & mask) == mask) if ((_iwl3945_read_direct32(priv, addr) & mask) == mask)
return i; return i;
mdelay(10); udelay(10);
i += 10; i += 10;
} while (i < timeout); } while (i < timeout);
......
...@@ -95,7 +95,7 @@ static inline int _iwl_poll_bit(struct iwl_priv *priv, u32 addr, ...@@ -95,7 +95,7 @@ static inline int _iwl_poll_bit(struct iwl_priv *priv, u32 addr,
do { do {
if ((_iwl_read32(priv, addr) & mask) == (bits & mask)) if ((_iwl_read32(priv, addr) & mask) == (bits & mask))
return i; return i;
mdelay(10); udelay(10);
i += 10; i += 10;
} while (i < timeout); } while (i < timeout);
...@@ -277,7 +277,7 @@ static inline int _iwl_poll_direct_bit(struct iwl_priv *priv, ...@@ -277,7 +277,7 @@ static inline int _iwl_poll_direct_bit(struct iwl_priv *priv,
do { do {
if ((_iwl_read_direct32(priv, addr) & mask) == mask) if ((_iwl_read_direct32(priv, addr) & mask) == mask)
return i; return i;
mdelay(10); udelay(10);
i += 10; i += 10;
} while (i < timeout); } while (i < timeout);
......
...@@ -628,7 +628,7 @@ void iwl_txq_ctx_stop(struct iwl_priv *priv) ...@@ -628,7 +628,7 @@ void iwl_txq_ctx_stop(struct iwl_priv *priv)
iwl_write_direct32(priv, FH_TCSR_CHNL_TX_CONFIG_REG(ch), 0x0); iwl_write_direct32(priv, FH_TCSR_CHNL_TX_CONFIG_REG(ch), 0x0);
iwl_poll_direct_bit(priv, FH_TSSR_TX_STATUS_REG, iwl_poll_direct_bit(priv, FH_TSSR_TX_STATUS_REG,
FH_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(ch), FH_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(ch),
200); 1000);
} }
iwl_release_nic_access(priv); iwl_release_nic_access(priv);
spin_unlock_irqrestore(&priv->lock, flags); spin_unlock_irqrestore(&priv->lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment