Files
Richard Yu 06a24e6a21 ieee1905_transport: send_packet_to_network_interface: fix potential endian/bit-field issues in VLAN TCI
Fix a bug where the VLAN ID observed on the wire did not match the
configured Primary VLAN ID. The root cause was applying htons() to a
12-bit bit-field, combined with compiler- and architecture-dependent
bit-field layout.

Changes:
- Replace the TCI bit-field with a plain 16-bit field.
- Add build_tci() to assemble PCP/DEI/VID with bitwise ops.
- Apply htons() once to the full 16-bit TCI after composition.

This removes endianness ambiguity and bit-field layout dependency,
ensuring the VLAN ID is encoded consistently across toolchains and
platforms when tagging IEEE 1905 multicast packets.

https://prplfoundationcloud.atlassian.net/browse/PPM-3509

Signed-off-by: Richard Yu <richard.yu@mitrastar.com.tw>
2025-09-29 11:28:52 +03:00
..