Skip to content

Commit

Permalink
rtlwifi: Fix incorrect return from rtl_ps_enable_nic()
Browse files Browse the repository at this point in the history
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>
Cc: Stable <stable@vger.kernel.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Olivier Langlois authored and John W. Linville committed Feb 13, 2014
1 parent f78bccd commit 2e8c5e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/rtlwifi/ps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 2e8c5e5

Please sign in to comment.