Skip to content
Commit ca6d552b authored by Florian Grandel's avatar Florian Grandel Committed by Carles Cufí
Browse files

net: l2: ieee802154: fix payload handling



The current implicit MAC payload length algorithm (based on
an otherwise irrelevant footer pointer) produces invalid
(non-standard) values for beacon and command frames.

This change produces standard-conforming MAC payload length
values and simplifies access to payload length.

It would have been possible to fix the current footer pointer
based approach but there are arguments in favor of the new
approach:
- The footer pointer is used nowhere in the current code
  base and makes length calculations rather non-obvious.
- The new approach does not use more memory and is easier
  to understand and use.
- This change is a first step to support of IEEE 802.15.4
  information element (IE) support. At a later stage the
  distinction between MAC payload length and frame payload
  length will be introduced and become relevant to
  distinguish between header and payload IEs. At that point
  the current implicit length calculation algorithm will
  break down anyways.

Signed-off-by: default avatarFlorian Grandel <fgrandel@code-for-humans.de>
parent 988ffe9c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment