Lines Matching refs:net_rx

1237 static struct seg_rx *seg_rx_find(struct bt_mesh_net_rx *net_rx,  in seg_rx_find()  argument
1245 if (rx->src != net_rx->ctx.addr || in seg_rx_find()
1246 rx->dst != net_rx->ctx.recv_dst) { in seg_rx_find()
1258 LOG_WRN("Duplicate SDU from src 0x%04x", net_rx->ctx.addr); in seg_rx_find()
1273 static bool seg_rx_is_valid(struct seg_rx *rx, struct bt_mesh_net_rx *net_rx, in seg_rx_is_valid() argument
1281 if (rx->src != net_rx->ctx.addr || rx->dst != net_rx->ctx.recv_dst) { in seg_rx_is_valid()
1286 if (rx->ctl != net_rx->ctl) { in seg_rx_is_valid()
1294 static struct seg_rx *seg_rx_alloc(struct bt_mesh_net_rx *net_rx, in seg_rx_alloc() argument
1316 rx->sub = net_rx->sub; in seg_rx_alloc()
1317 rx->ctl = net_rx->ctl; in seg_rx_alloc()
1321 rx->ttl = net_rx->ctx.send_ttl; in seg_rx_alloc()
1322 rx->src = net_rx->ctx.addr; in seg_rx_alloc()
1323 rx->dst = net_rx->ctx.recv_dst; in seg_rx_alloc()
1334 static int trans_seg(struct net_buf_simple *buf, struct bt_mesh_net_rx *net_rx, in trans_seg() argument
1352 if (bt_mesh_rpl_check(net_rx, &rpl, false)) { in trans_seg()
1353 LOG_WRN("Replay: src 0x%04x dst 0x%04x seq 0x%06x", net_rx->ctx.addr, in trans_seg()
1354 net_rx->ctx.recv_dst, net_rx->seq); in trans_seg()
1389 *seq_auth = SEQ_AUTH(BT_MESH_NET_IVI_RX(net_rx), in trans_seg()
1390 (net_rx->seq - in trans_seg()
1391 ((((net_rx->seq & BIT_MASK(14)) - seq_zero)) & in trans_seg()
1397 rx = seg_rx_find(net_rx, seq_auth); in trans_seg()
1405 if (!seg_rx_is_valid(rx, net_rx, hdr, seg_n)) { in trans_seg()
1424 send_ack(net_rx->sub, net_rx->ctx.recv_dst, in trans_seg()
1425 net_rx->ctx.addr, net_rx->ctx.send_ttl, in trans_seg()
1431 bt_mesh_rpl_update(rpl, net_rx); in trans_seg()
1446 if (!sdu_len_is_ok(net_rx->ctl, seg_n)) { in trans_seg()
1448 send_ack(net_rx->sub, net_rx->ctx.recv_dst, net_rx->ctx.addr, in trans_seg()
1449 net_rx->ctx.send_ttl, seq_auth, 0, in trans_seg()
1450 net_rx->friend_match); in trans_seg()
1458 net_rx->friend_match && !net_rx->local_match && in trans_seg()
1459 !bt_mesh_friend_queue_has_space(net_rx->sub->net_idx, in trans_seg()
1460 net_rx->ctx.addr, in trans_seg()
1461 net_rx->ctx.recv_dst, seq_auth, in trans_seg()
1464 send_ack(net_rx->sub, net_rx->ctx.recv_dst, net_rx->ctx.addr, in trans_seg()
1465 net_rx->ctx.send_ttl, seq_auth, 0, in trans_seg()
1466 net_rx->friend_match); in trans_seg()
1487 (!rpl->old_iv || net_rx->old_iv)) { in trans_seg()
1493 rx = seg_rx_alloc(net_rx, hdr, seq_auth, seg_n); in trans_seg()
1503 rx->obo = net_rx->friend_match; in trans_seg()
1522 send_ack(net_rx->sub, net_rx->ctx.recv_dst, in trans_seg()
1523 net_rx->ctx.addr, net_rx->ctx.send_ttl, in trans_seg()
1572 send_ack(net_rx->sub, net_rx->ctx.recv_dst, net_rx->ctx.addr, in trans_seg()
1573 net_rx->ctx.send_ttl, seq_auth, rx->block, rx->obo); in trans_seg()
1576 if (net_rx->ctl) { in trans_seg()
1579 err = ctl_recv(net_rx, *hdr, &sdu, seq_auth); in trans_seg()
1595 err = sdu_recv(net_rx, *hdr, ASZMIC(hdr), &seg_buf, &sdu, rx); in trans_seg()
1600 bt_mesh_rpl_update(rpl, net_rx); in trans_seg()