This is an automated email from the ASF dual-hosted git repository. andk pushed a commit to branch new-master in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit e99920f59e5836ab75cd95fa8f71e938ebcfc368 Author: MichaĆ Narajowski <michal.narajow...@codecoup.pl> AuthorDate: Wed Feb 21 12:56:20 2018 +0100 mesh: Use a single transmission from Friend to LPN As per TSE 10009 the TS will enforce that a Friend ever only uses a single transmission when sending packets to an LPN. Make sure that our implementation follows this. https://www.bluetooth.org/tse/errata_view.cfm?errata_id=10009 X-Original-Commit: 564a956d1a3b291234dc1351f422830b781689f1 --- nimble/host/mesh/src/friend.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/nimble/host/mesh/src/friend.c b/nimble/host/mesh/src/friend.c index 9969737..42c9384 100644 --- a/nimble/host/mesh/src/friend.c +++ b/nimble/host/mesh/src/friend.c @@ -44,6 +44,12 @@ static struct os_mempool friend_buf_mempool; #define FRIEND_ADV(buf) CONTAINER_OF(BT_MESH_ADV(buf), \ struct friend_adv, adv) +/* PDUs from Friend to the LPN should only be transmitted once with the + * smallest possible interval (20ms). + */ +#define FRIEND_XMIT_COUNT 0 +#define FRIEND_XMIT_INT 20 + struct friend_pdu_info { u16_t src; u16_t dst; @@ -87,15 +93,13 @@ static void discard_buffer(void) static struct os_mbuf *friend_buf_alloc(u16_t src) { - u8_t xmit = bt_mesh_net_transmit_get(); struct os_mbuf *buf; do { buf = bt_mesh_adv_create_from_pool(&friend_os_mbuf_pool, adv_alloc, BT_MESH_ADV_DATA, - BT_MESH_TRANSMIT_COUNT(xmit), - BT_MESH_TRANSMIT_INT(xmit), - K_NO_WAIT); + FRIEND_XMIT_COUNT, + FRIEND_XMIT_INT, K_NO_WAIT); if (!buf) { discard_buffer(); } -- To stop receiving notification emails like this one, please contact a...@apache.org.