mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-03 17:51:57 +09:00
rtlwifi: Fix incorrect return from rtl_ps_enable_nic()
commit 2e8c5e56b3 upstream.
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>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0dba4d31d9
commit
f93503ede3
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user