Define a new rmnet_map_v5_csum_header structure type. It will be used for inline checksum offload, supported with version 5 of the QMAP protocol.
Signed-off-by: Alex Elder <el...@linaro.org> --- include/linux/if_rmnet.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/include/linux/if_rmnet.h b/include/linux/if_rmnet.h index 9661416a9bb47..0fdda0e6e9963 100644 --- a/include/linux/if_rmnet.h +++ b/include/linux/if_rmnet.h @@ -52,4 +52,34 @@ struct rmnet_map_ul_csum_header { #endif } __aligned(1); + +/* Values for the header_type field of struct rmnet_map_v5_csum_header */ +enum rmnet_map_v5_header_type { + RMNET_MAP_HEADER_TYPE_UNKNOWN = 0x0, + RMNET_MAP_HEADER_TYPE_COALESCING = 0x1, + RMNET_MAP_HEADER_TYPE_CSUM_OFFLOAD = 0x2, +}; + +/* QMAP v5 checksum offload header */ +struct rmnet_map_v5_csum_header { +#if defined(__LITTLE_ENDIAN_BITFIELD) + u8 next_hdr:1; + u8 header_type:7; + + u8 hw_reserved:5; + u8 priority:1; + u8 hw_reserved_bit:1; + u8 csum_valid_required:1; +#elif defined(__BIG_ENDIAN_BITFIELD) + u8 header_type:7; + u8 next_hdr:1; + + u8 csum_valid_required:1; + u8 hw_reserved_bit:1; + u8 priority:1; + u8 hw_reserved:5; +#endif + __be16 reserved; +}; + #endif /* !(_LINUX_IF_RMNET_H_) */ -- 2.20.1