ath6kl: Return a proper error code when not in connected state

Error code ENOTCONN is more suitable than EINVAL to report
when the driver is not in connected state in ath6kl_wow_suspend().

I found this during code review.

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
This commit is contained in:
Raja Mani 2012-01-30 17:13:12 +05:30 committed by Kalle Valo
parent 081c7a84e9
commit 3c411a4344
1 changed files with 1 additions and 1 deletions

View File

@ -1916,7 +1916,7 @@ static int ath6kl_wow_suspend(struct ath6kl *ar, struct cfg80211_wowlan *wow)
return -EIO; return -EIO;
if (!test_bit(CONNECTED, &vif->flags)) if (!test_bit(CONNECTED, &vif->flags))
return -EINVAL; return -ENOTCONN;
if (wow && (wow->n_patterns > WOW_MAX_FILTERS_PER_LIST)) if (wow && (wow->n_patterns > WOW_MAX_FILTERS_PER_LIST))
return -EINVAL; return -EINVAL;