iwlwifi: clear the translate table area
authorHuaxu Wan <huaxu.wan@linux.intel.com>
Fri, 2 Oct 2009 20:44:00 +0000 (13:44 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 7 Oct 2009 20:39:44 +0000 (16:39 -0400)
Driver should clear the translate table area after receiving "Alive"
response from uCode. This patch corrects a mistake when doing this.

Signed-off-by: Huaxu Wan <huaxu.wan@linux.intel.com>
Signed-off-by: Guo Chaohong <chaohong.guo@linux.intel.com>
Acked-by: Ben M Cahill <ben.m.cahill@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-4965.c
drivers/net/wireless/iwlwifi/iwl-5000.c

index 4e492c154f8889fc488b7817e2429c1543a2417d..0921e454185b52bb03870b7d473ebd5b3a0a453e 100644 (file)
@@ -663,7 +663,8 @@ static int iwl4965_alive_notify(struct iwl_priv *priv)
                iwl_write_targ_mem(priv, a, 0);
        for (; a < priv->scd_base_addr + IWL49_SCD_TRANSLATE_TBL_OFFSET; a += 4)
                iwl_write_targ_mem(priv, a, 0);
-       for (; a < sizeof(u16) * priv->hw_params.max_txq_num; a += 4)
+       for (; a < priv->scd_base_addr +
+              IWL49_SCD_TRANSLATE_TBL_OFFSET_QUEUE(priv->hw_params.max_txq_num); a += 4)
                iwl_write_targ_mem(priv, a, 0);
 
        /* Tel 4965 where to find Tx byte count tables */
index 660fd51d190b5c23d6aa513193ce83a1f1368efa..01d53ebb96adc930b4e6a6cce3f4143391178909 100644 (file)
@@ -748,7 +748,8 @@ int iwl5000_alive_notify(struct iwl_priv *priv)
        for (; a < priv->scd_base_addr + IWL50_SCD_TRANSLATE_TBL_OFFSET;
                a += 4)
                iwl_write_targ_mem(priv, a, 0);
-       for (; a < sizeof(u16) * priv->hw_params.max_txq_num; a += 4)
+       for (; a < priv->scd_base_addr +
+              IWL50_SCD_TRANSLATE_TBL_OFFSET_QUEUE(priv->hw_params.max_txq_num); a += 4)
                iwl_write_targ_mem(priv, a, 0);
 
        iwl_write_prph(priv, IWL50_SCD_DRAM_BASE_ADDR,