From: Jouni Malinen Date: Sun, 5 Jan 2014 19:54:46 +0000 (+0200) Subject: tests: Add get_driver_status for Hostapd X-Git-Tag: hostap_2_1~169 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a36158befe269bbfab27c20421b66eb51b4e4173;p=thirdparty%2Fhostap.git tests: Add get_driver_status for Hostapd This is identical to the same command in WpaSupplicant class. Signed-hostap: Jouni Malinen --- diff --git a/tests/hwsim/hostapd.py b/tests/hwsim/hostapd.py index fa1d35612..b282a9b74 100644 --- a/tests/hwsim/hostapd.py +++ b/tests/hwsim/hostapd.py @@ -152,6 +152,21 @@ class Hostapd: return vals[field] return None + def get_driver_status(self): + res = self.request("STATUS-DRIVER") + lines = res.splitlines() + vals = dict() + for l in lines: + [name,value] = l.split('=', 1) + vals[name] = value + return vals + + def get_driver_status_field(self, field): + vals = self.get_driver_status() + if field in vals: + return vals[field] + return None + def mgmt_rx(self, timeout=5): ev = self.wait_event(["MGMT-RX"], timeout=timeout) if ev is None: