From patchwork Fri Oct 30 21:52:29 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Levitsky X-Patchwork-Id: 56719 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 n9ULqaRZ031994 for ; Fri, 30 Oct 2009 21:52:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932928AbZJ3Vwa (ORCPT ); Fri, 30 Oct 2009 17:52:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932927AbZJ3Vwa (ORCPT ); Fri, 30 Oct 2009 17:52:30 -0400 Received: from fg-out-1718.google.com ([72.14.220.156]:60196 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932926AbZJ3Vw3 (ORCPT ); Fri, 30 Oct 2009 17:52:29 -0400 Received: by fg-out-1718.google.com with SMTP id 16so1769174fgg.1 for ; Fri, 30 Oct 2009 14:52:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=h94MmFzjExp0Clm0pXfaL8fDK6vMKL6v7GUCBpGJ6Hk=; b=gQVmRHRHd0FOz8x19lJ0R/t+Hzxx5QDKxMMBbLf8PXwgssMhGBwJt7WytYZ/IhfoKN 3ycfB4lvR1fI//g2rRWGVPBWYyLrEUeZrDmoLCdWWZulW+1hufM0uEiQMEC15ghstzLh WqOaaAwdCY4CWbAvdaP/a7w5BqJirp+0BKI9U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=Jbe/UJ7pt3jr55v3SRtgplzw6Apeghxmc46U8BjIEADTHTVpRo8uG1NfOC6Qolbi5a UtSCrcdSXQHKPuwE3Zn2cZc4S1mihSV/O1lodS1a/T3521ZmF9Qg2Q+tU6sTvGV0/ysl zfA6xDjyBHWL7pD2KF5ejN59zq7sVEIHXk62o= Received: by 10.86.104.36 with SMTP id b36mr1365599fgc.42.1256939553535; Fri, 30 Oct 2009 14:52:33 -0700 (PDT) Received: from ?10.1.0.2? (87.68.70.19.cable.012.net.il [87.68.70.19]) by mx.google.com with ESMTPS id 3sm498653fge.4.2009.10.30.14.52.31 (version=SSLv3 cipher=RC4-MD5); Fri, 30 Oct 2009 14:52:32 -0700 (PDT) Subject: [PATCH 1/2] Allow scanning while in authenticated only state From: Maxim Levitsky To: linux-wireless Cc: "hostap@lists.shmoo.com" In-Reply-To: <1256939391.31271.11.camel@maxim-laptop> References: <1256939391.31271.11.camel@maxim-laptop> Date: Fri, 30 Oct 2009 23:52:29 +0200 Message-ID: <1256939549.31271.14.camel@maxim-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index c46ac01..c932765 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c @@ -418,6 +418,7 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata, { struct ieee80211_local *local = sdata->local; struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; + struct ieee80211_mgd_work *wk, *tmp; int rc; if (local->scan_req) @@ -450,9 +451,14 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata, if (req != local->int_scan_req && sdata->vif.type == NL80211_IFTYPE_STATION && !list_empty(&ifmgd->work_list)) { - /* actually wait for the work it's doing to finish/time out */ - set_bit(IEEE80211_STA_REQ_SCAN, &ifmgd->request); - return 0; + + /* actually wait for the work it's doing to finish/time out*/ + list_for_each_entry_safe(wk, tmp, &ifmgd->work_list, list) { + if (wk->state != IEEE80211_MGD_STATE_IDLE) { + set_bit(IEEE80211_STA_REQ_SCAN, &ifmgd->request); + return 0; + } + } } if (local->ops->hw_scan)