diff options
| author | Masashi Honma <masashi.honma@gmail.com> | 2026-05-30 02:09:43 +0300 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2026-06-03 15:07:06 +0300 |
| commit | 4ac20bd40b7db8568aea5ba1d390241842e41ed8 (patch) | |
| tree | f107b3644d03d70f2a1726035d99773e2209159b /include/linux/memory_hotplug.h | |
| parent | f9ad6c160224a871e9437363709c1ba6e8604359 (diff) | |
| download | linux-4ac20bd40b7db8568aea5ba1d390241842e41ed8.tar.xz | |
wifi: mac80211: Use struct instead of macro for PREQ frame
The existing PREQ_IE_* macros access HWMP PREQ frame fields via hardcoded
byte offsets. When the AE (Address Extension) flag is set, an additional
6 bytes appear mid-frame, and the macros handle this with conditional
arithmetic (e.g., AE_F_SET(x) ? x + N+6 : x + N). This approach
obscures the frame layout and is prone to miscalculation.
Introduce typed packed C structs to represent the PREQ frame layout:
- ieee80211_mesh_hwmp_preq_top: fixed fields before the optional AE
address
- ieee80211_mesh_hwmp_preq_bottom: fields after the optional AE address
- ieee80211_mesh_hwmp_preq_target: per-target fields
Add ieee80211_mesh_hwmp_preq_get_bottom() to locate the bottom struct
correctly based on whether the AE flag is set.
This preparatory refactoring is needed to fix a 2-byte overread of
target_addr in hwmp_preq_frame_process() when AE is enabled, which is
addressed in a subsequent patch.
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
Link: https://patch.msgid.link/20260529230952.124754-1-masashi.honma@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/linux/memory_hotplug.h')
0 files changed, 0 insertions, 0 deletions
