Commit 779bb67e authored by Johannes Berg's avatar Johannes Berg Committed by Carlos Llamas
Browse files

BACKPORT: wifi: cfg80211: allow cfg80211_defragment_element() without output



If we just want to determine the length of the fragmented
data, we basically need the same logic, and really we want
it to be _literally_ the same logic, so it cannot be out
of sync in any way.

Allow calling cfg80211_defragment_element() without an output
buffer, where it then just returns the required output size.

Also add this to the tests, just to exercise it, using the
pre-calculated length to really do the defragmentation, which
checks that this is sufficient.

Reviewed-by: default avatarMiriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
Reviewed-by: default avatarBenjamin Berg <benjamin.berg@intel.com>
Link: https://msgid.link/20240228095718.6d6565b9e3f2.Ib441903f4b8644ba04b1c766f90580ee6f54fc66@changeid


Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>

Bug: 338806915
Change-Id: Id3f8d6379a468e06dc615705d8cc11944acccdde
(cherry picked from commit 8ade3356)
[vjakkam: skip net/wireless/tests/fragmentation.c file changes as the
file is not present]
Signed-off-by: default avatarVeerendranath Jakkam <quic_vjakkam@quicinc.com>
parent cbee6ec0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment