From patchwork Mon Sep 3 08:58:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arik Nemtsov X-Patchwork-Id: 181321 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 510A82C0094 for ; Mon, 3 Sep 2012 18:58:49 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 6EF699D20F; Mon, 3 Sep 2012 04:58:43 -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 qzDqFKJldRaN; Mon, 3 Sep 2012 04:58:43 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 447A49D1FB; Mon, 3 Sep 2012 04:58:39 -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 C916A9D1FB for ; Mon, 3 Sep 2012 04:58:37 -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 sFvFwdfpagKz for ; Mon, 3 Sep 2012 04:58:32 -0400 (EDT) Received: from mail-we0-f172.google.com (mail-we0-f172.google.com [74.125.82.172]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client did not present a certificate) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id BDB299D1EA for ; Mon, 3 Sep 2012 04:58:32 -0400 (EDT) Received: by weyu54 with SMTP id u54so3559597wey.17 for ; Mon, 03 Sep 2012 01:58:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=ijKYbpJCHYJpjnOwjIGcPs9Um/dXDUDbg/whfaHxqdA=; b=hI+1zzMaTTqoM545Xnfos+vxRxiYQI5YZ3+q7aySE7Xh0M6CWxhFtoiQSAw9v5B34W QujWDZHYqa9yhk6/nzcod7I49yqkHFyk2oDcLfRUQBYw7u0srde/lTOcmf8UKyaj+agq EOQZon6LD0vNazcr42aW1po7O9fvB4kGu8vgX8YHUnnPD60XW1A/ML2qX2+pYohAEh6B AXLhioKj7DLj4i/9R9ntIPkLEvs4syxJ7tkqCc1pNQRYAbJT26jMMgEuNOSJyrC116kW Z/mVMuHEYnrcYKWfr03F+ub2vOeurLkeeNFBMjzbG55nFiI6VhIiXXfMpbabWX6nRoeR EglQ== Received: by 10.180.108.45 with SMTP id hh13mr21688040wib.15.1346662711671; Mon, 03 Sep 2012 01:58:31 -0700 (PDT) Received: from localhost.localdomain (109-186-69-34.bb.netvision.net.il. [109.186.69.34]) by mx.google.com with ESMTPS id do5sm26569889wib.10.2012.09.03.01.58.29 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 03 Sep 2012 01:58:30 -0700 (PDT) From: Arik Nemtsov To: hostap@lists.shmoo.com Subject: [PATCH] AP: configure basic rates from iface and not conf Date: Mon, 3 Sep 2012 11:58:27 +0300 Message-Id: <1346662707-16777-1-git-send-email-arik@wizery.com> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQkN7oTxZFyOKMi6LgLBHOMxfRIjNhIWoH9wp1BJK1MghhbDZl2Dy+8RjHcL/mOyVxUf4GgN Cc: Arik Nemtsov 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 The conf doesn't contain any basic rates in some cases. Most notably, when starting a p2p GO in 5Ghz. Use the iface rates which are initialized in hostapd_prepare_rates() to the conf rates or set to default values if no conf values exist. Signed-hostap: Arik Nemtsov --- src/ap/beacon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ap/beacon.c b/src/ap/beacon.c index 0f29ccd..a1bb067 100644 --- a/src/ap/beacon.c +++ b/src/ap/beacon.c @@ -643,7 +643,7 @@ void ieee802_11_set_beacon(struct hostapd_data *hapd) params.proberesp_len = resp_len; params.dtim_period = hapd->conf->dtim_period; params.beacon_int = hapd->iconf->beacon_int; - params.basic_rates = hapd->iconf->basic_rates; + params.basic_rates = hapd->iface->basic_rates; params.ssid = (u8 *) hapd->conf->ssid.ssid; params.ssid_len = hapd->conf->ssid.ssid_len; params.pairwise_ciphers = hapd->conf->rsn_pairwise ?