From patchwork Fri Sep 3 11:57:36 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislaw Gruszka X-Patchwork-Id: 153911 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 o83C1ceU019487 for ; Fri, 3 Sep 2010 12:02:28 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932353Ab0ICMBx (ORCPT ); Fri, 3 Sep 2010 08:01:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53008 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932101Ab0ICMBx (ORCPT ); Fri, 3 Sep 2010 08:01:53 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o83C1faD023930 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 3 Sep 2010 08:01:42 -0400 Received: from localhost (dhcp-26-173.brq.redhat.com [10.34.26.173]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o83C1emq010888; Fri, 3 Sep 2010 08:01:41 -0400 From: Stanislaw Gruszka To: Johannes Berg , Wey-Yi Guy , Reinette Chatre , "John W. Linville" Cc: linux-wireless@vger.kernel.org, Stanislaw Gruszka Subject: [PATCH 13/13] mac80211: wait for scan work complete before restarting hw Date: Fri, 3 Sep 2010 13:57:36 +0200 Message-Id: <1283515056-11523-14-git-send-email-sgruszka@redhat.com> In-Reply-To: <1283515056-11523-1-git-send-email-sgruszka@redhat.com> References: <1283515056-11523-1-git-send-email-sgruszka@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 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 Sep 2010 12:02:28 +0000 (UTC) diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 4935b84..bf0eb6a 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -305,6 +305,9 @@ void ieee80211_restart_hw(struct ieee80211_hw *hw) trace_api_restart_hw(local); + /* wait for scan work complete */ + flush_workqueue(local->workqueue); + WARN(test_bit(SCAN_HW_SCANNING, &local->scanning), "%s called with hardware scan in progress\n", __func__);