From patchwork Fri Dec 3 04:05:19 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Kossifidis X-Patchwork-Id: 376731 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oB34I0Bb019119 for ; Fri, 3 Dec 2010 04:18:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932199Ab0LCER7 (ORCPT ); Thu, 2 Dec 2010 23:17:59 -0500 Received: from mail-ey0-f174.google.com ([209.85.215.174]:48129 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758331Ab0LCER6 (ORCPT ); Thu, 2 Dec 2010 23:17:58 -0500 Received: by eye27 with SMTP id 27so4781530eye.19 for ; Thu, 02 Dec 2010 20:17:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mail-followup-to:mime-version:content-type :content-disposition:user-agent; bh=a7WVeACPRQWe0V3ig32WXvDVVxL7W6/Zm8+ZOHIQpnA=; b=SXnGVh2mfk6dc0xpkkk7vcEHLk4x7GFq9ZlS7LVLpHclsBcbDrjEKcdBowQoHpxw8E 06kaSNR5mXALlGuQ8FVwRsxgI55fRxN4Hd7zAJkDRyuH/npIy6A+SCEFaYdPCFr1NJIa dkTjJvgosOoamdFXhQ0TdLHdpGp4xsMqDUiJM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mail-followup-to:mime-version :content-type:content-disposition:user-agent; b=I3etqAwZr9i0TK0Cuy/h17ZJPhMdrm0XmUTjo56fGlfOUguUbUPRhGTk45gE6bJSNW qjaP4ZloDsnB6USazp1ddSHNnJ8sirIPkGFrBOtYP5oP096P7IHY4KVpffktQFkNlFNf aW8H1IOm/5HHxWRAUmXypddr8JgN6WapOPN0Y= Received: by 10.213.32.195 with SMTP id e3mr1925903ebd.78.1291349118620; Thu, 02 Dec 2010 20:05:18 -0800 (PST) Received: from localhost ([139.91.73.37]) by mx.google.com with ESMTPS id w20sm1072277eeh.6.2010.12.02.20.05.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 02 Dec 2010 20:05:18 -0800 (PST) Date: Fri, 3 Dec 2010 06:05:19 +0200 From: Nick Kossifidis To: ath5k-devel@venema.h4ckr.net, linux-wireless@vger.kernel.org Cc: linville@tuxdriver.com, me@bobcopeland.com, mcgrof@gmail.com, jirislaby@gmail.com, nbd@openwrt.org, br1@einfach.org, sedat.dilek@googlemail.com Subject: [PATCH 2/6] ath5k: Always free tx buffers before reset Message-ID: <20101203040519.GB2988@makis.mantri> Mail-Followup-To: ath5k-devel@lists.ath5k.org, linux-wireless@vger.kernel.org, linville@tuxdriver.com, me@bobcopeland.com, mcgrof@gmail.com, jirislaby@gmail.com, nbd@openwrt.org, br1@einfach.org, sedat.dilek@googlemail.com MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 03 Dec 2010 04:18:00 +0000 (UTC) diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index a8d380a..047b2a0 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c @@ -2512,9 +2512,11 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan, synchronize_irq(sc->pdev->irq); stop_tasklets(sc); + /* We are going to empty hw queues + * so we should also free any remaining + * tx buffers */ + ath5k_drain_tx_buffs(sc); if (chan) { - ath5k_drain_tx_buffs(sc); - sc->curchan = chan; sc->curband = &sc->sbands[chan->band]; }