linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <rmani@qca.qualcomm.com>
To: <kvalo@qca.qualcomm.com>
Cc: <linux-wireless@vger.kernel.org>, <ath6kl-devel@qualcomm.com>,
	Raja Mani <rmani@qca.qualcomm.com>
Subject: [PATCH v3 4/4] ath6kl: Return a proper error code when not in connected state
Date: Mon, 30 Jan 2012 17:13:12 +0530	[thread overview]
Message-ID: <1327923792-16408-5-git-send-email-rmani@qca.qualcomm.com> (raw)
In-Reply-To: <1327923792-16408-1-git-send-email-rmani@qca.qualcomm.com>

From: Raja Mani <rmani@qca.qualcomm.com>

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>
---
 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 1902e2f..5934e40 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;
-- 
1.7.1


  parent reply	other threads:[~2012-01-30 11:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-30 11:43 [PATCH v3 0/4] Allow the user to define suspend mode rmani
2012-01-30 11:43 ` [PATCH v3 1/4] ath6kl: Re-architect suspend mode handling in ath6kl_sdio_suspend rmani
2012-01-30 11:43 ` [PATCH v3 2/4] ath6kl: Configure WOW patterns while going to wow_suspend rmani
2012-01-30 11:43 ` [PATCH v3 3/4] ath6kl: Wait for host sleep mode cmd processed event during WOW suspend rmani
2012-01-30 11:43 ` rmani [this message]
2012-01-30 19:37 ` [PATCH v3 0/4] Allow the user to define suspend mode Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1327923792-16408-5-git-send-email-rmani@qca.qualcomm.com \
    --to=rmani@qca.qualcomm.com \
    --cc=ath6kl-devel@qualcomm.com \
    --cc=kvalo@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).