From patchwork Wed Jan 9 20:55:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sylvain_gmail X-Patchwork-Id: 210872 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "maxx.shmoo.com", Issuer "CA Cert Signing Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 7E0F72C00DB for ; Thu, 10 Jan 2013 07:56:04 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 459FA9C160; Wed, 9 Jan 2013 15:56:00 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tHttjxAv6cor; Wed, 9 Jan 2013 15:56:00 -0500 (EST) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id ABFE09C161; Wed, 9 Jan 2013 15:55:55 -0500 (EST) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 5755D9C161 for ; Wed, 9 Jan 2013 15:55:54 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GYyALs86mPZB for ; Wed, 9 Jan 2013 15:55:50 -0500 (EST) Received: from mail-bk0-f44.google.com (mail-bk0-f44.google.com [209.85.214.44]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id 42B6B9C0DD for ; Wed, 9 Jan 2013 15:55:50 -0500 (EST) Received: by mail-bk0-f44.google.com with SMTP id w11so1178209bku.3 for ; Wed, 09 Jan 2013 12:55:49 -0800 (PST) X-Received: by 10.204.9.147 with SMTP id l19mr35054841bkl.15.1357764948874; Wed, 09 Jan 2013 12:55:48 -0800 (PST) Received: from ?IPv6:2001:470:7959:0:edfa:e2ce:6c7b:c5c0? ([2001:470:7959:0:edfa:e2ce:6c7b:c5c0]) by mx.google.com with ESMTPS id l17sm50045851bkw.12.2013.01.09.12.55.46 (version=SSLv3 cipher=OTHER); Wed, 09 Jan 2013 12:55:47 -0800 (PST) Message-ID: <50EDD94E.1010004@gmail.com> Date: Wed, 09 Jan 2013 21:55:42 +0100 From: sylvain_gmail User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Jouni Malinen , hostap@lists.shmoo.com Subject: wpa_supplicant : ssid associate ? References: <1357135026-8147-1-git-send-email-jan@jvales.net> <1357135026-8147-2-git-send-email-jan@jvales.net> <20130106183514.GC3734@w1.fi> In-Reply-To: <20130106183514.GC3734@w1.fi> X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com Hello, there is some think that i don't understand in wpa_supplicant/wpa_supplicant.c file void wpa_supplicant_associate(struct wpa_supplicant *wpa_s, struct wpa_bss *bss, struct wpa_ssid *ssid) function Why we fixed ssid in struct wpa_driver_associate_params with struct wpa_bss *bss or struct wpa_ssid *ssid. Why we coun't allway fixed ssid with wpa_ssid *ssid as in my patch? best regards, Sylvain diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 0fb4d0f..01ddb1b 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -1537,9 +1537,9 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s, } wpa_supplicant_set_state(wpa_s, WPA_ASSOCIATING); + params.ssid = ssid->ssid; + params.ssid_len = ssid->ssid_len; if (bss) { - params.ssid = bss->ssid; - params.ssid_len = bss->ssid_len; if (!wpas_driver_bss_selection(wpa_s) || ssid->bssid_set) { wpa_printf(MSG_DEBUG, "Limit connection to BSSID " MACSTR " freq=%u MHz based on scan results " @@ -1549,9 +1549,6 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s, params.bssid = bss->bssid; params.freq = bss->freq; } - } else { - params.ssid = ssid->ssid; - params.ssid_len = ssid->ssid_len; } if (ssid->mode == WPAS_MODE_IBSS && ssid->bssid_set &&