Lines Matching refs:tx

129 	} tx;  member
175 for (int i = 0; i < ARRAY_SIZE(link.tx.unacked); i++) { in send_unacked()
176 if (link.tx.unacked[i].adv != NULL) { in send_unacked()
180 link.tx.unacked[i].adv = adv; in send_unacked()
181 link.tx.unacked[i].cb = cb; in send_unacked()
182 link.tx.unacked[i].cb_data = cb_data; in send_unacked()
196 link.tx.next = 0; in send_reliable()
204 struct unacked_adv_ctx *unacked_adv = &link.tx.unacked[link.tx.last_unacked]; in delayed_adv_send_end()
236 for (i = 0; i < ARRAY_SIZE(link.tx.unacked); i++) { in tx_work_handler()
237 int idx = (i + link.tx.last_unacked) % ARRAY_SIZE(link.tx.unacked); in tx_work_handler()
238 struct unacked_adv_ctx *unacked = &link.tx.unacked[idx]; in tx_work_handler()
247 link.tx.last_unacked = idx; in tx_work_handler()
253 if (link.tx.next >= ARRAY_SIZE(link.tx.adv) || link.tx.adv[link.tx.next] == NULL) { in tx_work_handler()
259 bt_mesh_adv_send(link.tx.adv[link.tx.next], &delayed_adv_send_cb, (void *)false); in tx_work_handler()
261 link.tx.next++; in tx_work_handler()
263 if (link.tx.next == ARRAY_SIZE(link.tx.adv) || link.tx.adv[link.tx.next] == NULL) { in tx_work_handler()
266 k_work_reschedule(&link.tx.retransmit, RETRANSMIT_TIMEOUT); in tx_work_handler()
286 for (i = 0; i < ARRAY_SIZE(link.tx.adv); i++) { in free_segments()
287 struct bt_mesh_adv *adv = link.tx.adv[i]; in free_segments()
294 link.tx.adv[i] = NULL; in free_segments()
331 (void)k_work_cancel_delayable(&link.tx.retransmit); in prov_clear_tx()
350 (void)memset(&link, 0, offsetof(struct pb_adv, tx.retransmit)); in reset_adv_link()
363 link.tx.id = XACT_ID_NVAL; in reset_adv_link()
366 link.tx.pending_ack = XACT_ID_NVAL; in reset_adv_link()
397 LOG_DBG("xact 0x%x complete", (uint8_t)link.tx.pending_ack); in ack_complete()
456 if (pending && link.tx.pending_ack == xact_id) { in gen_prov_ack_send()
468 link.tx.pending_ack = xact_id; in gen_prov_ack_send()
485 if (link.tx.adv[0]) { in gen_prov_cont()
558 if (!link.tx.adv[0]) { in gen_prov_ack()
562 if (rx->xact_id == link.tx.id) { in gen_prov_ack()
568 if (link.tx.cb) { in gen_prov_ack()
569 link.tx.cb(0, link.tx.cb_data); in gen_prov_ack()
578 if (link.tx.adv[0]) { in gen_prov_start()
733 if (k_uptime_get() - link.tx.start > link.tx.timeout * MSEC_PER_SEC) { in prov_retransmit()
772 link.tx.start = k_uptime_get(); in bearer_ctl_send()
773 link.tx.adv[0] = adv; in bearer_ctl_send()
824 link.tx.id = next_transaction_id(link.tx.id); in prov_send_adv()
826 net_buf_simple_add_u8(&start->b, link.tx.id); in prov_send_adv()
832 link.tx.adv[0] = start; in prov_send_adv()
833 link.tx.cb = cb; in prov_send_adv()
834 link.tx.cb_data = cb_data; in prov_send_adv()
835 link.tx.start = k_uptime_get(); in prov_send_adv()
837 LOG_DBG("xact_id: 0x%x len: %u", link.tx.id, msg->len); in prov_send_adv()
846 if (seg_id >= ARRAY_SIZE(link.tx.adv)) { in prov_send_adv()
858 link.tx.adv[seg_id] = adv; in prov_send_adv()
865 net_buf_simple_add_u8(&adv->b, link.tx.id); in prov_send_adv()
943 link.tx.timeout = TRANSACTION_TIMEOUT; in link_ack()
1010 link.tx.id = XACT_ID_MAX; in prov_link_open()
1018 link.tx.timeout = timeout; in prov_link_open()
1040 link.tx.id = XACT_ID_NVAL; in prov_link_accept()
1043 link.tx.timeout = TRANSACTION_TIMEOUT; in prov_link_accept()
1066 link.tx.timeout = CLOSING_TIMEOUT; in prov_link_close()
1079 k_work_init_delayable(&link.tx.retransmit, prov_retransmit); in bt_mesh_pb_adv_init()