tests: Remove all P2P networks in call to reset
authorBen Rosenfeld <ben.rosenfeld@intel.com>
Tue, 5 May 2015 09:36:54 +0000 (12:36 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 7 May 2015 18:14:31 +0000 (21:14 +0300)
When resetting a device, remove all the P2P networks to prevent
unexpected behavior in following tests. This is needed for the case
where P2P Device interface is used.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
tests/hwsim/wpasupplicant.py

index 53df039..1cdcc09 100644 (file)
@@ -119,6 +119,7 @@ class WpaSupplicant:
         res = self.request("FLUSH")
         if not "OK" in res:
             logger.info("FLUSH to " + self.ifname + " failed: " + res)
+        self.global_request("REMOVE_NETWORK all")
         self.request("SET p2p_add_cli_chan 0")
         self.request("SET p2p_no_go_freq ")
         self.request("SET p2p_pref_chan ")