iwd: Propogate invalid key on connection attempt failure

Currently all connection attempts are reported as
CONNMAN_NETWORK_ERROR_CONNECT_FAIL. When the user enters an wrong
passphrase the upper layers wont reset the passphrase unless
CONNMAN_NETWORK_ERROR_INVALID_KEY is reported. This prevents the user
to enter a new passphrase.

Unfortunately, when the passphrase is correct but the connect attempt
fails with 'Failed', ConnMan will reset the passphrase. But this
behavoir is way better then not being able to provide the correct
passphrase.

Reported-by: Maxime Roussin-BĂ©langer <maxime.roussinbelanger@gmail.com>
1 file changed