rtlwifi: Fix fallback firmware loading
authorSven Joachim <svenjoac@gmx.de>
Mon, 31 Jul 2017 16:10:45 +0000 (18:10 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 3 Aug 2017 09:36:10 +0000 (12:36 +0300)
commit1d9b168d8ea9a0f51947d0e2f84856e77d2fe7ff
tree7751bf0b5c36333139889044da123aa6f936b040
parent9ddb378b237f0321ef0c25c407672591e4c86254
rtlwifi: Fix fallback firmware loading

Commit f70e4df2b384 ("rtlwifi: Add code to read new versions of
firmware") added code to load an old firmware file if the new one is
not available.  Unfortunately that code is never reached because
request_firmware_nowait() does not wait for the firmware to show up
and returns 0 even if the file is not there.

Use the existing fallback mechanism introduced by commit 62009b7f1279
("rtlwifi: rtl8192cu: Add new firmware") instead.

Fixes: f70e4df2b384 ("rtlwifi: Add code to read new versions of firmware")
Cc: stable@vger.kernel.org
Signed-off-by: Sven Joachim <svenjoac@gmx.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c