From patchwork Fri Mar 4 09:20:41 2016 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: 591864 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B313A14018C for ; Fri, 4 Mar 2016 20:26:18 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=tieto.com header.i=@tieto.com header.b=Du5AOqrk; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ablzw-00059F-AU; Fri, 04 Mar 2016 09:26:12 +0000 Received: from mail-lb0-x22f.google.com ([2a00:1450:4010:c04::22f]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ablvX-0001q5-2x for hostap@lists.infradead.org; Fri, 04 Mar 2016 09:21:41 +0000 Received: by mail-lb0-x22f.google.com with SMTP id k15so54128724lbg.0 for ; Fri, 04 Mar 2016 01:21:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=OtqnzlW3Gos/hPfEMeYfhc+Q2e0SHca1d0W3ucLUNrk=; b=Du5AOqrknQN3VVdSq5oNBIa6ac/uNrd98vbUoBBDvw/lRlJ8Ju6XTAENFMVVXZ0yZX HauFrsloRXKjuhszdSpCbNTOmED9eILdrpicqSd8LFUApY0TEkFNQPvsmxy50kslr+Bi E/Ee7Cbm9FyvfOJvNrgLySLXYlL4ZjigmnwjA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=OtqnzlW3Gos/hPfEMeYfhc+Q2e0SHca1d0W3ucLUNrk=; b=lHEcvr5NFlXCj5fXFN9SOP8OQSTgZRm5PceDcc9Rm0P+YhZiDkrfld0+/RXkKYG1GB RVMbiaNGsDl5RFoU8GJHDUGR1xW8lne6dWsqI0wS7peU4aSvFFaVScdBrhlA8vjT3Pis oX3vznyn0UtuPSSGjqdUrglsAxmPZRNVJy+i+OOjRi3vUg+MNE3O2ZJnkXusW+kzVMVZ GXCPtfawdd7Usoa3qTaSYBv8PL3PIB//G7sYzfywqRnuyqRUInl4avPLsvb9pu8s/jvZ LbpLS+ZzbKvGTH3SDTjvfSeW4fz+XyGjQaVvHItKsWvsnxiQcGZaQ/05DAnujduIwqoG 7wEQ== X-Gm-Message-State: AD7BkJLVRASqQb6IWAKFGBltEyJO1g3ib3En3SnKNPKZGbdzS/gliKJjXPecCtlidODVySoJE3eEQsU2R7BTpFoHNapzR2IVIB4e3jXFr2cj/gbNiZUKUas4fDMslLk7+cdZX0aOLnxU2NJXwEv07hWCmDV2QultfbiALwg4J57ZympIHhNgAvPOXlEhpKOrWKdD X-Received: by 10.25.25.84 with SMTP id 81mr2556378lfz.71.1457083277593; Fri, 04 Mar 2016 01:21:17 -0800 (PST) Received: from dell6430.guest.wifi ([91.198.246.8]) by smtp.gmail.com with ESMTPSA id r191sm437001lfe.28.2016.03.04.01.21.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 04 Mar 2016 01:21:17 -0800 (PST) From: Janusz Dziedzic To: hostap@lists.infradead.org Subject: [PATCH v5 25/25] tests: hostapd.py add params for required configurations Date: Fri, 4 Mar 2016 10:20:41 +0100 Message-Id: <1457083241-7492-26-git-send-email-janusz.dziedzic@tieto.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1457083241-7492-1-git-send-email-janusz.dziedzic@tieto.com> References: <1457083241-7492-1-git-send-email-janusz.dziedzic@tieto.com> X-DomainID: tieto.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160304_012139_745664_B053E50F X-CRM114-Status: UNSURE ( 8.92 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:4010:c04:0:0:0:22f listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: j@w1.fi, Janusz Dziedzic MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Add support for b_olny/g_only/a_only/HT20/HT40/VHT80 Signed-off-by: Janusz Dziedzic --- tests/hwsim/hostapd.py | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/tests/hwsim/hostapd.py b/tests/hwsim/hostapd.py index 3efebb9..a336a59 100644 --- a/tests/hwsim/hostapd.py +++ b/tests/hwsim/hostapd.py @@ -443,3 +443,52 @@ def wpa2_eap_params(ssid=None): if ssid: params["ssid"] = ssid return params + +def b_only_params(channel="1", ssid=None, country=None): + params = { "hw_mode" : "b", + "channel" : channel } + if ssid: + params["ssid"] = ssid + if country: + params["country_code"] = country + return params + +def g_only_params(channel="1", ssid=None, country=None): + params = { "hw_mode" : "g", + "channel" : channel } + if ssid: + params["ssid"] = ssid + if country: + params["country_code"] = country + return params + +def a_only_params(channel="36", ssid=None, country=None): + params = { "hw_mode" : "a", + "channel" : channel } + if ssid: + params["ssid"] = ssid + if country: + params["country_code"] = country + return params + +def ht20_params(channel="1", ssid=None, country=None): + params = { "ieee80211n" : "1", + "channel" : channel, + "hw_mode" : "g" } + if int(channel) > 14: + params["hw_mode"] = "a" + if ssid: + params["ssid"] = ssid + if country: + params["country_code"] = country + return params + +def ht40_plus_params(channel="1", ssid=None, country=None): + params = ht20_params(channel, ssid, country) + params['ht_capab'] = "[HT40+]" + return params + +def ht40_minus_params(channel="1", ssid=None, country=None): + params = ht20_params(channel, ssid, country) + params['ht_capab'] = "[HT40-]" + return params