From patchwork Sat Jun 27 22:03:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz.Dziedzic@tieto.com X-Patchwork-Id: 6685521 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AB3509F380 for ; Sat, 27 Jun 2015 22:03:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BF6DE20674 for ; Sat, 27 Jun 2015 22:03:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B27A72060F for ; Sat, 27 Jun 2015 22:03:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751172AbbF0WDb (ORCPT ); Sat, 27 Jun 2015 18:03:31 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:37065 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751792AbbF0WDa (ORCPT ); Sat, 27 Jun 2015 18:03:30 -0400 Received: by wicgi11 with SMTP id gi11so43613529wic.0 for ; Sat, 27 Jun 2015 15:03:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=MRehmIH1H+eH+A1jc2XeD+2CvOEW7Px34LYkW0LU9Vc=; b=Gsh7Jkcq3xUyh4Sa/bYlO69dC1cbtIlJfwJ3VUj+Daaek1yuEtImoVSHa5KA9c2l0s bpMelaQSBJGmC2KPFWL8kA9kdkvAZph6DApvNVXq/rgbp829Gv4QPoR4uKQwZ4Wg/5tZ sj+E4GmF9Run+70McUAdAAF2FPMGx0l3wo6ic= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=MRehmIH1H+eH+A1jc2XeD+2CvOEW7Px34LYkW0LU9Vc=; b=SfSYEtEKzjC0WuKYmbdrtk2RTVMXsNlglhgfyLZK0KHWY0XEFfoUniaCQSNTUVKtfZ GdemhKHQdLwkMLBqRZ0FNvJhqhCQdEW7cghlD1C6uLxQMTwY7lLzcqWtc9EgmEkHJAJb T4yu1k9arzU0Cz7FETSeGV90V6FWkZ7OD1ltMIvKzG2mro6RPerICD7jGZlT/loFt+/C PZkgoXTHRUAeHvZcuW4gcKh9r5TUU0gYjsnVVrzMMRzTOJ5IW7Fby+bRllHEax4nyk3x 9CX2YxSueil5JkW2ePn8n4AM2Bxe/avB8wqLgtQLzaMeo8LadxpI5fq9HXfANz3gj1Ta zObw== X-Gm-Message-State: ALoCoQkAp1or3Ge5JXHhAr66+GtDm0wBbVZ+2QQRfctOh49EhAUgM7BWx2aKuledggyqrdoRH8WOhdXhL5IYvTVB7HmAbuIAhK4xJp8C6XmgXyM4holn0rPX44cQJdKiRJQA1IyKEkKJ MIME-Version: 1.0 X-Received: by 10.180.100.197 with SMTP id fa5mr8781007wib.65.1435442609393; Sat, 27 Jun 2015 15:03:29 -0700 (PDT) Received: by 10.27.171.143 with HTTP; Sat, 27 Jun 2015 15:03:29 -0700 (PDT) In-Reply-To: References: <1435082418.2777.11.camel@ipeer-box> Date: Sun, 28 Jun 2015 00:03:29 +0200 Message-ID: Subject: Re: AP + P2P_GO multichan tests with intel7260 as a P2P_CLIENT - direct probe issue From: Janusz Dziedzic To: "Peer, Ilan" Cc: "linux-wireless@vger.kernel.org" , "chaitanya.mgit@gmail.com" , Johannes Berg X-DomainID: tieto.com Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 27 June 2015 at 23:49, Janusz Dziedzic wrote: > On 24 June 2015 at 14:20, Peer, Ilan wrote: >> Hi Janusz, >> >> Any chance you can check if the attached patch fixes the issue you reported? >> >> Thanks in advance, >> > I just check the mac80211/cfg80211 code, and I am not sure this direct > probe could work correctly. > > Function ieee80211_rx_mgmt_probe_resp() is interesting. > Seems we call > ieee80211_rx_bss_info() -> ieee80211_bss_info_update -> > cfg80211_inform_bss_width_frame() -> cfg80211_bss_update() -> this > could set bss->proberesp_ies > and after that check: > > if (ifmgd->auth_data && !ifmgd->auth_data->bss->proberesp_ies && > ether_addr_equal(mgmt->bssid, ifmgd->auth_data->bss->bssid)) { > /* got probe response, continue with auth */ > sdata_info(sdata, "direct probe responded\n"); > > So, ifmgd->auth_data->bss->proberesp_ies could be set before check? > > BTW, During my tests (no matter which card used) I never saw this msg: > sdata_info(sdata, "direct probe responded\n"); > And always saw 3 failed direct probes. > > @Johannes: Is that possible or I miss something. > Simplest patch I made: } @@ -3727,6 +3728,8 @@ static int ieee80211_probe_auth(struct ieee80211_sub_if_data *sdata) auth_data->bss->bssid, auth_data->tries, IEEE80211_AUTH_MAX_TRIES); + auth_data->waiting_probe_resp = true; + rcu_read_lock(); ssidie = ieee80211_bss_get_ie(auth_data->bss, WLAN_EID_SSID); if (!ssidie) { BR Janusz --- 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/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index e9f36f7..8ceae3d 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -371,6 +371,7 @@ struct ieee80211_mgd_auth_data { struct cfg80211_bss *bss; unsigned long timeout; int tries; + bool waiting_probe_resp; u16 algorithm, expected_transaction; u8 key[WLAN_KEY_LEN_WEP104]; diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 3294666..6f4027e 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -3212,13 +3212,14 @@ static void ieee80211_rx_mgmt_probe_resp(struct ieee80211_sub_if_data *sdata, ether_addr_equal(mgmt->bssid, ifmgd->associated->bssid)) ieee80211_reset_ap_probe(sdata); - if (ifmgd->auth_data && !ifmgd->auth_data->bss->proberesp_ies && + if (ifmgd->auth_data && ifmgd->auth_data->waiting_probe_resp && ether_addr_equal(mgmt->bssid, ifmgd->auth_data->bss->bssid)) { /* got probe response, continue with auth */ sdata_info(sdata, "direct probe responded\n"); ifmgd->auth_data->tries = 0; ifmgd->auth_data->timeout = jiffies; ifmgd->auth_data->timeout_started = true; + ifmgd->auth_data->waiting_probe_resp = false; run_again(sdata, ifmgd->auth_data->timeout); }