From patchwork Tue Jun 10 17:50:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilan Peer X-Patchwork-Id: 358144 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 BB43014007B for ; Wed, 11 Jun 2014 04:49:40 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 49CC39D243; Tue, 10 Jun 2014 14:49: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 z48BhiK0v1D1; Tue, 10 Jun 2014 14:49:37 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id B3CFE9D27D; Tue, 10 Jun 2014 14:48:30 -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 379199D299 for ; Tue, 10 Jun 2014 14:48:29 -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 f6snjdZC8vRI for ; Tue, 10 Jun 2014 14:48:23 -0400 (EDT) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id A54889D27C for ; Tue, 10 Jun 2014 14:46:57 -0400 (EDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 10 Jun 2014 11:41:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="4.98,1010,1392192000"; d="scan'208"; a="545850647" 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:35 -0700 From: Ilan Peer To: hostap@lists.shmoo.com Subject: [PATCH 12/14] tests: Frequency set as no GO Date: Tue, 10 Jun 2014 20:50:40 +0300 Message-Id: <1402422642-16690-13-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: Avraham Stern 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: Avraham Stern Verify that when setting frequency as no_go_freq and setting up autonomous GO, the GO is instantiated on a different frequency, but when forming a P2P group and becoming a client this frequency can be used. Signed-off-by: Avraham Stern --- tests/hwsim/test_p2p_channel.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tests/hwsim/test_p2p_channel.py b/tests/hwsim/test_p2p_channel.py index 1d18382..7651f1d 100644 --- a/tests/hwsim/test_p2p_channel.py +++ b/tests/hwsim/test_p2p_channel.py @@ -399,3 +399,30 @@ def test_go_pref_chan_bss_on_disallowed_chan(dev, apdev): finally: dev[0].request("P2P_SET disallow_freq ") dev[0].request("SET p2p_pref_chan ") + +def test_no_go_freq(dev, apdev): + """P2P channel selection: no go freq""" + try: + dev[0].request("SET p2p_no_go_freq 2412") + #dev[0] as client, channel 1 is ok + [i_res, r_res] = go_neg_pbc(i_dev=dev[0], i_intent=1, + r_dev=dev[1], r_intent=14, r_freq=2412) + check_grpform_results(i_res, r_res) + if i_res['freq'] != "2412": + raise Exception("P2P group not formed on forced freq") + + dev[1].remove_group(r_res['ifname']) + fail = None + #dev[0] as GO, channel 1 is not allowed + try: + dev[0].request("SET p2p_no_go_freq 2412") + [i_res2, r_res2] = go_neg_pbc(i_dev=dev[0], i_intent=14, + r_dev=dev[1], r_intent=1, r_freq=2412) + check_grpform_results(i_res2, r_res2) + fail = "true" + except: + pass + if fail != None: + raise Exception("GO set on a disallowed freq") + finally: + dev[0].request("SET p2p_no_go_freq ")