diff options
| author | Liang Jie <liangjie@lixiang.com> | 2025-01-12 13:51:44 +0300 |
|---|---|---|
| committer | Ping-Ke Shih <pkshih@realtek.com> | 2025-01-20 04:27:25 +0300 |
| commit | 361cb056e2468be534f47c1a6745f96581a721e3 (patch) | |
| tree | 39ff907d22c4f1bec1b00735923990c930f52fa3 /tools/perf/scripts/python/netdev-times.py | |
| parent | dbb6a738f6cb55c542df286f028fb7d524f71077 (diff) | |
| download | linux-361cb056e2468be534f47c1a6745f96581a721e3.tar.xz | |
wifi: rtw89: Correct immediate cfg_len calculation for scan_offload_be
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>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20250112105144.615474-1-buaajxlj@163.com
Diffstat (limited to 'tools/perf/scripts/python/netdev-times.py')
0 files changed, 0 insertions, 0 deletions
