From patchwork Mon Dec 21 16:40:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Levitsky X-Patchwork-Id: 69142 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id nBLGfAre019722 for ; Mon, 21 Dec 2009 16:41:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753013AbZLUQlJ (ORCPT ); Mon, 21 Dec 2009 11:41:09 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753052AbZLUQlI (ORCPT ); Mon, 21 Dec 2009 11:41:08 -0500 Received: from mail-bw0-f227.google.com ([209.85.218.227]:64093 "EHLO mail-bw0-f227.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753013AbZLUQlE (ORCPT ); Mon, 21 Dec 2009 11:41:04 -0500 Received: by bwz27 with SMTP id 27so3587773bwz.21 for ; Mon, 21 Dec 2009 08:41:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=2b6azbEEYlI/5SdXAMbNLX6XhkUwnzxRTG2WSUE438I=; b=n6jgfMMY1yYcEbzkPpvTvHsGC4/BuzORd7CndjSWjecGDOmOHlM1BZh3G3YKrVHo4L WqcvsgxiEY4VWQ4Ata7vBka7q9EjkKGPf4JYcZH4KsAF2BbTXAKo279zTVvQgbGVGHUo yoXQlADA7QpSAeZegAc+fqzDOBVqFi1SoCf9w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=hBtL5cyE1EPnOmaVrKBfw+n1kCmP9jwd+bNCdegiI/ynfg+fLBVxFb2eISTslZpiRo yUzBOsqFb8+Ov1f30fZHisTl8agbgtHZ83cE/ZU0i/dPlvkyjvaaII9o4Wqab0HJOz+a v5iqGc3qHSmn7KTtbeXv5mXQLsWTLkM5jTPmM= Received: by 10.204.5.139 with SMTP id 11mr1495574bkv.102.1261413660607; Mon, 21 Dec 2009 08:41:00 -0800 (PST) Received: from ?10.1.0.2? (IGLD-84-228-59-14.inter.net.il [84.228.59.14]) by mx.google.com with ESMTPS id 13sm1641725bwz.6.2009.12.21.08.40.56 (version=SSLv3 cipher=RC4-MD5); Mon, 21 Dec 2009 08:40:58 -0800 (PST) Subject: Re: Panic in iwl3945 driver From: Maxim Levitsky To: Zhu Yi Cc: "Chatre, Reinette" , linux-wireless , iwlwifi maling list In-Reply-To: <1259774227.26287.2.camel@maxim-laptop> 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> <1259732550.12157.130.camel@debian> <1259774227.26287.2.camel@maxim-laptop> Date: Mon, 21 Dec 2009 18:40:54 +0200 Message-ID: <1261413654.3556.6.camel@maxim-laptop> 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 2a28a1f..a36de73 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);