Return-path: Received: from wolverine01.qualcomm.com ([199.106.114.254]:6969 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753146Ab2ATNhW (ORCPT ); Fri, 20 Jan 2012 08:37:22 -0500 From: To: CC: , , Raja Mani Subject: [PATCH v2 6/8] ath6kl: Return a proper error code when not in connected state Date: Fri, 20 Jan 2012 19:05:42 +0530 Message-ID: <1327066544-23779-7-git-send-email-rmani@qca.qualcomm.com> (sfid-20120120_143726_216275_241D8B97) In-Reply-To: <1327066544-23779-1-git-send-email-rmani@qca.qualcomm.com> References: <1327066544-23779-1-git-send-email-rmani@qca.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-wireless-owner@vger.kernel.org List-ID: From: Raja Mani Error code ENOTCONN is more suitable than EINVAL to report when the driver is not in connected state in ath6kl_wow_suspend(). Signed-off-by: Raja Mani --- drivers/net/wireless/ath/ath6kl/cfg80211.c | 2 +- 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 5d7aabe..038d63b 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -1919,7 +1919,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; -- 1.7.1