From: Larry Finger Date: Thu, 30 Oct 2014 04:17:13 +0000 (-0500) Subject: rtlwifi: rtl8192se: Fix firmware loading X-Git-Tag: MMI-PSA29.97-13-9~11126^2^2~19 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=75a916e1944fea8347d2245c62567187e4eff9dd;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Cc: Murilo Opsfelder Araujo Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/sw.c b/drivers/net/wireless/rtlwifi/rtl8192se/sw.c index 1fd22081149e..aadba29c167a 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 */