mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-11-02 18:42:47 +00:00
host/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 #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. This is port of 85ad497c39ecf6d12bea31241d774cf300d620c2
This commit is contained in:
committed by
Krzysztof Kopyściński
parent
275ea539a8
commit
e9567a6034
@@ -556,8 +556,6 @@ static void send_reliable(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
link.tx.start = k_uptime_get();
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(link.tx.buf); i++) {
|
||||
struct os_mbuf *buf = link.tx.buf[i];
|
||||
|
||||
@@ -638,6 +636,7 @@ static int bearer_ctl_send(uint8_t op, const void *data, uint8_t data_len,
|
||||
net_buf_add_mem(buf, data, data_len);
|
||||
|
||||
if (reliable) {
|
||||
link.tx.start = k_uptime_get();
|
||||
link.tx.buf[0] = buf;
|
||||
send_reliable();
|
||||
} else {
|
||||
@@ -673,6 +672,7 @@ static int prov_send_adv(struct os_mbuf *msg,
|
||||
link.tx.buf[0] = start;
|
||||
link.tx.cb = cb;
|
||||
link.tx.cb_data = cb_data;
|
||||
link.tx.start = k_uptime_get();
|
||||
|
||||
BT_DBG("xact_id: 0x%x len: %u", link.tx.id, msg->om_len);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user