Don't optimize scan frequencies if selected network has changed

When disconnecting from a BSS, the next scan is optimized to scan only
the channels used by the connected ESS. But when disconnecting because a
new network was selected, this optimization is wrong because
wpa_supplicant is now trying to connect to another ESS. Fix this by not
optimizing the scan frequencies in case the selected network has
changed.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
1 file changed