From patchwork Mon Jul 27 18:57:34 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Rodriguez X-Patchwork-Id: 37612 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 n6RIvciO019799 for ; Mon, 27 Jul 2009 18:57:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750900AbZG0S5g (ORCPT ); Mon, 27 Jul 2009 14:57:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752902AbZG0S5g (ORCPT ); Mon, 27 Jul 2009 14:57:36 -0400 Received: from mail.atheros.com ([12.36.123.2]:31625 "EHLO mail.atheros.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750851AbZG0S5f (ORCPT ); Mon, 27 Jul 2009 14:57:35 -0400 Received: from mail.atheros.com ([10.10.20.105]) by sidewinder.atheros.com for ; Mon, 27 Jul 2009 11:57:36 -0700 Received: from smtp.atheros.com (10.10.18.125) by SC1EXHC-01.global.atheros.com (10.10.20.111) with Microsoft SMTP Server (TLS) id 8.0.751.0; Mon, 27 Jul 2009 11:57:35 -0700 Received: by smtp.atheros.com (sSMTP sendmail emulation); Mon, 27 Jul 2009 11:57:35 -0700 From: "Luis R. Rodriguez" To: CC: , "Luis R. Rodriguez" , Christian Lamparter Subject: [PATCH] ar9170: remove unneeded flush_workqueue() Date: Mon, 27 Jul 2009 11:57:34 -0700 Message-ID: <1248721054-15966-1-git-send-email-lrodriguez@atheros.com> X-Mailer: git-send-email 1.6.3.3 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org cancel_delayed_work_sync() and cancel_work_sync() are already being used therefore already waiting for all pending work by the driver to have been completed, no need to flush the mac80211 workqueue. Cc: Christian Lamparter Signed-off-by: Luis R. Rodriguez --- drivers/net/wireless/ath/ar9170/main.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c index c7287a8..cd8d340 100644 --- a/drivers/net/wireless/ath/ar9170/main.c +++ b/drivers/net/wireless/ath/ar9170/main.c @@ -1290,12 +1290,11 @@ static void ar9170_op_stop(struct ieee80211_hw *hw) if (IS_STARTED(ar)) ar->state = AR9170_IDLE; - flush_workqueue(ar->hw->workqueue); - cancel_delayed_work_sync(&ar->tx_janitor); cancel_delayed_work_sync(&ar->led_work); cancel_work_sync(&ar->filter_config_work); cancel_work_sync(&ar->beacon_work); + mutex_lock(&ar->mutex); if (IS_ACCEPTING_CMD(ar)) {