From patchwork Tue Jun 10 17:50:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilan Peer X-Patchwork-Id: 358102 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 20F0814007B for ; Wed, 11 Jun 2014 04:47:25 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id E26D19D211; Tue, 10 Jun 2014 14:47:22 -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 g5CGAx9H2Up8; Tue, 10 Jun 2014 14:47:22 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 3FFC99D212; Tue, 10 Jun 2014 14:46:36 -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 BDAF09D211 for ; Tue, 10 Jun 2014 14:46:34 -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 V905L29xYd1z for ; Tue, 10 Jun 2014 14:46:28 -0400 (EDT) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id D381E9C122 for ; Tue, 10 Jun 2014 14:46:23 -0400 (EDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 10 Jun 2014 11:41:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="4.98,1010,1392192000"; d="scan'208"; a="545850564" 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:22 -0700 From: Ilan Peer To: hostap@lists.shmoo.com Subject: [PATCH 02/14] tests: Add wpasupplicant get_mcc helper function Date: Tue, 10 Jun 2014 20:50:30 +0300 Message-Id: <1402422642-16690-3-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 The function returns the number of channels supported by the driver. Signed-off-by: Haim Dreyfuss --- tests/hwsim/wpasupplicant.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/hwsim/wpasupplicant.py b/tests/hwsim/wpasupplicant.py index fb77e9b..1a7afa4 100644 --- a/tests/hwsim/wpasupplicant.py +++ b/tests/hwsim/wpasupplicant.py @@ -313,6 +313,11 @@ class WpaSupplicant: return vals[field] return None + def get_mcc(self): + mcc = int(self.get_driver_status_field + ('capa.num_multichan_concurrent')) + return 1 if mcc < 2 else mcc + def get_mib(self): res = self.request("MIB") lines = res.splitlines()