From patchwork Fri Oct 2 20:44:00 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Reinette Chatre X-Patchwork-Id: 51443 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n92KoB98029025 for ; Fri, 2 Oct 2009 20:50:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758207AbZJBUty (ORCPT ); Fri, 2 Oct 2009 16:49:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758191AbZJBUtx (ORCPT ); Fri, 2 Oct 2009 16:49:53 -0400 Received: from mga03.intel.com ([143.182.124.21]:26672 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758197AbZJBUtu (ORCPT ); Fri, 2 Oct 2009 16:49:50 -0400 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 02 Oct 2009 13:49:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.44,496,1249282800"; d="scan'208";a="194553986" Received: from rc-desk.jf.intel.com (HELO localhost.localdomain) ([134.134.15.187]) by azsmga001.ch.intel.com with ESMTP; 02 Oct 2009 13:44:10 -0700 From: Reinette Chatre To: linville@tuxdriver.com Cc: linux-wireless@vger.kernel.org, ipw3945-devel@lists.sourceforge.net, Huaxu Wan , Guo Chaohong , Reinette Chatre Subject: [PATCH 06/13] iwlwifi: clear the translate table area Date: Fri, 2 Oct 2009 13:44:00 -0700 Message-Id: <1254516247-4085-7-git-send-email-reinette.chatre@intel.com> X-Mailer: git-send-email 1.5.6.3 In-Reply-To: <1254516247-4085-1-git-send-email-reinette.chatre@intel.com> References: <1254516247-4085-1-git-send-email-reinette.chatre@intel.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index 4e492c1..0921e45 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c @@ -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 */ diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 660fd51..01d53eb 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c @@ -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,