Skip to content

Commit da5d2c7

Browse files
author
Juha Heiskanen
committed
MAC, RPL and ETX trace clean.
Change-Id: I4bdf63e277b2301bf779483b116b63e2f65f4d91
1 parent eaf8907 commit da5d2c7

File tree

7 files changed

+3
-49
lines changed

7 files changed

+3
-49
lines changed

source/MAC/IEEE802_15_4/mac_indirect_data.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ uint8_t mac_indirect_data_req_handle(mac_pre_parsed_frame_t *buf, protocol_inter
148148

149149
/* If the Ack we sent for the Data Request didn't have frame pending set, we shouldn't transmit - child may have slept */
150150
if (!buf->ack_pendinfg_status) {
151-
//tr_debug("Drop by pending");
152151
if (mac_ptr->indirect_pd_data_request_queue) {
153152
tr_error("Wrongly dropped");
154153
}

source/MAC/IEEE802_15_4/mac_mcps_sap.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ void mcps_sap_data_req_handler_ext(protocol_interface_rf_mac_setup_s *rf_mac_set
235235

236236
if (!rf_mac_setup->macUpState || rf_mac_setup->scan_active) {
237237
status = MLME_TRX_OFF;
238-
tr_debug("Drop MAC tx packet when mac disabled");
239238
goto verify_status;
240239
}
241240

@@ -616,11 +615,6 @@ static uint8_t mac_data_interface_decrypt_packet(mac_pre_parsed_frame_t *b, mlme
616615
ccm_ptr.data_ptr = (mcps_mac_payload_pointer_get(b) + openPayloadLength);
617616
ccm_ptr.data_len = b->mac_payload_length - openPayloadLength;
618617
if (ccm_process_run(&ccm_ptr) != 0) {
619-
tr_warning("MIC Fail adata %s", trace_array(ccm_ptr.adata_ptr, ccm_ptr.adata_len));
620-
tr_warning("Nonce %s", trace_array(ccm_ptr.exp_nonce, 13));
621-
if (openPayloadLength) {
622-
tr_warning("%s", tr_array(ccm_ptr.data_ptr, ccm_ptr.data_len));
623-
}
624618
return MLME_SECURITY_FAIL;
625619
}
626620

@@ -662,7 +656,6 @@ static void mcps_comm_status_indication_generate(uint8_t status, mac_pre_parsed_
662656
static int8_t mac_data_interface_host_accept_data(mcps_data_ind_t *data_ind, protocol_interface_rf_mac_setup_s *rf_mac_setup)
663657
{
664658
if ((data_ind->DstAddrMode == MAC_ADDR_MODE_16_BIT) && (data_ind->DstAddr[0] == 0xff && data_ind->DstAddr[1] == 0xff)) {
665-
tr_debug("Drop Multicast packet");
666659
return -1;
667660
}
668661

@@ -723,7 +716,6 @@ static int8_t mac_data_sap_rx_handler(mac_pre_parsed_frame_t *buf, protocol_inte
723716
}
724717

725718
if (!mac_payload_information_elements_parse(buf)) {
726-
tr_debug("Drop by Paylod IE");
727719
goto DROP_PACKET;
728720
}
729721
data_ind->msduLength = buf->mac_payload_length;
@@ -741,7 +733,6 @@ static int8_t mac_data_sap_rx_handler(mac_pre_parsed_frame_t *buf, protocol_inte
741733

742734
if (buf->fcf_dsn.frameVersion == MAC_FRAME_VERSION_2015) {
743735
if (!rf_mac_setup->mac_extension_enabled) {
744-
tr_debug("No Ext reg");
745736
goto DROP_PACKET;
746737
}
747738
mcps_data_ie_list_t ie_list;
@@ -903,7 +894,6 @@ static void mac_data_interface_parse_beacon(mac_pre_parsed_frame_t *buf, protoco
903894
}
904895

905896
if (!mac_payload_information_elements_parse(buf)) {
906-
tr_debug("Drop by Paylod IE");
907897
return;
908898
}
909899

@@ -924,7 +914,6 @@ static void mac_data_interface_parse_beacon(mac_pre_parsed_frame_t *buf, protoco
924914
if (len < gts_field_length) {
925915
return;
926916
}
927-
// gts_info = ptr;
928917
len -= gts_field_length;
929918
ptr += gts_field_length;
930919
}
@@ -979,7 +968,6 @@ static void mac_data_interface_frame_handler(mac_pre_parsed_frame_t *buf)
979968
{
980969
protocol_interface_rf_mac_setup_s *rf_mac_setup = buf->mac_class_ptr;
981970
if (!rf_mac_setup) {
982-
tr_debug("Drop by no mac class");
983971
mcps_sap_pre_parsed_frame_buffer_free(buf);
984972
return;
985973
}
@@ -1084,13 +1072,11 @@ static int8_t mac_ack_sap_rx_handler(mac_pre_parsed_frame_t *buf, protocol_inter
10841072
if (buf->fcf_dsn.securityEnabled) {
10851073
uint8_t status = mac_data_interface_decrypt_packet(buf, &key);
10861074
if (status != MLME_SUCCESS) {
1087-
tr_debug("ACK Decrypt fail");
10881075
return -1;
10891076
}
10901077
}
10911078

10921079
if (buf->mac_payload_length && !mac_payload_information_elements_parse(buf)) {
1093-
tr_debug("Drop ACK by Paylod IE");
10941080
return -1;
10951081
}
10961082

source/MAC/IEEE802_15_4/mac_mlme.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,6 @@ uint8_t mac_mlme_beacon_req_tx(protocol_interface_rf_mac_setup_s *rf_ptr)
232232
buf->fcf_dsn.DstPanPresents = true;
233233
buf->fcf_dsn.SrcPanPresents = false;
234234

235-
tr_debug("BEA REQ tx");
236235
mcps_sap_pd_req_queue_write(rf_ptr, buf);
237236
return 1;
238237
}
@@ -843,7 +842,6 @@ static void mlme_scan_operation(protocol_interface_rf_mac_setup_s *rf_mac_setup)
843842
channel = mlme_scan_analyze_next_channel(&rf_mac_setup->mac_channel_list, true);
844843
if (channel > 0xff || rf_mac_setup->mac_mlme_scan_resp->ResultListSize == MLME_MAC_RES_SIZE_MAX) {
845844
resp->status = MLME_SUCCESS;
846-
tr_debug("Scan Complete..Halt MAC");
847845
platform_enter_critical();
848846
mac_mlme_mac_radio_disabled(rf_mac_setup);
849847
if (resp->ResultListSize == 0 && rf_mac_setup->scan_type == MAC_ACTIVE_SCAN) {
@@ -855,7 +853,6 @@ static void mlme_scan_operation(protocol_interface_rf_mac_setup_s *rf_mac_setup)
855853
platform_exit_critical();
856854
//Scan Confirmation
857855
mac_generic_event_trig(MAC_MLME_SCAN_CONFIRM_HANDLER, rf_mac_setup, false);
858-
tr_debug("Trig confirm");
859856
rf_mac_setup->scan_active = false;
860857
} else {
861858
mac_mlme_scan_init((uint8_t) channel, rf_mac_setup);
@@ -987,20 +984,17 @@ static void mac_mlme_free_scan_temporary_data(protocol_interface_rf_mac_setup_s
987984
rf_mac_setup->scan_active = false;
988985
if (rf_mac_setup->mac_mlme_scan_resp) {
989986
mlme_scan_conf_t *r = rf_mac_setup->mac_mlme_scan_resp;
990-
tr_debug("%02x", r->ResultListSize);
991987
if (r->ED_values) {
992988
ns_dyn_mem_free(r->ED_values);
993989
r->ED_values = NULL;
994990
}
995991
uint8_t i = 0;
996992
while (i < r->ResultListSize) {
997993
if (r->PAN_values[i]) {
998-
tr_debug("Free PAN result");
999994
ns_dyn_mem_free(r->PAN_values[i]);
1000995
}
1001996
i++;
1002997
}
1003-
tr_debug("Free Response");
1004998
ns_dyn_mem_free(rf_mac_setup->mac_mlme_scan_resp);
1005999
rf_mac_setup->mac_mlme_scan_resp = NULL;
10061000
}
@@ -1399,11 +1393,6 @@ static void mac_mlme_start_confirm_handler(protocol_interface_rf_mac_setup_s *rf
13991393

14001394
static void mac_mlme_scan_confirm_handler(protocol_interface_rf_mac_setup_s *rf_ptr, const mlme_scan_conf_t *conf)
14011395
{
1402-
if (conf->ScanType == MAC_ACTIVE_SCAN) {
1403-
tr_debug("Active Scan Result");
1404-
} else if (conf->ScanType == MAC_ED_SCAN_TYPE) {
1405-
tr_debug("ED Scan Result");
1406-
}
14071396
if (rf_ptr->tun_extension_rf_driver) {
14081397
virtual_data_req_t scan_conf;
14091398
uint8_t buf_temp[2];

source/RPL/rpl_control.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,6 @@ static void rpl_control_dao_trigger_request(rpl_instance_t *instance, rpl_dodag_
856856
static buffer_t *rpl_control_dio_handler(protocol_interface_info_entry_t *cur, rpl_domain_t *domain, buffer_t *buf)
857857
{
858858
if (!rpl_control_options_well_formed_in_buffer(buf, 24)) {
859-
tr_error("DIO format");
860859
malformed:
861860
protocol_stats_update(STATS_RPL_MALFORMED_MESSAGE, 1);
862861
return buffer_free(buf);
@@ -1268,7 +1267,6 @@ void rpl_control_transmit_dio(rpl_domain_t *domain, protocol_interface_info_entr
12681267
static buffer_t *rpl_control_dis_handler(protocol_interface_info_entry_t *cur, rpl_domain_t *domain, buffer_t *buf, bool multicast)
12691268
{
12701269
if (!rpl_control_options_well_formed_in_buffer(buf, 2)) {
1271-
tr_error("DIS format");
12721270
protocol_stats_update(STATS_RPL_MALFORMED_MESSAGE, 1);
12731271
return buffer_free(buf);
12741272
}
@@ -1396,7 +1394,6 @@ static buffer_t *rpl_control_dao_ack_handler(protocol_interface_info_entry_t *cu
13961394

13971395
if (buffer_data_length(buf) < 4) {
13981396
format_error:
1399-
tr_error("DAO-ACK format");
14001397
protocol_stats_update(STATS_RPL_MALFORMED_MESSAGE, 1);
14011398
return buffer_free(buf);
14021399
}
@@ -1480,7 +1477,6 @@ static buffer_t *rpl_control_dao_handler(protocol_interface_info_entry_t *cur, r
14801477
{
14811478
if (buffer_data_length(buf) < 4) {
14821479
format_error:
1483-
tr_error("DAO format");
14841480
protocol_stats_update(STATS_RPL_MALFORMED_MESSAGE, 1);
14851481
return buffer_free(buf);
14861482
}

source/RPL/rpl_downward.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ void rpl_instance_dao_trigger(rpl_instance_t *instance, uint16_t delay)
389389
}
390390
if (instance->delay_dao_timer == 0 || instance->delay_dao_timer > delay) {
391391
instance->delay_dao_timer = delay;
392-
tr_debug("DAO trigger %" PRIu16, delay);
392+
//tr_debug("DAO trigger %" PRIu16, delay);
393393
}
394394
}
395395

source/Service_Libs/etx/etx.c

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ static bool etx_update_possible(etx_sample_storage_t *storage, etx_storage_t *en
157157
}
158158
}
159159

160-
tr_debug("ETX update possible %u attempts, %u rx ack", storage->attempts_count, storage->received_acks);
160+
//tr_debug("ETX update possible %u attempts, %u rx ack", storage->attempts_count, storage->received_acks);
161161

162162
return true;
163163

@@ -318,9 +318,6 @@ uint16_t etx_read(int8_t interface_id, addrtype_t addr_type, const uint8_t *addr
318318
}
319319
attribute_index = mac_neighbor->index;
320320

321-
322-
//tr_debug("Etx Read from atribute %u", attribute_index);
323-
324321
etx_storage_t *entry = etx_storage_entry_get(interface_id, attribute_index);
325322

326323
if (!entry) {
@@ -330,8 +327,6 @@ uint16_t etx_read(int8_t interface_id, addrtype_t addr_type, const uint8_t *addr
330327
uint16_t etx = etx_current_calc(entry->etx, entry->accumulated_failures);
331328
etx >>= 4;
332329

333-
//tr_debug("Etx value %u", etx);
334-
335330
return etx;
336331
}
337332

@@ -632,7 +627,6 @@ void etx_max_update_set(uint16_t etx_max_update)
632627
etx_storage_t *etx_storage_entry_get(int8_t interface_id, uint8_t attribute_index)
633628
{
634629
if (etx_info.interface_id != interface_id || !etx_info.etx_storage_list || attribute_index >= etx_info.ext_storage_list_size) {
635-
//tr_debug("Unknow ID or un initilized ETX %u", attribute_index);
636630
return NULL;
637631
}
638632

@@ -804,12 +798,7 @@ void etx_cache_timer(int8_t interface_id, uint16_t seconds_update)
804798
}
805799

806800
protocol_interface_info_entry_t *interface = protocol_stack_interface_info_get_by_id(interface_id);
807-
if (!interface) {
808-
return;
809-
}
810-
811-
812-
if (!mac_neighbor_info(interface)) {
801+
if (!interface || !mac_neighbor_info(interface)) {
813802
return;
814803
}
815804

source/Service_Libs/mac_neighbor_table/mac_neighbor_table.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
#include "Core/include/ns_address_internal.h"
2727
#include "platform/topo_trace.h"
2828

29-
#define TRACE_GROUP "mnei"
30-
3129
mac_neighbor_table_t *mac_neighbor_table_create(uint8_t table_size, neighbor_entry_remove_notify *remove_cb, neighbor_entry_nud_notify *nud_cb, void *user_indentifier)
3230
{
3331
mac_neighbor_table_t *table_class = ns_dyn_mem_alloc(sizeof(mac_neighbor_table_t) + sizeof(mac_neighbor_table_entry_t) * table_size);
@@ -111,11 +109,9 @@ void mac_neighbor_table_neighbor_timeout_update(mac_neighbor_table_t *table_clas
111109
if (table_class->user_nud_notify_cb(cur, table_class->table_user_identifier)) {
112110
table_class->active_nud_process++;
113111
cur->nud_active = true;
114-
//tr_debug("Nud started index %u : %"PRIu32" time ", cur->index, cur->lifetime);
115112
}
116113

117114
} else {
118-
tr_debug("Node index %u time out ", cur->index);
119115
neighbor_table_class_remove_entry(table_class, cur);
120116
}
121117
}
@@ -176,7 +172,6 @@ void mac_neighbor_table_neighbor_refresh(mac_neighbor_table_t *table_class, mac_
176172
neighbor_entry->lifetime = life_time;
177173
neighbor_entry->link_lifetime = life_time;
178174
if (neighbor_entry->nud_active) {
179-
//tr_debug("Node index NUD response %u : %"PRIu32" time ", neighbor_entry->index, neighbor_entry->lifetime);
180175
neighbor_entry->nud_active = false;
181176
table_class->active_nud_process--;
182177
}

0 commit comments

Comments
 (0)