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

Ilan Peer ilan.peer
Tue Jun 10 10:50:30 PDT 2014


From: Haim Dreyfuss <haim.dreyfuss at intel.com>

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

Signed-off-by: Haim Dreyfuss <haim.dreyfuss at intel.com>
---
 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()
-- 
1.7.10.4




More information about the Hostap mailing list