public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: Liang Jie <buaajxlj@163.com>
Cc: "kvalo@kernel.org" <kvalo@kernel.org>,
	Bernie Huang <phhuang@realtek.com>,
	"fanggeng@lixiang.com" <fanggeng@lixiang.com>,
	"yangchen11@lixiang.com" <yangchen11@lixiang.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Liang Jie <liangjie@lixiang.com>
Subject: RE: [PATCH v3] wifi: rtw89: Correct immediate cfg_len calculation for scan_offload_be
Date: Thu, 9 Jan 2025 02:35:12 +0000	[thread overview]
Message-ID: <8aded74b33d1471fa822a2c599545775@realtek.com> (raw)
In-Reply-To: <20250109022557.1143215-1-buaajxlj@163.com>

Liang Jie <buaajxlj@163.com> wrote:
> From: Liang Jie <liangjie@lixiang.com>
> 
> Ensures the correct calculation of `cfg_len` prior to the allocation of
> the skb in the `rtw89_fw_h2c_scan_offload_be` function, particularly when
> the `SCAN_OFFLOAD_BE_V0` firmware feature is enabled. It addresses an
> issue where an incorrect skb size might be allocated due to a delayed
> setting of `cfg_len`, potentially leading to memory inefficiencies.
> 
> By moving the conditional check and assignment of `cfg_len` before skb
> allocation, the patch guarantees that `len`, which depends on `cfg_len`,
> is accurately computed, ensuring proper skb size and preventing any
> unnecessary memory reservation for firmware operations not supporting
> beyond the `w8` member of the command data structure.
> 
> This correction helps to optimize memory usage and maintain consistent
> behavior across different firmware versions.
> 
> Fixes: 6ca6b918f280 ("wifi: rtw89: 8922a: Add new fields for scan offload H2C command")
> Signed-off-by: Liang Jie <liangjie@lixiang.com>

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


  reply	other threads:[~2025-01-09  2:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-09  2:25 [PATCH v3] wifi: rtw89: Correct immediate cfg_len calculation for scan_offload_be Liang Jie
2025-01-09  2:35 ` Ping-Ke Shih [this message]
2025-01-12  1:50 ` Ping-Ke Shih

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=8aded74b33d1471fa822a2c599545775@realtek.com \
    --to=pkshih@realtek.com \
    --cc=buaajxlj@163.com \
    --cc=fanggeng@lixiang.com \
    --cc=kvalo@kernel.org \
    --cc=liangjie@lixiang.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=phhuang@realtek.com \
    --cc=yangchen11@lixiang.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox