From patchwork Sun Feb 27 22:30:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Yariv X-Patchwork-Id: 593791 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 p1RMUxOY002404 for ; Sun, 27 Feb 2011 22:31:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751889Ab1B0Wa6 (ORCPT ); Sun, 27 Feb 2011 17:30:58 -0500 Received: from mail-ww0-f44.google.com ([74.125.82.44]:33169 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751674Ab1B0Wa6 (ORCPT ); Sun, 27 Feb 2011 17:30:58 -0500 Received: by mail-ww0-f44.google.com with SMTP id 22so2383975wwb.1 for ; Sun, 27 Feb 2011 14:30:57 -0800 (PST) Received: by 10.216.19.133 with SMTP id n5mr1589373wen.83.1298845857375; Sun, 27 Feb 2011 14:30:57 -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 o19sm1561251wee.2.2011.02.27.14.30.55 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 27 Feb 2011 14:30:56 -0800 (PST) From: Ido Yariv To: Luciano Coelho Cc: linux-wireless@vger.kernel.org, Ido Yariv , Ohad Ben-Cohen Subject: [PATCH 1/7] wl12xx: Reorder data handling in irq_work Date: Mon, 28 Feb 2011 00:30:39 +0200 Message-Id: <1298845845-12191-2-git-send-email-ido@wizery.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1298845845-12191-1-git-send-email-ido@wizery.com> References: <1298845845-12191-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]); Sun, 27 Feb 2011 22:31:00 +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) {