rtlwifi: rtl8192c: Add init codes for "fw_version" and "fw_subversion".
PATCH 1/1 rtlwifi: rtl8192c: Add init codes for "fw_version" and "fw_subversion".
The variable "fw_version" is used in the _ResetDigitalProcedure1(). but It is not initialized. so I add init codes for "fw_version" and "fw_subversion".
--- drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c +2 -0
@@ -233,6 +233,8 @@ int rtl92c_download_fw(struct ieee80211_hw *hw) pfwheader = (struct rtl92c_firmware_header *)rtlhal->pfirmware; pfwdata = (u8 *)rtlhal->pfirmware; fwsize = rtlhal->fwsize; + rtlhal->fw_version = pfwheader->version; + rtlhal->fw_subversion = pfwheader->subversion;if (IS_FW_HEADER_EXIST (pfwheader)) { RT_TRACE(rtlpriv, COMP_FW, DBG_DMESG,
Signature · 1 line
2.1.4
Quoted 14 lines · Taehee Yoo
The variable "
fw_version" is used in the_ResetDigitalProcedure1(). but It is not initialized. so I add init codes for "fw_version" and "fw_subversion".Signed-off-by Taehee Yoo <[email protected]>--- drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c | 2 ++ 1 file changed, 2 insertions(+)drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c +0
-0
drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c int rtl92c_download_fw(struct ieee80211_hw *hw) · line 240
Quoted 8 lines
drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c +2
-0@@ -233,6 +233,8 @@ int rtl92c_download_fw(struct ieee80211_hw *hw) pfwheader = (struct rtl92c_firmware_header *)rtlhal->pfirmware; pfwdata = (u8 *)rtlhal->pfirmware; fwsize = rtlhal->fwsize; + rtlhal->fw_version = pfwheader->version; + rtlhal->fw_subversion = pfwheader->subversion;if (IS_FW_HEADER_EXIST (pfwheader)) { RT_TRACE(rtlpriv, COMP_FW, DBG_DMESG,
This patch is not correct. If the firmware does not have a header, then you will be changing fw_version and fw_subversion to random bytes from the body of the firmware. At present, they are initialized to zero as part of the rtl_priv struct. You need to move the two new statements inside the IS_FW_HEADER_EXIST test, but before pfwdata is adjusted to remove the header.
Larry
2015-06-07 1:18 GMT+09:00 Larry Finger <[email protected]>:
Quoted 34 lines · Taehee Yoo
Quoted 16 lines
The variable "
fw_version" is used in the_ResetDigitalProcedure1(). but It is not initialized. so I add init codes for "fw_version" and "fw_subversion".Signed-off-by Taehee Yoo <[email protected]>--- drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c | 2 ++ 1 file changed, 2 insertions(+)drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c +0
-0drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c int rtl92c_download_fw(struct ieee80211_hw *hw) · line 240
Quoted 8 lines
drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c +2
-0@@ -233,6 +233,8 @@ int rtl92c_download_fw(struct ieee80211_hw *hw) pfwheader = (struct rtl92c_firmware_header *)rtlhal->pfirmware; pfwdata = (u8 *)rtlhal->pfirmware; fwsize = rtlhal->fwsize; + rtlhal->fw_version = pfwheader->version; + rtlhal->fw_subversion = pfwheader->subversion;if (IS_FW_HEADER_EXIST (pfwheader)) { RT_TRACE(rtlpriv, COMP_FW, DBG_DMESG,This patch is not correct. If the firmware does not have a header, then you will be changing
fw_versionandfw_subversionto random bytes from the body of the firmware. At present, they are initialized to zero as part of thertl_privstruct. You need to move the two new statements inside theIS_FW_HEADER_EXISTtest, but before pfwdata is adjusted to remove the header.
Quoted 3 lines
Larry
Thank you for your review!
I will resend a patch as V2.