Update network_WiFi_Prefer5Ghz test

This test have been failing occasionally due to the client connected
to the 2.4Ghz BSS instead of 5Ghz.

One the root cause is that the 5Ghz BSSID was already in wap_supplicant
blacklist (result from previous tests) when this test started, which
caused the client to prefer 2.4Ghz BSS. The other root cause is that
sometimes the devices would only discover the 2.4Ghz BSS from the initial
scan.

Fix both by clearing the wpa_supplicant blacklist in the beginning of the test,
and waiting until both 2.4Ghz and 5Ghz BSSes are discovered before initiating
the connection attempt.

BUG=chromium:417011
TEST=Run this test

Change-Id: I1a58f63c23799c154a852e6014cb2beb874db804
Reviewed-on: https://chromium-review.googlesource.com/219844
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Peter Qiu <zqiu@chromium.org>
Tested-by: Peter Qiu <zqiu@chromium.org>
2 files changed