From patchwork Thu Dec 29 09:37:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 709490 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::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 3tq4MZ1jjTz9sdn for ; Thu, 29 Dec 2016 20:40:10 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cMXBf-0002Qi-OF; Thu, 29 Dec 2016 09:39:51 +0000 Received: from mga14.intel.com ([192.55.52.115]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cMXBb-0002Kh-Ai for hostap@lists.infradead.org; Thu, 29 Dec 2016 09:39:48 +0000 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP; 29 Dec 2016 01:39:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,426,1477983600"; d="scan'208";a="917105264" Received: from unknown (HELO TEMPHOSTNAME.ger.corp.intel.com) ([10.12.217.219]) by orsmga003.jf.intel.com with ESMTP; 29 Dec 2016 01:39:22 -0800 From: Andrei Otcheretianski To: hostap@lists.infradead.org Subject: [PATCH] tests: autogo: Use group control interface for GO commands Date: Thu, 29 Dec 2016 11:37:58 +0200 Message-Id: <1483004278-11774-1-git-send-email-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161229_013947_476223_3D4E3CCD X-CRM114-Status: UNSURE ( 8.18 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -8.3 (--------) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-8.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [192.55.52.115 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [192.55.52.115 listed in wl.mailspike.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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: Avraham Stern MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Avraham Stern The channel switch command is intended for the GO interface, but it is not sent on the group control interface. For configurations that use a separate interface for P2P groups, this will fail the test. Fix this by sending the channel switch command on the group control interface and waiting for the channel switch event on the global control interface. Signed-off-by: Avraham Stern --- tests/hwsim/test_p2p_autogo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/hwsim/test_p2p_autogo.py b/tests/hwsim/test_p2p_autogo.py index b5f5418..1f4d30e 100644 --- a/tests/hwsim/test_p2p_autogo.py +++ b/tests/hwsim/test_p2p_autogo.py @@ -326,12 +326,12 @@ def test_autogo_chan_switch(dev): """P2P autonomous GO switching channels""" autogo(dev[0], freq=2417) connect_cli(dev[0], dev[1]) - res = dev[0].request("CHAN_SWITCH 5 2422") + res = dev[0].group_request("CHAN_SWITCH 5 2422") if "FAIL" in res: # for now, skip test since mac80211_hwsim support is not yet widely # deployed raise HwsimSkip("Assume mac80211_hwsim did not support channel switching") - ev = dev[0].wait_event(["AP-CSA-FINISHED"], timeout=10) + ev = dev[0].wait_group_event(["AP-CSA-FINISHED"], timeout=10) if ev is None: raise Exception("CSA finished event timed out") if "freq=2422" not in ev: