linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: Taehee Yoo <ap420073@gmail.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] rtlwifi: rtl8192c: Add init codes for "fw_version" and "fw_subversion".
Date: Sat, 06 Jun 2015 11:18:27 -0500	[thread overview]
Message-ID: <55731D53.2020808@lwfinger.net> (raw)
In-Reply-To: <1433588537-27853-1-git-send-email-ap420073@gmail.com>

On 06/06/2015 06:02 AM, Taehee Yoo wrote:
> 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 <ap420073@gmail.com>
> ---
>   drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c
> index 29983bc..9b5ce28 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c
> @@ -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



  reply	other threads:[~2015-06-06 16:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-06 11:02 [PATCH] rtlwifi: rtl8192c: Add init codes for "fw_version" and "fw_subversion" Taehee Yoo
2015-06-06 16:18 ` Larry Finger [this message]
2015-06-07 12:12   ` Taehee Yoo

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=55731D53.2020808@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=ap420073@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).