--- a/interfaces/opensync_stats.proto +++ b/interfaces/opensync_stats.proto @@ -263,6 +263,7 @@ message Survey { optional uint32 busy_self = 8; /* Rx_self (derived from succesful Rx frames)*/ optional uint32 offset_ms = 9; optional uint32 busy_ext = 10; /* 40MHz extention channel busy */ + optional uint32 noise = 11; } message SurveyAvg { required uint32 channel = 1; @@ -271,6 +272,7 @@ message Survey { optional AvgType busy_rx = 4; /* Rx = Rx_obss + Rx_errr (self and obss errors) */ optional AvgType busy_self = 5; /* Rx_self (derived from succesful Rx frames)*/ optional AvgType busy_ext = 6; /* 40MHz extention channel busy */ + optional AvgType noise = 7; } required RadioBandType band = 1; required SurveyType survey_type = 2; --- a/src/lib/datapipeline/inc/dpp_survey.h +++ b/src/lib/datapipeline/inc/dpp_survey.h @@ -52,6 +52,7 @@ typedef struct dpp_avg_t chan_self; dpp_avg_t chan_rx; dpp_avg_t chan_tx; + dpp_avg_t chan_noise; ds_dlist_node_t node; } dpp_survey_record_avg_t; @@ -67,6 +68,7 @@ typedef struct uint32_t chan_self; uint32_t chan_rx; uint32_t chan_tx; + uint32_t chan_noise; uint32_t duration_ms; /* Linked list survey data */ --- a/src/lib/datapipeline/src/dppline.c +++ b/src/lib/datapipeline/src/dppline.c @@ -768,6 +768,7 @@ static void dppline_add_stat_survey(Sts_ CP_AVG(busy_self, chan_self); CP_AVG(busy_rx, chan_rx); CP_AVG(busy_ext, chan_busy_ext); + CP_AVG(noise, chan_noise); #undef CP_AVG } @@ -805,6 +806,7 @@ static void dppline_add_stat_survey(Sts_ CP_OPT(busy_self, chan_self); CP_OPT(busy_rx, chan_rx); CP_OPT(busy_ext, chan_busy_ext); + CP_OPT(noise, chan_noise); #undef CP_OPT --- a/src/sm/src/sm_survey_report.c +++ b/src/sm/src/sm_survey_report.c @@ -428,6 +428,7 @@ bool sm_survey_report_calculate_average CALC(chan_self); CALC(chan_rx); CALC(chan_busy_ext); + CALC(chan_noise); } #define AVG(_name) do { \ @@ -465,6 +466,7 @@ bool sm_survey_report_calculate_average AVG(chan_self); AVG(chan_rx); AVG(chan_busy_ext); + AVG(chan_noise); ds_dlist_insert_tail(report_list, report_entry); } @@ -519,7 +521,7 @@ bool sm_survey_report_calculate_raw ( memcpy(report_entry, record_entry, sizeof(*report_entry)); LOGD("Sending %s %s %u survey report " - "{busy=%u tx=%u self=%u rx=%u ext=%u duration=%u}", + "{busy=%u tx=%u self=%u rx=%u ext=%u noise=%u duration=%u}", radio_get_name_from_cfg(radio_cfg_ctx), radio_get_scan_name_from_type(scan_type), report_entry->info.chan, @@ -528,6 +530,7 @@ bool sm_survey_report_calculate_raw ( report_entry->chan_self, report_entry->chan_rx, report_entry->chan_busy_ext, + report_entry->chan_noise, report_entry->duration_ms); ds_dlist_insert_tail(report_list, report_entry); @@ -723,7 +726,7 @@ bool sm_survey_update_list_cb ( result_entry); LOGD("Processed %s %s %u survey percent " - "{busy=%u tx=%u self=%u rx=%u ext=%u duration=%u}", + "{busy=%u tx=%u self=%u rx=%u ext=%u noise=%u duration=%u}", radio_get_name_from_cfg(radio_cfg_ctx), radio_get_scan_name_from_type(scan_type), result_entry->info.chan, @@ -732,6 +735,7 @@ bool sm_survey_update_list_cb ( result_entry->chan_self, result_entry->chan_rx, result_entry->chan_busy_ext, + result_entry->chan_noise, result_entry->duration_ms); result_entry->info.timestamp_ms =