From patchwork Wed Dec 2 05:42:30 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhu Yi X-Patchwork-Id: 64131 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 nB25giQc030333 for ; Wed, 2 Dec 2009 05:42:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751061AbZLBFm0 (ORCPT ); Wed, 2 Dec 2009 00:42:26 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751575AbZLBFm0 (ORCPT ); Wed, 2 Dec 2009 00:42:26 -0500 Received: from mga02.intel.com ([134.134.136.20]:19026 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750906AbZLBFmZ (ORCPT ); Wed, 2 Dec 2009 00:42:25 -0500 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 01 Dec 2009 21:41:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,327,1257148800"; d="scan'208";a="574847497" Received: from debian.sh.intel.com (HELO [10.239.13.180]) ([10.239.13.180]) by orsmga001.jf.intel.com with ESMTP; 01 Dec 2009 21:42:17 -0800 Subject: Re: Panic in iwl3945 driver From: Zhu Yi To: Maxim Levitsky Cc: "Chatre, Reinette" , linux-wireless , iwlwifi maling list In-Reply-To: <1259659724.12157.110.camel@debian> References: <1259167780.4072.2.camel@maxim-laptop> <1259280022.3991.12.camel@maxim-laptop> <1259596551.4090.0.camel@maxim-laptop> <1259617333.4653.91.camel@rc-desk> <1259620526.6559.34.camel@maxim-laptop> <1259659724.12157.110.camel@debian> Date: Wed, 02 Dec 2009 13:42:30 +0800 Message-ID: <1259732550.12157.130.camel@debian> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 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/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 994db4a..b31b34c 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c @@ -548,6 +548,9 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) txq = &priv->txq[txq_id]; q = &txq->q; + if ((iwl_queue_space(q) < q->high_mark)) + goto drop; + spin_lock_irqsave(&priv->lock, flags); idx = get_cmd_index(q, q->write_ptr, 0);