summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaja Mani2012-01-30 12:43:12 +0100
committerKalle Valo2012-01-30 20:22:55 +0100
commit3c411a434414f4320ce926bee3733e34ba0ea407 (patch)
tree272953df5a51fb4e152813667882cfe7c527f36b
parentath6kl: Wait for host sleep mode cmd processed event during WOW suspend (diff)
downloadkernel-qcow2-linux-3c411a434414f4320ce926bee3733e34ba0ea407.tar.gz
kernel-qcow2-linux-3c411a434414f4320ce926bee3733e34ba0ea407.tar.xz
kernel-qcow2-linux-3c411a434414f4320ce926bee3733e34ba0ea407.zip
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>
-rw-r--r--drivers/net/wireless/ath/ath6kl/cfg80211.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 1902e2fa1a68..5934e40ee55d 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -1916,7 +1916,7 @@ static int ath6kl_wow_suspend(struct ath6kl *ar, struct cfg80211_wowlan *wow)
return -EIO;
if (!test_bit(CONNECTED, &vif->flags))
- return -EINVAL;
+ return -ENOTCONN;
if (wow && (wow->n_patterns > WOW_MAX_FILTERS_PER_LIST))
return -EINVAL;