Skip to content
Permalink
Browse files

Bluetooth: Change from bitfields to normal types

Since the bt_mesh_msg_ctx struct no longer has a size that is a
multiple of 2, the bitfields might as well be made to normal types
as this will minimize the code generated to access them.

Signed-off-by: Tobias Svehagen <tobias.svehagen@gmail.com>
  • Loading branch information...
tsvehagen authored and jhedberg committed Jun 11, 2019
1 parent 4866fa9 commit 1c84d7c5ebca5320c2fe202420a3b5cdf925b162
Showing with 3 additions and 3 deletions.
  1. +2 −2 include/bluetooth/mesh/access.h
  2. +1 −1 subsys/bluetooth/host/mesh/transport.c
@@ -141,10 +141,10 @@ struct bt_mesh_msg_ctx {
s8_t recv_rssi;

/** Received TTL value. Not used for sending. */
u8_t recv_ttl:7;
u8_t recv_ttl;

/** Force sending reliably by using segment acknowledgement */
u8_t send_rel:1;
bool send_rel;

/** TTL, or BT_MESH_TTL_DEFAULT for default TTL. */
u8_t send_ttl;
@@ -455,7 +455,7 @@ int bt_mesh_trans_send(struct bt_mesh_net_tx *tx, struct net_buf_simple *msg,
}

if (msg->len > 11) {
tx->ctx->send_rel = 1U;
tx->ctx->send_rel = true;
}

BT_DBG("net_idx 0x%04x app_idx 0x%04x dst 0x%04x", tx->sub->net_idx,

0 comments on commit 1c84d7c

Please sign in to comment.
You can’t perform that action at this time.