From patchwork Mon Apr 9 17:19:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Shmidt X-Patchwork-Id: 151454 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 570C7B7024 for ; Tue, 10 Apr 2012 03:23:43 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 1BEB89C20B; Mon, 9 Apr 2012 13:23:40 -0400 (EDT) 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 KbW9ZsZubyoJ; Mon, 9 Apr 2012 13:23:39 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id DD70D9C20E; Mon, 9 Apr 2012 13:23:35 -0400 (EDT) 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 2A7D39C20D for ; Mon, 9 Apr 2012 13:23:34 -0400 (EDT) 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 mMvpn+6dyaYG for ; Mon, 9 Apr 2012 13:23:30 -0400 (EDT) Received: from mail-qa0-f74.google.com (mail-qa0-f74.google.com [209.85.216.74]) (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 8A7449C20B for ; Mon, 9 Apr 2012 13:23:30 -0400 (EDT) Received: by qabg24 with SMTP id g24so294961qab.5 for ; Mon, 09 Apr 2012 10:23:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:date:subject:to:message-id:x-gm-message-state; bh=ylhuOSAqFvogQExhnicSh/R9O3HKveAYrTjouoWQ/eA=; b=bJ4POtESWzTtJDUjMajFLlOBWFk0ToxLsd8zLUsiCqYmb8dA9kyiyej8pSqABNhyIL XJvtR1RowePSCU7qTOu5C/UIL/q+9Ipk/JCjBDKi9YHWV3GcAVIdc5wD8HsLhnBQaKG0 ll6AQgj0INrKvok1DUJ7UeyQ78uyFXzUE6uslqo9qsWrdtJDCa9t+Ohp7aVq4NQmyo/q nP5ijtc8IF/SyhuFIP5xUeCZvz2/8aMccJybSSCdRPNuao/NTbL5QX4OGb4AJf5+qGO2 qvvbwOgvQqFJmxEAvKb/NMFgDMNcKPpxt58UF4aUAQgsdAw/ILaiA3Oadte6S12kErTF q62Q== Received: by 10.236.190.162 with SMTP id e22mr10632874yhn.6.1333992210096; Mon, 09 Apr 2012 10:23:30 -0700 (PDT) Received: by 10.236.190.162 with SMTP id e22mr10632867yhn.6.1333992210031; Mon, 09 Apr 2012 10:23:30 -0700 (PDT) Received: from wpzn3.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id y36si12983706yhg.2.2012.04.09.10.23.30 (version=TLSv1/SSLv3 cipher=AES128-SHA); Mon, 09 Apr 2012 10:23:30 -0700 (PDT) Received: from ushik.mtv.corp.google.com (ushik.mtv.corp.google.com [172.18.102.96]) by wpzn3.hot.corp.google.com (Postfix) with ESMTP id E4D6110004D for ; Mon, 9 Apr 2012 10:23:29 -0700 (PDT) Received: by ushik.mtv.corp.google.com (Postfix, from userid 57417) id 855F93835B; Mon, 9 Apr 2012 10:23:29 -0700 (PDT) From: Dmitry Shmidt Date: Mon, 9 Apr 2012 10:19:40 -0700 Subject: [PATCH] wpa_supplicant: Use bss_id list for 'bss FIRST' command To: hostap@lists.shmoo.com Message-Id: <20120409172329.855F93835B@ushik.mtv.corp.google.com> X-Gm-Message-State: ALoCoQmq2tVWimLdXpxeyMzXDJ13JLelwUT37Le/U2b5XJNdZ4F6cQlJ95mx7FunZS24OlSUvMpTeneY5r5OfPaVNBrGx89DIWfbBnc2H0Jqi1Laas65CgwUBXf935pMFImV9NaHkSJmV13TTdDisLe4IP7WaAZsxTVOjk6Dr1Cz9YdZs84yEW4= 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: , MIME-Version: 1.0 Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com Command 'bss FISRT' should use bss_id list, because 'bss NEXT-N' is using bss_id list as well. Signed-off-by: Dmitry Shmidt --- wpa_supplicant/ctrl_iface.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index 3ddae95..9a3008f 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -2657,7 +2657,7 @@ static int wpa_supplicant_ctrl_iface_bss(struct wpa_supplicant *wpa_s, } } } else if (os_strcmp(cmd, "FIRST") == 0) - bss = dl_list_first(&wpa_s->bss, struct wpa_bss, list); + bss = dl_list_first(&wpa_s->bss_id, struct wpa_bss, list_id); else if (os_strncmp(cmd, "ID-", 3) == 0) { i = atoi(cmd + 3); bss = wpa_bss_get_id(wpa_s, i);