From patchwork Wed Jul 29 20:07:11 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Roskin X-Patchwork-Id: 38221 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 n6TK7GAl023471 for ; Wed, 29 Jul 2009 20:07:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755197AbZG2UHO (ORCPT ); Wed, 29 Jul 2009 16:07:14 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755184AbZG2UHO (ORCPT ); Wed, 29 Jul 2009 16:07:14 -0400 Received: from c60.cesmail.net ([216.154.195.49]:60065 "EHLO c60.cesmail.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755176AbZG2UHN (ORCPT ); Wed, 29 Jul 2009 16:07:13 -0400 Received: from unknown (HELO smtprelay2.cesmail.net) ([192.168.1.112]) by c60.cesmail.net with ESMTP; 29 Jul 2009 16:07:07 -0400 Received: from mj.roinet.com (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by smtprelay2.cesmail.net (Postfix) with ESMTPSA id 2D60C34C6D; Wed, 29 Jul 2009 16:18:49 -0400 (EDT) Subject: [PATCH] rt2x00dev: cancel all work on disconnect To: linux-wireless@vger.kernel.org, "John W. Linville" , users@host1.serialmonkey.com From: Pavel Roskin Cc: Michael Buesch Date: Wed, 29 Jul 2009 16:07:11 -0400 Message-ID: <20090729200711.3784.16212.stgit@mj.roinet.com> User-Agent: StGit/0.15-rc1-9-gd8846 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Signed-off-by: Pavel Roskin --- drivers/net/wireless/rt2x00/rt2x00dev.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index 658a63b..66b303b 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c @@ -888,6 +888,13 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev) clear_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags); /* + * Cancel all work. + */ + rt2x00link_stop_tuner(rt2x00dev); + cancel_work_sync(&rt2x00dev->filter_work); + cancel_work_sync(&rt2x00dev->intf_work); + + /* * Disable radio. */ rt2x00lib_disable_radio(rt2x00dev);