From patchwork Tue Nov 27 14:27:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias May X-Patchwork-Id: 1811321 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 7374A3FC54 for ; Tue, 27 Nov 2012 14:38:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754581Ab2K0OiP (ORCPT ); Tue, 27 Nov 2012 09:38:15 -0500 Received: from mail.neratec.com ([80.75.119.105]:60875 "EHLO mail.neratec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753236Ab2K0OiP (ORCPT ); Tue, 27 Nov 2012 09:38:15 -0500 X-Greylist: delayed 546 seconds by postgrey-1.27 at vger.kernel.org; Tue, 27 Nov 2012 09:38:14 EST Received: from localhost (localhost [127.0.0.1]) by mail.neratec.com (Postfix) with ESMTP id C88528AFF4B; Tue, 27 Nov 2012 15:29:02 +0100 (CET) X-Virus-Scanned: amavisd-new at neratec.com Received: from mail.neratec.com ([127.0.0.1]) by localhost (mail.neratec.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7C9ZFMPFos2h; Tue, 27 Nov 2012 15:29:01 +0100 (CET) Received: from [192.168.11.64] (unknown [192.168.11.64]) by mail.neratec.com (Postfix) with ESMTPSA id 9D9698AFF4A; Tue, 27 Nov 2012 15:29:01 +0100 (CET) Message-ID: <50B4CDE7.9040308@neratec.com> Date: Tue, 27 Nov 2012 15:27:51 +0100 From: Matthias May User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.9) Gecko/20121017 Icedove/10.0.9 MIME-Version: 1.0 To: linville@tuxdriver.com, linux-wireless@vger.kernel.org, ath9k-devel@lists.ath9k.org CC: Wojciech Dubowik Subject: [PATCH] Improve passive scanning: check not only for proberesp_ies but also for beacon_ies Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Improve passive scanning: check not only for proberesp_ies but also for beacon_ies Without this improvement, it always attempts to send a probe request (which it's not allowed) and then wait for auth_data->timeout. The log without patch: Jan 1 02:48:03 (none) kern.info kernel: [10084.062491] wlan0: authenticate with 04:f0:21:02:46:93 Jan 1 02:48:03 (none) kern.info kernel: [10084.064933] wlan0: direct probe to 04:f0:21:02:46:93 (try 1/3) Jan 1 02:48:04 (none) kern.info kernel: [10084.078417] wlan0: send auth to 04:f0:21:02:46:93 (try 2/3) Jan 1 02:48:04 (none) kern.info kernel: [10084.079363] wlan0: authenticated Jan 1 02:48:04 (none) kern.info kernel: [10084.082648] wlan0: associate with 04:f0:21:02:46:93 (try 1/3) Jan 1 02:48:04 (none) kern.info kernel: [10084.083726] wlan0: RX AssocResp from 04:f0:21:02:46:93 (capab=0x11 status=0 aid=1) The log with patch: Jan 1 02:46:25 (none) kern.info kernel: [ 9985.696798] wlan0: authenticate with 04:f0:21:02:46:53 Jan 1 02:46:25 (none) kern.info kernel: [ 9985.699234] wlan0: send auth to 04:f0:21:02:46:53 (try 1/3) Jan 1 02:46:25 (none) kern.info kernel: [ 9985.700211] wlan0: authenticated Jan 1 02:46:25 (none) kern.info kernel: [ 9985.702583] wlan0: associate with 04:f0:21:02:46:53 (try 1/3) Jan 1 02:46:25 (none) kern.info kernel: [ 9985.703624] wlan0: RX AssocResp from 04:f0:21:02:46:53 (capab=0x11 status=0 aid=1) Signed-off-by: Matthias May --- net/mac80211/mlme.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index d2a4f78..fae5f9c 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -2817,7 +2817,7 @@ static int ieee80211_probe_auth(struct ieee80211_sub_if_data *sdata) drv_mgd_prepare_tx(local, sdata); - if (auth_data->bss->proberesp_ies) { + if (auth_data->bss->proberesp_ies || auth_data->bss->beacon_ies) { u16 trans = 1; u16 status = 0;