diff mbox

[02/14] tests: Add wpasupplicant get_mcc helper function

Message ID 1402422642-16690-3-git-send-email-ilan.peer@intel.com
State Accepted
Headers show

Commit Message

Ilan Peer June 10, 2014, 5:50 p.m. UTC
From: Haim Dreyfuss <haim.dreyfuss@intel.com>

The function returns the number of channels supported by the driver.

Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
---
 tests/hwsim/wpasupplicant.py |    5 +++++
 1 file changed, 5 insertions(+)
diff mbox

Patch

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()