summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2014-10-30 04:17:13 (GMT)
committerJohn W. Linville <linville@tuxdriver.com>2014-10-30 19:00:23 (GMT)
commit75a916e1944fea8347d2245c62567187e4eff9dd (patch)
tree3f5d447f1f2b668f83e8ddd32a2f631eac40fb8c
parent8ae3c16e41b02db8ffe4121468519d6352baedc1 (diff)
downloadlinux-75a916e1944fea8347d2245c62567187e4eff9dd.tar.xz
rtlwifi: rtl8192se: Fix firmware loading
An error in the code makes the allocated space for firmware to be too small. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Murilo Opsfelder Araujo <mopsfelder@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192se/sw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/sw.c b/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
index 1fd2208..aadba29 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
@@ -209,8 +209,8 @@ static int rtl92s_init_sw_vars(struct ieee80211_hw *hw)
if (!rtlpriv->rtlhal.pfirmware)
return 1;
- rtlpriv->max_fw_size = RTL8190_MAX_RAW_FIRMWARE_CODE_SIZE;
-
+ rtlpriv->max_fw_size = RTL8190_MAX_FIRMWARE_CODE_SIZE*2 +
+ sizeof(struct fw_hdr);
pr_info("Driver for Realtek RTL8192SE/RTL8191SE\n"
"Loading firmware %s\n", rtlpriv->cfg->fw_name);
/* request fw */