Skip to content

Commit 1866de2

Browse files
PavelVPVcvinayak
authored andcommitted
[nrf fromlist] tests: bluetooth: tester: Allow to compile mesh without LPN
This can be needed to qualify features without LPN support. Upstream PR: zephyrproject-rtos/zephyr#63904 Signed-off-by: Pavel Vasilyev <[email protected]>
1 parent 7bd44ad commit 1866de2

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

subsys/bluetooth/host/testing.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ void bt_test_mesh_trans_incomp_timer_exp(void)
102102
}
103103
}
104104

105+
#if defined(CONFIG_BT_MESH_LOW_POWER)
105106
int bt_test_mesh_lpn_group_add(uint16_t group)
106107
{
107108
bt_mesh_lpn_group_add(group);
@@ -115,6 +116,7 @@ int bt_test_mesh_lpn_group_remove(uint16_t *groups, size_t groups_count)
115116

116117
return 0;
117118
}
119+
#endif /* CONFIG_BT_MESH_LOW_POWER */
118120

119121
int bt_test_mesh_rpl_clear(void)
120122
{

tests/bluetooth/tester/src/btp_mesh.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1553,6 +1553,7 @@ static uint8_t ivu_toggle_state(const void *cmd, uint16_t cmd_len,
15531553
return BTP_STATUS_SUCCESS;
15541554
}
15551555

1556+
#if defined(CONFIG_BT_MESH_LOW_POWER)
15561557
static uint8_t lpn(const void *cmd, uint16_t cmd_len,
15571558
void *rsp, uint16_t *rsp_len)
15581559
{
@@ -1584,6 +1585,7 @@ static uint8_t lpn_poll(const void *cmd, uint16_t cmd_len,
15841585

15851586
return BTP_STATUS_SUCCESS;
15861587
}
1588+
#endif /* CONFIG_BT_MESH_LOW_POWER */
15871589

15881590
static uint8_t net_send(const void *cmd, uint16_t cmd_len,
15891591
void *rsp, uint16_t *rsp_len)
@@ -1765,6 +1767,7 @@ static uint8_t model_send(const void *cmd, uint16_t cmd_len,
17651767
}
17661768

17671769
#if defined(CONFIG_BT_TESTING)
1770+
#if defined(CONFIG_BT_MESH_LOW_POWER)
17681771
static uint8_t lpn_subscribe(const void *cmd, uint16_t cmd_len,
17691772
void *rsp, uint16_t *rsp_len)
17701773
{
@@ -1800,6 +1803,7 @@ static uint8_t lpn_unsubscribe(const void *cmd, uint16_t cmd_len,
18001803

18011804
return BTP_STATUS_SUCCESS;
18021805
}
1806+
#endif /* CONFIG_BT_MESH_LOW_POWER */
18031807

18041808
static uint8_t rpl_clear(const void *cmd, uint16_t cmd_len,
18051809
void *rsp, uint16_t *rsp_len)
@@ -4579,6 +4583,7 @@ static const struct btp_handler handlers[] = {
45794583
.expect_len = 0,
45804584
.func = ivu_toggle_state,
45814585
},
4586+
#if defined(CONFIG_BT_MESH_LOW_POWER)
45824587
{
45834588
.opcode = BTP_MESH_LPN,
45844589
.expect_len = sizeof(struct btp_mesh_lpn_set_cmd),
@@ -4589,6 +4594,7 @@ static const struct btp_handler handlers[] = {
45894594
.expect_len = 0,
45904595
.func = lpn_poll,
45914596
},
4597+
#endif /* CONFIG_BT_MESH_LOW_POWER */
45924598
{
45934599
.opcode = BTP_MESH_NET_SEND,
45944600
.expect_len = BTP_HANDLER_LENGTH_VARIABLE,
@@ -4900,6 +4906,7 @@ static const struct btp_handler handlers[] = {
49004906
.func = va_del,
49014907
},
49024908
#if defined(CONFIG_BT_TESTING)
4909+
#if defined(CONFIG_BT_MESH_LOW_POWER)
49034910
{
49044911
.opcode = BTP_MESH_LPN_SUBSCRIBE,
49054912
.expect_len = sizeof(struct btp_mesh_lpn_subscribe_cmd),
@@ -4910,6 +4917,7 @@ static const struct btp_handler handlers[] = {
49104917
.expect_len = sizeof(struct btp_mesh_lpn_unsubscribe_cmd),
49114918
.func = lpn_unsubscribe,
49124919
},
4920+
#endif /* CONFIG_BT_MESH_LOW_POWER */
49134921
{
49144922
.opcode = BTP_MESH_RPL_CLEAR,
49154923
.expect_len = 0,

0 commit comments

Comments
 (0)