wifi: only request new secrets during the initial connection
Don't automatically request new secrets just because previous attempts to connect failed, since this could be due to many other things than bad secrets. Only request new secrets if the caller of handle_auth_or_fail() specifically wants them. Next, if the supplicant fails the initial association attempt with an encrypted AP, only ask for new secrets if this is the first time we're trying to connect to this network. Otherwise we assume the secrets good; if they aren't, the user should change them through a configuration editor. These changes should dramatically cut down the number of unwanted secrets requests due to random driver failures, weak AP signal strength, or out-of-range APs.
Showing with 13 additions and 5 deletions