From patchwork Tue Nov 17 16:49:46 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 60732 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 nAHGoXfd008185 for ; Tue, 17 Nov 2009 16:50:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755401AbZKQQuQ (ORCPT ); Tue, 17 Nov 2009 11:50:16 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755423AbZKQQuQ (ORCPT ); Tue, 17 Nov 2009 11:50:16 -0500 Received: from smtp.nokia.com ([192.100.105.134]:18010 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755203AbZKQQuP (ORCPT ); Tue, 17 Nov 2009 11:50:15 -0500 Received: from vaebh105.NOE.Nokia.com (vaebh105.europe.nokia.com [10.160.244.31]) by mgw-mx09.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id nAHGoIkk025350; Tue, 17 Nov 2009 10:50:19 -0600 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by vaebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 17 Nov 2009 18:49:49 +0200 Received: from mgw-da01.ext.nokia.com ([147.243.128.24]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Tue, 17 Nov 2009 18:49:48 +0200 Received: from [127.0.1.1] (trdhcp14579.ntc.nokia.com [172.22.145.79]) by mgw-da01.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id nAHGnjLw006787; Tue, 17 Nov 2009 18:49:46 +0200 From: Kalle Valo Subject: [PATCH 13/16] wl1251: Fix regression in IRQ loop handling To: linville@tuxdriver.com Cc: linux-wireless@vger.kernel.org Date: Tue, 17 Nov 2009 18:49:46 +0200 Message-ID: <20091117164945.2236.93041.stgit@tikku> In-Reply-To: <20091117164614.2236.8543.stgit@tikku> References: <20091117164614.2236.8543.stgit@tikku> User-Agent: StGIT/0.14.2 MIME-Version: 1.0 X-OriginalArrivalTime: 17 Nov 2009 16:49:49.0129 (UTC) FILETIME=[F9C6A390:01CA67A5] X-Nokia-AV: Clean 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/wl12xx/wl1251_main.c b/drivers/net/wireless/wl12xx/wl1251_main.c index dad010d..2e1c10f 100644 --- a/drivers/net/wireless/wl12xx/wl1251_main.c +++ b/drivers/net/wireless/wl12xx/wl1251_main.c @@ -308,9 +308,11 @@ static void wl1251_irq_work(struct work_struct *work) wl1251_debug(DEBUG_IRQ, "WL1251_ACX_INTR_INIT_COMPLETE"); - intr = wl1251_reg_read32(wl, ACX_REG_INTERRUPT_CLEAR); + if (--ctr == 0) + break; - } while (intr && --ctr); + intr = wl1251_reg_read32(wl, ACX_REG_INTERRUPT_CLEAR); + } while (intr); out_sleep: wl1251_reg_write32(wl, ACX_REG_INTERRUPT_MASK, ~(wl->intr_mask));