From patchwork Tue Jun 10 17:50:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilan Peer X-Patchwork-Id: 358124 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 ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 81D3914007B for ; Wed, 11 Jun 2014 04:48:31 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id E6ED19D26B; Tue, 10 Jun 2014 14:48:10 -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 wP7YuDGcgVvI; Tue, 10 Jun 2014 14:48:10 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 4FDFC9D26E; Tue, 10 Jun 2014 14:46:54 -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 8AACF9D260 for ; Tue, 10 Jun 2014 14:46:53 -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 c41z8aVc0UbA for ; Tue, 10 Jun 2014 14:46:48 -0400 (EDT) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 120699C1B2 for ; Tue, 10 Jun 2014 14:46:30 -0400 (EDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 10 Jun 2014 11:41:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="4.98,1010,1392192000"; d="scan'208"; a="545850603" Received: from unknown (HELO ipeer-e6430-1.jer.intel.com) ([10.12.217.176]) by fmsmga001.fm.intel.com with ESMTP; 10 Jun 2014 11:46:28 -0700 From: Ilan Peer To: hostap@lists.shmoo.com Subject: [PATCH 07/14] tests: Autonomous GO force different channel than BSS Date: Tue, 10 Jun 2014 20:50:35 +0300 Message-Id: <1402422642-16690-8-git-send-email-ilan.peer@intel.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1402422642-16690-1-git-send-email-ilan.peer@intel.com> References: <1402422642-16690-1-git-send-email-ilan.peer@intel.com> Cc: Haim Dreyfuss X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.11 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 From: Haim Dreyfuss After bss is connected on a specific channel, create autonomous GO with forced different channel. Requires MCC. Signed-off-by: Haim Dreyfuss --- tests/hwsim/test_p2p_channel.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/hwsim/test_p2p_channel.py b/tests/hwsim/test_p2p_channel.py index ceb815d..e6187e2 100644 --- a/tests/hwsim/test_p2p_channel.py +++ b/tests/hwsim/test_p2p_channel.py @@ -290,3 +290,23 @@ def test_go_neg_with_bss_on_disallowed_chan(dev, apdev): test_connectivity(dev[0].ifname, apdev[0]['ifname']) finally: dev[0].request("P2P_SET disallow_freq ") + +def test_autogo_force_diff_channel(dev, apdev): + """P2P autonomous GO and bss operate on different channels""" + if dev[0].get_mcc() < 2: + logger.info("Skiping test because the driver doesn't support MCC") + return "skip" + + dev[0].request("SET p2p_no_group_iface 0") + + hostapd.add_ap(apdev[0]['ifname'], {"ssid" : 'ap-test', "channel" : '1'}) + dev[0].connect("ap-test", key_mgmt = "NONE", scan_freq = "2412") + channels = { 2 : 2417, 5 : 2432, 9 : 2452} + for key in channels: + res_go = autogo(dev[0], channels[key]) + test_connectivity(dev[0].ifname, apdev[0]['ifname']) + if int(res_go['freq']) == 2412: + raise Exception("Group operation channel is: 2412 " + "excepted: " + res_go['freq']) + break + dev[0].remove_group(res_go['ifname'])