All of lore.kernel.org
 help / color / mirror / Atom feed
From: <pkshih@realtek.com>
To: <kvalo@codeaurora.org>
Cc: <yhchuang@realtek.com>, <Larry.Finger@lwfinger.net>,
	<johannes.berg@intel.com>, <linux-wireless@vger.kernel.org>
Subject: [PATCH 08/11] rtlwifi: rtl8723: Add error handling to no existing firmware
Date: Fri, 29 Dec 2017 16:31:09 +0800	[thread overview]
Message-ID: <20171229083112.31540-9-pkshih@realtek.com> (raw)
In-Reply-To: <20171229083112.31540-1-pkshih@realtek.com>

From: Ping-Ke Shih <pkshih@realtek.com>

Without firmware, driver wastes time to download and wait for MCU bootup,
and then kernel core dump finally. If request_firmware fails, the value
max_fw_size=0 is set, so we check the value before downloading firmware.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
 drivers/net/wireless/realtek/rtlwifi/rtl8723com/fw_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723com/fw_common.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723com/fw_common.c
index efa7e1262461..0d1ebc861720 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723com/fw_common.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723com/fw_common.c
@@ -196,7 +196,7 @@ int rtl8723_download_fw(struct ieee80211_hw *hw,
 	enum version_8723e version = rtlhal->version;
 	int max_page;
 
-	if (!rtlhal->pfirmware)
+	if (rtlpriv->max_fw_size == 0 || !rtlhal->pfirmware)
 		return 1;
 
 	pfwheader = (struct rtlwifi_firmware_header *)rtlhal->pfirmware;
-- 
2.14.1

  parent reply	other threads:[~2017-12-29  8:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-29  8:31 [PATCH 00/11] rtlwifi: change rtlwifi maintainer and merge commits from staging pkshih
2017-12-29  8:31 ` [PATCH 01/11] MAINTAINERS: Change maintainer for rtlwifi pkshih
2018-01-08 17:14   ` [01/11] " Kalle Valo
2017-12-29  8:31 ` [PATCH 02/11] rtlwifi: check for array overflow pkshih
2017-12-29  8:31 ` [PATCH 03/11] rtlwifi: fix parenthesis alignment pkshih
2017-12-29  8:31 ` [PATCH 04/11] rtlwifi: use kcalloc instead of multiply pkshih
2017-12-29  8:31 ` [PATCH 05/11] rtlwifi: Remove unnecessary 'out of memory' message pkshih
2017-12-29  8:31 ` [PATCH 06/11] rtlwifi: mark expected switch fall-through in rtl_make_smps_action pkshih
2017-12-29  8:31 ` [PATCH 07/11] rtlwifi: Remove unnecessary parentheses pkshih
2017-12-29  8:31 ` pkshih [this message]
2017-12-29  8:31 ` [PATCH 09/11] rtlwifi: Improve debugging by using debugfs pkshih
2017-12-29  8:31 ` [PATCH 10/11] rtlwifi: btcoex: Use seq_file to dump btcoex status pkshih
2017-12-29  8:31 ` [PATCH 11/11] rtlwifi: fill FW version and subversion pkshih

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=20171229083112.31540-9-pkshih@realtek.com \
    --to=pkshih@realtek.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=johannes.berg@intel.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=yhchuang@realtek.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.