From patchwork Tue Mar 1 13:14:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Yariv X-Patchwork-Id: 599091 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 p21DGX7p013099 for ; Tue, 1 Mar 2011 13:16:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753063Ab1CANQc (ORCPT ); Tue, 1 Mar 2011 08:16:32 -0500 Received: from mail-wy0-f174.google.com ([74.125.82.174]:50118 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753003Ab1CANQb (ORCPT ); Tue, 1 Mar 2011 08:16:31 -0500 Received: by mail-wy0-f174.google.com with SMTP id 36so4637678wyg.19 for ; Tue, 01 Mar 2011 05:16:31 -0800 (PST) Received: by 10.216.183.195 with SMTP id q45mr5623971wem.94.1298985307500; Tue, 01 Mar 2011 05:15:07 -0800 (PST) Received: from localhost.localdomain (93-173-12-148.bb.netvision.net.il [93.173.12.148]) by mx.google.com with ESMTPS id i80sm2467518wej.4.2011.03.01.05.15.05 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 01 Mar 2011 05:15:06 -0800 (PST) From: Ido Yariv To: Luciano Coelho Cc: linux-wireless@vger.kernel.org, Ido Yariv , Ohad Ben-Cohen Subject: [PATCH v2 1/7] wl12xx: Reorder data handling in irq_work Date: Tue, 1 Mar 2011 15:14:38 +0200 Message-Id: <1298985284-6048-2-git-send-email-ido@wizery.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1298985284-6048-1-git-send-email-ido@wizery.com> References: <1298985284-6048-1-git-send-email-ido@wizery.com> 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.6 (demeter1.kernel.org [140.211.167.41]); Tue, 01 Mar 2011 13:16:33 +0000 (UTC) diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 95aa19a..443f829 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c @@ -685,10 +685,7 @@ static void wl1271_irq_work(struct work_struct *work) if (intr & WL1271_ACX_INTR_DATA) { wl1271_debug(DEBUG_IRQ, "WL1271_ACX_INTR_DATA"); - /* check for tx results */ - if (wl->fw_status->common.tx_results_counter != - (wl->tx_results_count & 0xff)) - wl1271_tx_complete(wl); + wl1271_rx(wl, &wl->fw_status->common); /* Check if any tx blocks were freed */ if (!test_bit(WL1271_FLAG_FW_TX_BUSY, &wl->flags) && @@ -700,7 +697,10 @@ static void wl1271_irq_work(struct work_struct *work) wl1271_tx_work_locked(wl); } - wl1271_rx(wl, &wl->fw_status->common); + /* check for tx results */ + if (wl->fw_status->common.tx_results_counter != + (wl->tx_results_count & 0xff)) + wl1271_tx_complete(wl); } if (intr & WL1271_ACX_INTR_EVENT_A) {