mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/ble_mesh_pb_adv_compile_error' into 'master'
fix(ble_mesh): Fix compiling error when PB-ADV is disabled Closes IDFGH-12147 See merge request espressif/esp-idf!29126
This commit is contained in:
commit
6790a5f79f
@ -141,6 +141,11 @@ bool bt_mesh_prov_pdu_check(uint8_t type, uint16_t length, uint8_t *reason)
|
||||
#define XACT_SEG_DATA(link, _seg) (&link->rx.buf->data[20 + (((_seg) - 1) * 23)])
|
||||
#define XACT_SEG_RECV(link, _seg) (link->rx.seg &= ~(1 << (_seg)))
|
||||
|
||||
static uint8_t bt_mesh_prov_buf_type_get(struct net_buf_simple *buf)
|
||||
{
|
||||
return buf->data[PROV_BUF_HEADROOM];
|
||||
}
|
||||
|
||||
uint8_t node_next_xact_id(struct bt_mesh_prov_link *link)
|
||||
{
|
||||
if (link->tx.id != 0 && link->tx.id != 0xFF) {
|
||||
@ -677,6 +682,13 @@ int bt_mesh_prov_send(struct bt_mesh_prov_link *link, struct net_buf_simple *buf
|
||||
#endif /* CONFIG_BLE_MESH_PB_GATT */
|
||||
|
||||
#if CONFIG_BLE_MESH_PB_ADV
|
||||
if (bt_mesh_prov_buf_type_get(buf) == PROV_FAILED) {
|
||||
/* For case MESH/NODE/PROV/BV-10-C, Node must send Transaction
|
||||
* ACK before Provisioning Failed message is transmitted.
|
||||
*/
|
||||
bt_mesh_gen_prov_ack_send(link, link->rx.id);
|
||||
}
|
||||
|
||||
return bt_mesh_prov_send_adv(link, buf);
|
||||
#endif /* CONFIG_BLE_MESH_PB_ADV */
|
||||
|
||||
|
@ -179,12 +179,6 @@ static void prov_send_fail_msg(uint8_t err)
|
||||
{
|
||||
PROV_BUF(buf, 2);
|
||||
|
||||
/**
|
||||
* For the case MESH/NODE/PROV/BV-10-C, Node must send Transaction ACK
|
||||
* before Provisioning Failed message is transmitted.
|
||||
*/
|
||||
bt_mesh_gen_prov_ack_send(&prov_link, prov_link.rx.id);
|
||||
|
||||
bt_mesh_prov_buf_init(&buf, PROV_FAILED);
|
||||
net_buf_simple_add_u8(&buf, err);
|
||||
|
||||
|
@ -1311,13 +1311,13 @@ void bt_mesh_ext_prov_clear_tx(void *link, bool cancel)
|
||||
|
||||
uint8_t bt_mesh_ext_prov_node_next_xact_id(void *link)
|
||||
{
|
||||
#if CONFIG_BLE_MESH_NODE
|
||||
#if CONFIG_BLE_MESH_NODE && CONFIG_BLE_MESH_PB_ADV
|
||||
extern uint8_t node_next_xact_id(struct bt_mesh_prov_link *link);
|
||||
return node_next_xact_id(link);
|
||||
#else
|
||||
assert(0);
|
||||
return 0;
|
||||
#endif /* CONFIG_BLE_MESH_NODE */
|
||||
#endif /* CONFIG_BLE_MESH_NODE && CONFIG_BLE_MESH_PB_ADV */
|
||||
}
|
||||
|
||||
void *bt_mesh_ext_prov_node_get_link(void)
|
||||
|
Loading…
x
Reference in New Issue
Block a user