Skip to content

Commit

Permalink
Merge pull request ARMmbed#1774 from ARMmbed/debug_trace_fix
Browse files Browse the repository at this point in the history
Removed debug trace which could be called at interrupt routine
  • Loading branch information
juhhei01 committed Aug 7, 2018
2 parents 1373a5f + 1e490f0 commit 9644114
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 22 deletions.
5 changes: 0 additions & 5 deletions source/MAC/IEEE802_15_4/mac_header_helper_functions.c
Expand Up @@ -607,15 +607,11 @@ bool mac_header_information_elements_parse(mac_pre_parsed_frame_t *buffer)
while (buffer->mac_payload_length >= 2) {

if (!mac_parse_header_ie(&header_ie, ptr)) {
tr_debug("Not supported header %u", *ptr);
ptr++;
tr_debug("Not supported header %u", *ptr);
return false;
}

buffer->mac_payload_length -= 2;
if (header_ie.length > buffer->mac_payload_length) {
tr_debug("Not supported length");
return false;
}

Expand All @@ -625,7 +621,6 @@ bool mac_header_information_elements_parse(mac_pre_parsed_frame_t *buffer)
ptr += (2 + header_ie.length);

if (header_ie.id == MAC_HEADER_TERMINATION1_IE_ID) {
//tr_debug("Termintad");
break;
} else if (header_ie.id == MAC_HEADER_TERMINATION2_IE_ID) {
buffer->macPayloadPtr = ptr;
Expand Down
21 changes: 5 additions & 16 deletions source/MAC/IEEE802_15_4/mac_mcps_sap.c
Expand Up @@ -873,7 +873,6 @@ static int8_t mac_command_sap_rx_handler(mac_pre_parsed_frame_t *buf, protocol_i
case MAC_DATA_REQ:
//Here 2 check
if (mac_indirect_data_req_handle(buf, rf_mac_setup) == 0) {
tr_debug("Trig Dummy packet");
mac_lib_res_no_data_to_req(buf, rf_mac_setup);
}
retval = 0;
Expand Down Expand Up @@ -1120,7 +1119,6 @@ static void mac_pd_data_confirm_handle(protocol_interface_rf_mac_setup_s *rf_mac
mcps_data_confirm_handle(rf_mac_setup, buffer, NULL);
} else {
if (mcps_pd_data_request(rf_mac_setup, buffer) != 0) {
tr_debug("Asynch Request fail");
rf_mac_setup->active_pd_data_request = NULL;
mcps_data_confirm_handle(rf_mac_setup, buffer, NULL);
} else {
Expand Down Expand Up @@ -1699,7 +1697,6 @@ int8_t mcps_generic_ack_build(protocol_interface_rf_mac_setup_s *rf_ptr, const m
//Add MHR length to total length
frame_length += buffer->mac_header_length_with_security + buffer->security_mic_len;
if ((frame_length) > dev_driver->phy_MTU - 2) {
tr_debug("Too Long %u, %u pa %u header %u mic %u",frame_length, mac_payload_length, buffer->mac_header_length_with_security, buffer->security_mic_len, dev_driver->phy_MTU);
buffer->status = MLME_FRAME_TOO_LONG;

if (buffer->fcf_dsn.securityEnabled) {
Expand Down Expand Up @@ -1734,7 +1731,6 @@ int8_t mcps_generic_ack_build(protocol_interface_rf_mac_setup_s *rf_ptr, const m
csma_params.cca_enabled = false;
rf_ptr->dev_driver->phy_driver->extension(PHY_EXTENSION_SET_CSMA_PARAMETERS, (uint8_t*) &csma_params);
if (rf_ptr->active_pd_data_request) {
tr_debug("Cancel Timer");
mac_pd_sap_set_phy_tx_time(rf_ptr, 0, false);
}

Expand Down Expand Up @@ -2101,9 +2097,8 @@ void mcps_sap_pd_confirm(void *mac_ptr)
.priority = ARM_LIB_HIGH_PRIORITY_EVENT,
};

if (eventOS_event_send(&event) != 0) {
tr_error("mcps_sap_pd_confirm(): event send failed");
}
eventOS_event_send(&event);

}

void mcps_sap_pd_ack(void *ack_ptr)
Expand All @@ -2120,9 +2115,7 @@ void mcps_sap_pd_ack(void *ack_ptr)
.priority = ARM_LIB_HIGH_PRIORITY_EVENT,
};

if (eventOS_event_send(&event) != 0) {
tr_error("mcps_sap_pd_confirm(): event send failed");
}
eventOS_event_send(&event);
}

void mcps_sap_trig_tx(void *mac_ptr)
Expand All @@ -2142,9 +2135,7 @@ void mcps_sap_trig_tx(void *mac_ptr)
.priority = ARM_LIB_MED_PRIORITY_EVENT,
};

if (eventOS_event_send(&event) != 0) {
tr_error("mcps_sap_trig_tx(): event send failed");
} else {
if (eventOS_event_send(&event) == 0) {
mac_set_active_event(mac_ptr, MAC_SAP_TRIG_TX);
}
}
Expand All @@ -2167,9 +2158,7 @@ void mac_generic_event_trig(uint8_t event_type, void *mac_ptr, bool low_latency)
.priority = priority,
};

if (eventOS_event_send(&event) != 0) {
tr_error("mac_generic_event_trig(): event send failed");
}
eventOS_event_send(&event);
}

void mac_mcps_buffer_queue_free(protocol_interface_rf_mac_setup_s *rf_mac_setup) {
Expand Down
2 changes: 1 addition & 1 deletion source/MAC/IEEE802_15_4/mac_security_mib.c
Expand Up @@ -395,7 +395,7 @@ mlme_key_descriptor_t * mac_sec_key_description_get(protocol_interface_rf_mac_se
key_description++;
}

tr_debug("LookuPdata search fail %s", trace_array(lookup_data, 9));
//tr_debug("LookuPdata search fail %s", trace_array(lookup_data, 9));

return NULL;
}
Expand Down

0 comments on commit 9644114

Please sign in to comment.