rtlwifi: Fix fallback firmware loading
authorSven Joachim <svenjoac@gmx.de>
Mon, 31 Jul 2017 16:10:45 +0000 (18:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 Sep 2017 15:39:28 +0000 (17:39 +0200)
commit4870e16678182556aacf30368b1f54be0144859f
treefc175d794f4b23429a1c3e9148d225508ed7f4ff
parentcf37a1b981476f98b55ada2a6f4684f0dd74b5af
rtlwifi: Fix fallback firmware loading

commit 1d9b168d8ea9a0f51947d0e2f84856e77d2fe7ff upstream.

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")
Signed-off-by: Sven Joachim <svenjoac@gmx.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c