Netdev List
 help / color / mirror / Atom feed
From: Olivier Langlois <olivier@trillion01.com>
To: Larry.Finger@lwfinger.net, linville@tuxdriver.com,
	chaoming_li@realsil.com.cn
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	Olivier Langlois <olivier@trillion01.com>
Subject: [PATCH 2/2] retry hw init when it fails
Date: Fri, 31 Jan 2014 00:16:23 -0500	[thread overview]
Message-ID: <1391145383-18652-2-git-send-email-olivier@trillion01.com> (raw)
In-Reply-To: <1391145383-18652-1-git-send-email-olivier@trillion01.com>

rtl_ps_enable_nic() is called from loops that will loop until this function returns true or a
maximum number of retries is performed.

hw_init() returns non-zero on error. In that situation return false to
restore the original design intent to retry hw init when it fails.

Signed-off-by: Olivier Langlois <olivier@trillion01.com>
---
 drivers/net/wireless/rtlwifi/ps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/rtlwifi/ps.c b/drivers/net/wireless/rtlwifi/ps.c
index 0d81f76..a56e9b3 100644
--- a/drivers/net/wireless/rtlwifi/ps.c
+++ b/drivers/net/wireless/rtlwifi/ps.c
@@ -48,7 +48,7 @@ bool rtl_ps_enable_nic(struct ieee80211_hw *hw)
 
 	/*<2> Enable Adapter */
 	if (rtlpriv->cfg->ops->hw_init(hw))
-		return 1;
+		return false;
 	RT_CLEAR_PS_LEVEL(ppsc, RT_RF_OFF_LEVL_HALT_NIC);
 
 	/*<3> Enable Interrupt */
-- 
1.8.5.2

  reply	other threads:[~2014-01-31  5:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-31  5:16 [PATCH 1/2] rtl8192ce is disabling for too long the irqs Olivier Langlois
2014-01-31  5:16 ` Olivier Langlois [this message]
2014-01-31  5:29   ` [PATCH 2/2] retry hw init when it fails Greg KH
2014-01-31  6:39 ` [PATCH 1/2] rtl8192ce is disabling for too long the irqs Larry Finger

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=1391145383-18652-2-git-send-email-olivier@trillion01.com \
    --to=olivier@trillion01.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=chaoming_li@realsil.com.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=netdev@vger.kernel.org \
    --cc=stable@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