Lines Matching full:tx

790 int bt_mesh_net_encode(struct bt_mesh_net_tx *tx, struct os_mbuf *buf,  in bt_mesh_net_encode()  argument
793 const bool ctl = (tx->ctx->app_idx == BT_MESH_KEY_UNUSED); in bt_mesh_net_encode()
809 tx->src, tx->ctx->addr, ctl, bt_mesh.seq); in bt_mesh_net_encode()
811 net_buf_simple_push_be16(buf, tx->ctx->addr); in bt_mesh_net_encode()
812 net_buf_simple_push_be16(buf, tx->src); in bt_mesh_net_encode()
821 net_buf_simple_push_u8(buf, tx->ctx->send_ttl | 0x80); in bt_mesh_net_encode()
823 net_buf_simple_push_u8(buf, tx->ctx->send_ttl); in bt_mesh_net_encode()
826 if (IS_ENABLED(CONFIG_BT_MESH_LOW_POWER) && tx->friend_cred) { in bt_mesh_net_encode()
827 if (friend_cred_get(tx->sub, BT_MESH_ADDR_UNASSIGNED, in bt_mesh_net_encode()
831 tx->friend_cred = 0; in bt_mesh_net_encode()
833 nid = tx->sub->keys[tx->sub->kr_flag].nid; in bt_mesh_net_encode()
834 enc = tx->sub->keys[tx->sub->kr_flag].enc; in bt_mesh_net_encode()
835 priv = tx->sub->keys[tx->sub->kr_flag].privacy; in bt_mesh_net_encode()
838 tx->friend_cred = 0; in bt_mesh_net_encode()
839 nid = tx->sub->keys[tx->sub->kr_flag].nid; in bt_mesh_net_encode()
840 enc = tx->sub->keys[tx->sub->kr_flag].enc; in bt_mesh_net_encode()
841 priv = tx->sub->keys[tx->sub->kr_flag].privacy; in bt_mesh_net_encode()
854 int bt_mesh_net_send(struct bt_mesh_net_tx *tx, struct os_mbuf *buf, in bt_mesh_net_send() argument
860 tx->src, tx->ctx->addr, buf->om_len, net_buf_headroom(buf), in bt_mesh_net_send()
865 if (tx->ctx->send_ttl == BT_MESH_TTL_DEFAULT) { in bt_mesh_net_send()
866 tx->ctx->send_ttl = bt_mesh_default_ttl_get(); in bt_mesh_net_send()
869 err = bt_mesh_net_encode(tx, buf, false); in bt_mesh_net_send()
882 tx->ctx->send_ttl != 1) { in bt_mesh_net_send()
883 if (bt_mesh_proxy_relay(buf, tx->ctx->addr) && in bt_mesh_net_send()
884 BT_MESH_ADDR_IS_UNICAST(tx->ctx->addr)) { in bt_mesh_net_send()
904 if (bt_mesh_fixed_group_match(tx->ctx->addr) || in bt_mesh_net_send()
905 bt_mesh_elem_find(tx->ctx->addr)) { in bt_mesh_net_send()
914 } else if (tx->ctx->send_ttl != 1) { in bt_mesh_net_send()
1198 * the normal TX IVI (which may be different) since the transport in bt_mesh_net_relay()