File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed
test/nanostack/unittest/mac/mac_pd_sap Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change 29
29
#include "test_mac_pd_sap.h"
30
30
#include "mac_header_helper_functions_stub.h"
31
31
#include "mac_mcps_sap_stub.h"
32
+ #include "mac_security_mib_stub.h"
32
33
#include "nsdynmemLIB_stub.h"
33
34
#include "fhss_config_stub.h"
34
35
#include "sw_mac_stub.h"
@@ -817,11 +818,32 @@ bool test_mac_cca_prepare_cb()
817
818
phy_message .message .mac15_4_pd_sap_confirm .status = PHY_LINK_CCA_PREPARE ;
818
819
819
820
int8_t ret = mac_pd_sap_data_cb (& rf_ptr , & phy_message );
821
+ if (ret != -1 ) {
822
+ return false;
823
+ }
824
+
825
+ rf_ptr .ack_tx_possible = true;
826
+ ret = mac_pd_sap_data_cb (& rf_ptr , & phy_message );
820
827
if (ret != 0 ) {
821
828
return false;
822
829
}
823
830
824
- rf_ptr .mac_ack_tx_active = false;
831
+ rf_ptr .ack_tx_possible = false;
832
+
833
+ rf_ptr .enhanced_ack_handler_timestamp = 10 ;
834
+ mlme_device_descriptor_t test_neigh ;
835
+ mac_security_mib_stub .device_ptr = & test_neigh ;
836
+
837
+ ret = mac_pd_sap_data_cb (& rf_ptr , & phy_message );
838
+ if (ret != 0 ) {
839
+ return false;
840
+ }
841
+ mac_security_mib_stub .device_ptr = NULL ;
842
+
843
+ ret = mac_pd_sap_data_cb (& rf_ptr , & phy_message );
844
+ if (ret != -1 || rf_ptr .mac_ack_tx_active ) {
845
+ return false;
846
+ }
825
847
826
848
ret = mac_pd_sap_data_cb (& rf_ptr , & phy_message );
827
849
if (ret != -1 ) {
You can’t perform that action at this time.
0 commit comments