Bluetooth: Clean up struct bt_conn

Fix alignment of rx_len, and move err & state to a better location to
minimize padding.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2017-07-04 22:03:58 +03:00 committed by Johan Hedberg
commit 259701149b

View file

@ -94,7 +94,12 @@ struct bt_conn {
u8_t encrypt;
#endif /* CONFIG_BLUETOOTH_SMP || CONFIG_BLUETOOTH_BREDR */
u16_t rx_len;
/* Connection error or reason for disconnect */
u8_t err;
bt_conn_state_t state;
u16_t rx_len;
struct net_buf *rx;
/* Sent but not acknowledged TX packets */
@ -110,11 +115,6 @@ struct bt_conn {
atomic_t ref;
/* Connection error or reason for disconnect */
u8_t err;
bt_conn_state_t state;
union {
struct bt_conn_le le;
#if defined(CONFIG_BLUETOOTH_BREDR)