Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e21d364f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "net: rmnet_data: Use standard endianness macros in structs"

parents 452f53c2 1bc3627b
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -2,15 +2,17 @@
#define _NET_MAP_H_

struct rmnet_map_header_s {
#ifndef RMNET_USE_BIG_ENDIAN_STRUCTS
#if defined(__LITTLE_ENDIAN_BITFIELD)
	uint8_t  pad_len:6;
	uint8_t  reserved_bit:1;
	uint8_t  cd_bit:1;
#else
#elif defined(__BIG_ENDIAN_BITFIELD)
	uint8_t  cd_bit:1;
	uint8_t  reserved_bit:1;
	uint8_t  pad_len:6;
#endif /* RMNET_USE_BIG_ENDIAN_STRUCTS */
#else
#error "Please fix <asm/byteorder.h>"
#endif
	uint8_t  mux_id;
	uint16_t pkt_len;
}  __aligned(1);
+10 −6
Original line number Diff line number Diff line
@@ -19,25 +19,29 @@

struct rmnet_map_control_command_s {
	uint8_t command_name;
#ifndef RMNET_USE_BIG_ENDIAN_STRUCTS
#if defined(__LITTLE_ENDIAN_BITFIELD)
	uint8_t  cmd_type:2;
	uint8_t  reserved:6;
#else
#elif defined(__BIG_ENDIAN_BITFIELD)
	uint8_t  reserved:6;
	uint8_t  cmd_type:2;
#endif /* RMNET_USE_BIG_ENDIAN_STRUCTS */
#else
#error "Please fix <asm/byteorder.h>"
#endif
	uint16_t reserved2;
	uint32_t   transaction_id;
	union {
		uint8_t  data[65528];
		struct {
#ifndef RMNET_USE_BIG_ENDIAN_STRUCTS
#if defined(__LITTLE_ENDIAN_BITFIELD)
			uint16_t  ip_family:2;
			uint16_t  reserved:14;
#else
#elif defined(__BIG_ENDIAN_BITFIELD)
			uint16_t  reserved:14;
			uint16_t  ip_family:2;
#endif /* RMNET_USE_BIG_ENDIAN_STRUCTS */
#else
#error "Please fix <asm/byteorder.h>"
#endif
			uint16_t  flow_control_seq_num;
			uint32_t  qos_id;
		} flow_control;