]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
iwlwifi: fix time interval misuse in iwl_poll_{direct_}bit
authorZhu, Yi <yi.zhu@intel.com>
Fri, 5 Dec 2008 15:58:38 +0000 (07:58 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 12 Dec 2008 18:48:21 +0000 (13:48 -0500)
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: Zhu Yi <yi.zhu@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-3945-io.h
drivers/net/wireless/iwlwifi/iwl-io.h
drivers/net/wireless/iwlwifi/iwl-tx.c

index 7dea1552a9061df50e1ccb700856fc9198ae5830..2f749432e4bc7d0f6ab85128806cb127b5524d08 100644 (file)
@@ -93,7 +93,7 @@ static inline int _iwl3945_poll_bit(struct iwl3945_priv *priv, u32 addr,
        do {
                if ((_iwl3945_read32(priv, addr) & mask) == (bits & mask))
                        return i;
-               mdelay(10);
+               udelay(10);
                i += 10;
        } while (i < timeout);
 
@@ -276,7 +276,7 @@ static inline int _iwl3945_poll_direct_bit(struct iwl3945_priv *priv,
        do {
                if ((_iwl3945_read_direct32(priv, addr) & mask) == mask)
                        return i;
-               mdelay(10);
+               udelay(10);
                i += 10;
        } while (i < timeout);
 
index bc10435d96e5aea1ac8485e466cf7d49ba20e932..a5c489af937afb77bcfe83b81d8c98572f05b253 100644 (file)
@@ -95,7 +95,7 @@ static inline int _iwl_poll_bit(struct iwl_priv *priv, u32 addr,
        do {
                if ((_iwl_read32(priv, addr) & mask) == (bits & mask))
                        return i;
-               mdelay(10);
+               udelay(10);
                i += 10;
        } while (i < timeout);
 
@@ -277,7 +277,7 @@ static inline int _iwl_poll_direct_bit(struct iwl_priv *priv,
        do {
                if ((_iwl_read_direct32(priv, addr) & mask) == mask)
                        return i;
-               mdelay(10);
+               udelay(10);
                i += 10;
        } while (i < timeout);
 
index 18d6cf67d9b786e639ce39ca783d77eab7976e12..9d7e45f6a53d9451b8d19849ddb2b20310dabf88 100644 (file)
@@ -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_poll_direct_bit(priv, FH_TSSR_TX_STATUS_REG,
                                    FH_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(ch),
-                                   200);
+                                   1000);
        }
        iwl_release_nic_access(priv);
        spin_unlock_irqrestore(&priv->lock, flags);