Lines Matching full:phase
234 uint8_t phase; in tx_on_key_refresh_test() local
237 status = bt_mesh_subnet_kr_phase_get(BT_MESH_KEY_PRIMARY, &phase); in tx_on_key_refresh_test()
239 ASSERT_TRUE(phase == BT_MESH_KR_NORMAL); in tx_on_key_refresh_test()
246 status = bt_mesh_subnet_kr_phase_get(BT_MESH_KEY_PRIMARY, &phase); in tx_on_key_refresh_test()
248 ASSERT_TRUE(phase == BT_MESH_KR_PHASE_1); in tx_on_key_refresh_test()
252 phase = BT_MESH_KR_PHASE_2; in tx_on_key_refresh_test()
253 status = bt_mesh_subnet_kr_phase_set(BT_MESH_KEY_PRIMARY, &phase); in tx_on_key_refresh_test()
255 status = bt_mesh_subnet_kr_phase_get(BT_MESH_KEY_PRIMARY, &phase); in tx_on_key_refresh_test()
257 ASSERT_TRUE(phase == BT_MESH_KR_PHASE_2); in tx_on_key_refresh_test()
261 phase = BT_MESH_KR_PHASE_3; in tx_on_key_refresh_test()
262 status = bt_mesh_subnet_kr_phase_set(BT_MESH_KEY_PRIMARY, &phase); in tx_on_key_refresh_test()
264 status = bt_mesh_subnet_kr_phase_get(BT_MESH_KEY_PRIMARY, &phase); in tx_on_key_refresh_test()
266 ASSERT_TRUE(phase == BT_MESH_KR_NORMAL); in tx_on_key_refresh_test()
282 uint8_t phase; in test_rx_on_key_refresh() local
291 status = bt_mesh_subnet_kr_phase_get(BT_MESH_KEY_PRIMARY, &phase); in test_rx_on_key_refresh()
293 ASSERT_TRUE(phase == BT_MESH_KR_NORMAL); in test_rx_on_key_refresh()
300 status = bt_mesh_subnet_kr_phase_get(BT_MESH_KEY_PRIMARY, &phase); in test_rx_on_key_refresh()
302 ASSERT_TRUE(phase == BT_MESH_KR_PHASE_1); in test_rx_on_key_refresh()
306 status = bt_mesh_subnet_kr_phase_get(BT_MESH_KEY_PRIMARY, &phase); in test_rx_on_key_refresh()
308 ASSERT_TRUE(phase == BT_MESH_KR_PHASE_1); in test_rx_on_key_refresh()
312 status = bt_mesh_subnet_kr_phase_get(BT_MESH_KEY_PRIMARY, &phase); in test_rx_on_key_refresh()
314 ASSERT_TRUE(phase == BT_MESH_KR_PHASE_2); in test_rx_on_key_refresh()
318 status = bt_mesh_subnet_kr_phase_get(BT_MESH_KEY_PRIMARY, &phase); in test_rx_on_key_refresh()
320 ASSERT_TRUE(phase == BT_MESH_KR_NORMAL); in test_rx_on_key_refresh()
579 * beacon shall not change Key Refresh phase, but should still be processed. The beacon in test_tx_kr_old_key()
598 * the new Net Key. The node shall set Key Refresh phase to 2. The beacon interval shall in test_tx_kr_old_key()
618 /* Try the same with the new Net Key. Now the node shall change Key Refresh phase to 0. The in test_tx_kr_old_key()
654 uint8_t phase; in test_rx_kr_old_key() local
668 uint8_t phase; in test_rx_kr_old_key() member
672 /* Old Net Key, attempt to change Key Refresh phase to 2. */ in test_rx_kr_old_key()
673 { .phase = BT_MESH_KR_PHASE_1, .ivu = false, .ivi = 0 }, in test_rx_kr_old_key()
675 { .phase = BT_MESH_KR_PHASE_1, .ivu = true, .ivi = 1 }, in test_rx_kr_old_key()
676 /* New Net Key, changing Key Refresh phase. */ in test_rx_kr_old_key()
677 { .phase = BT_MESH_KR_PHASE_2, .ivu = true, .ivi = 1 }, in test_rx_kr_old_key()
679 { .phase = BT_MESH_KR_PHASE_2, .ivu = true, .ivi = 1 }, in test_rx_kr_old_key()
680 /* New Net Key, changing Key Refresh phase to 0. */ in test_rx_kr_old_key()
681 { .phase = BT_MESH_KR_NORMAL, .ivu = true, .ivi = 1 }, in test_rx_kr_old_key()
683 { .phase = BT_MESH_KR_NORMAL, .ivu = true, .ivi = 1 }, in test_rx_kr_old_key()
685 { .phase = BT_MESH_KR_NORMAL, .ivu = false, .ivi = 1 }, in test_rx_kr_old_key()
691 status = bt_mesh_subnet_kr_phase_get(0, &phase); in test_rx_kr_old_key()
693 FAIL("Unable to populate Key Refresh phase (status: %d)", status); in test_rx_kr_old_key()
696 ASSERT_EQUAL(test_vector[i].phase, phase); in test_rx_kr_old_key()
776 * The beacon shall be processed, but shall not change Key Refresh phase. in test_tx_multiple_netkeys()
793 * Refresh phase to 2. in test_tx_multiple_netkeys()
826 /* Do the same with the new Net Key. Now the node shall change Key Refresh phase in test_tx_multiple_netkeys()
863 uint8_t phase; in test_rx_multiple_netkeys() local
871 /* Add new Net Keys and switch Key Refresh phase to 1 so that beacons can trigger Key in test_rx_multiple_netkeys()
889 /* Tx device shall change Key Refresh phase to 2. */ in test_rx_multiple_netkeys()
892 status = bt_mesh_subnet_kr_phase_get(i + 1, &phase); in test_rx_multiple_netkeys()
894 FAIL("Unable to populate Key Refresh phase (status: %d)", status); in test_rx_multiple_netkeys()
897 ASSERT_EQUAL(BT_MESH_KR_PHASE_2, phase); in test_rx_multiple_netkeys()
899 /* Tx device shall change Key Refresh phase to 0. */ in test_rx_multiple_netkeys()
902 status = bt_mesh_subnet_kr_phase_get(i + 1, &phase); in test_rx_multiple_netkeys()
904 FAIL("Unable to populate Key Refresh phase (status: %d)", status); in test_rx_multiple_netkeys()
907 ASSERT_EQUAL(BT_MESH_KR_NORMAL, phase); in test_rx_multiple_netkeys()
1362 uint8_t phase; in test_tx_priv_interleave() local
1380 status = bt_mesh_subnet_kr_phase_get(0, &phase); in test_tx_priv_interleave()
1382 ASSERT_TRUE(phase == BT_MESH_KR_NORMAL); in test_tx_priv_interleave()
1405 status = bt_mesh_subnet_kr_phase_get(BT_MESH_KEY_PRIMARY, &phase); in test_tx_priv_interleave()
1407 ASSERT_TRUE(phase == BT_MESH_KR_PHASE_1); in test_tx_priv_interleave()
1409 phase = BT_MESH_KR_PHASE_2; in test_tx_priv_interleave()
1410 status = bt_mesh_subnet_kr_phase_set(BT_MESH_KEY_PRIMARY, &phase); in test_tx_priv_interleave()
1412 status = bt_mesh_subnet_kr_phase_get(BT_MESH_KEY_PRIMARY, &phase); in test_tx_priv_interleave()
1414 ASSERT_TRUE(phase == BT_MESH_KR_PHASE_2); in test_tx_priv_interleave()