diff options
| author | Jeff Johnson <[email protected]> | 2023-12-17 13:29:03 +0200 |
|---|---|---|
| committer | Kalle Valo <[email protected]> | 2023-12-18 20:47:04 +0200 |
| commit | cb188e862c1ce195ce8beaac10b554c33847f4c8 (patch) | |
| tree | 65909f56add16682bb171351de0d9ec616233d4c /tools/perf/scripts/python/task-analyzer.py | |
| parent | b0c0794b05ec07a150bd39be3d43854a9dd93cad (diff) | |
wifi: ath10k: use flexible array in struct wmi_tdls_peer_capabilities
Currently struct wmi_tdls_peer_capabilities defines:
struct wmi_channel peer_chan_list[1];
Per the guidance in [1] this should be a flexible array, and at one
point Gustavo was trying to fix this [2], but had questions about the
correct behavior when the associated peer_chan_len is 0.
I have been unable to determine if firmware requires that at least one
record be present even if peer_chan_len is 0. But since that is the
current behavior, follow the example from [3] and replace the
one-element array with a union that contains both a flexible array and
a single instance of the array element. This results in a struct that
has the same footprint as the original, so no other driver changes are
required.
No functional changes, compile tested only.
[1] https://docs.kernel.org/process/deprecated.html#zero-length-and-one-element-arrays
[2] https://lore.kernel.org/linux-wireless/[email protected]/
[3] https://lore.kernel.org/linux-wireless/202308301529.AC90A9EF98@keescook/
Signed-off-by: Jeff Johnson <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Reviewed-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/20231213-wmi_host_mem_chunks_flexarray-v1-5-92922d92fa2c@quicinc.com
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions