Skip to content

Commit b5a71c4

Browse files
author
Jarkko Paso
committed
MAC unit tests: Updated CCA prepare test
1 parent a1f3ceb commit b5a71c4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/nanostack/unittest/mac/mac_pd_sap/test_mac_pd_sap.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -829,17 +829,18 @@ bool test_mac_cca_prepare_cb()
829829

830830
memset(&test_packet, 0, sizeof(mac_pre_build_frame_t));
831831
rf_ptr.active_pd_data_request = &test_packet;
832+
test_packet.csma_periods_left = 1;
832833
test_packet.fcf_dsn.frametype = FC_BEACON_FRAME;
833834
test_packet.asynch_request = false;
834835
fhss_callback_response = -1;
835836
ret = mac_pd_sap_data_cb(&rf_ptr, &phy_message);
836-
if (ret != -2) {
837+
if (ret != -1) {
837838
return false;
838839
}
839840
fhss_callback_response = -3;
840841
rf_ptr.macRfRadioTxActive = true;
841842
ret = mac_pd_sap_data_cb(&rf_ptr, &phy_message);
842-
if (ret != -3) {
843+
if (ret != -1) {
843844
return false;
844845
}
845846

0 commit comments

Comments
 (0)