From patchwork Thu Apr 21 20:30:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Rodriguez X-Patchwork-Id: 725601 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 p3LKUstq015766 for ; Thu, 21 Apr 2011 20:30:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753425Ab1DUUax (ORCPT ); Thu, 21 Apr 2011 16:30:53 -0400 Received: from mail.atheros.com ([12.19.149.2]:43145 "EHLO mail.atheros.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753902Ab1DUUaw (ORCPT ); Thu, 21 Apr 2011 16:30:52 -0400 Received: from mail.atheros.com ([10.234.20.104]) by sidewinder.atheros.com for ; Thu, 21 Apr 2011 13:30:26 -0700 Received: from tux (10.10.11.42) by SC1EXHC-01.global.atheros.com (10.234.20.106) with Microsoft SMTP Server (TLS) id 8.2.213.0; Thu, 21 Apr 2011 13:30:50 -0700 Received: by tux (sSMTP sendmail emulation); Thu, 21 Apr 2011 13:30:49 -0700 From: "Luis R. Rodriguez" To: CC: , , , , , "Luis R. Rodriguez" Subject: [PATCH v2 4/5] ath6kl: fix scan operation while disconnect Date: Thu, 21 Apr 2011 13:30:39 -0700 Message-ID: <1303417840-19605-5-git-send-email-lrodriguez@atheros.com> X-Mailer: git-send-email 1.7.4.15.g7811d In-Reply-To: <1303417840-19605-1-git-send-email-lrodriguez@atheros.com> References: <1303417840-19605-1-git-send-email-lrodriguez@atheros.com> MIME-Version: 1.0 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]); Thu, 21 Apr 2011 20:30:54 +0000 (UTC) From: Naveen Singh If a scan operation is pending and in between a disconnect event is received from firmware the scan results never get sent back to cfg80211. This causes a scan failure and yields a device/resource busy state upon retries. If a disconnect event is received and scan is pending return the scan done to the cfg80211 to enable futher scans to be issued. Signed-off-by: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/os/linux/cfg80211.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/staging/ath6kl/os/linux/cfg80211.c b/drivers/staging/ath6kl/os/linux/cfg80211.c index 1f799c1..d5e554e 100644 --- a/drivers/staging/ath6kl/os/linux/cfg80211.c +++ b/drivers/staging/ath6kl/os/linux/cfg80211.c @@ -627,6 +627,10 @@ ar6k_cfg80211_disconnect_event(struct ar6_softc *ar, u8 reason, AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: reason=%u\n", __func__, reason)); + if (ar->scan_request) { + cfg80211_scan_done(ar->scan_request, true); + ar->scan_request = NULL; + } if((ADHOC_NETWORK & ar->arNetworkType)) { if(NL80211_IFTYPE_ADHOC != ar->wdev->iftype) { AR_DEBUG_PRINTF(ATH_DEBUG_INFO,