Bluetooth: Mesh: Use network transmit count and interval for Friend

When sending PDUs from Friend to LPN we should adhere to the
configured network transmit count & interval to get better
reliability for the PDUs to be received by the LPN.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2017-11-10 10:11:34 +02:00 committed by Johan Hedberg
commit b644bad5c0

View file

@ -73,6 +73,7 @@ static void discard_buffer(void)
static struct net_buf *friend_buf_alloc(u16_t src)
{
u8_t xmit = bt_mesh_net_transmit_get();
struct net_buf *buf;
BT_DBG("src 0x%04x", src);
@ -80,7 +81,9 @@ static struct net_buf *friend_buf_alloc(u16_t src)
do {
buf = bt_mesh_adv_create_from_pool(&friend_buf_pool,
BT_MESH_ADV_DATA,
0, 0, K_NO_WAIT);
TRANSMIT_COUNT(xmit),
TRANSMIT_INT(xmit),
K_NO_WAIT);
if (!buf) {
discard_buffer();
}