Skip to content

Commit 278d206

Browse files
trond-snekvikmbolivar-nordic
authored andcommitted
[nrf fromtree] Bluetooth: Mesh: Don't reset PB ADV reliable timer on
...retransmit The send_reliable function was reused in multiple places as part of the k_delayed_work changes for Bluetooth Mesh in zephyrproject-rtos#33782. This function contains a line that resets the start timer, causing prov_retransmit to continously move the goal post for when to give up sending. Extract this line out of the send_reliable function, and put it along with the other link.tx initialization in bearer_ctl_send and prov_send_adv. (cherry picked from commit 85ad497) Signed-off-by: Trond Einar Snekvik <[email protected]> (cherry picked from commit 861adbe)
1 parent c54a36a commit 278d206

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

subsys/bluetooth/mesh/pb_adv.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -560,8 +560,6 @@ static void send_reliable(void)
560560
{
561561
int i;
562562

563-
link.tx.start = k_uptime_get();
564-
565563
for (i = 0; i < ARRAY_SIZE(link.tx.buf); i++) {
566564
struct net_buf *buf = link.tx.buf[i];
567565

@@ -642,6 +640,7 @@ static int bearer_ctl_send(uint8_t op, const void *data, uint8_t data_len,
642640
net_buf_add_mem(buf, data, data_len);
643641

644642
if (reliable) {
643+
link.tx.start = k_uptime_get();
645644
link.tx.buf[0] = buf;
646645
send_reliable();
647646
} else {
@@ -677,6 +676,7 @@ static int prov_send_adv(struct net_buf_simple *msg,
677676
link.tx.buf[0] = start;
678677
link.tx.cb = cb;
679678
link.tx.cb_data = cb_data;
679+
link.tx.start = k_uptime_get();
680680

681681
BT_DBG("xact_id: 0x%x len: %u", link.tx.id, msg->len);
682682

0 commit comments

Comments
 (0)