diff --git a/lib/include/srslte/common/metrics_hub.h b/lib/include/srslte/common/metrics_hub.h index c870c5bdb..cd7ae8d9f 100644 --- a/lib/include/srslte/common/metrics_hub.h +++ b/lib/include/srslte/common/metrics_hub.h @@ -47,7 +47,7 @@ class metrics_listener { public: virtual void set_metrics(const metrics_t& m, const uint32_t period_usec) = 0; - virtual void stop() = 0; + virtual void stop() = 0; }; template diff --git a/lib/include/srslte/phy/phch/ra_ul.h b/lib/include/srslte/phy/phch/ra_ul.h index 73f07e346..bc7008758 100644 --- a/lib/include/srslte/phy/phch/ra_ul.h +++ b/lib/include/srslte/phy/phch/ra_ul.h @@ -61,9 +61,7 @@ SRSLTE_API int srslte_ra_ul_dci_to_grant(srslte_cell_t* cell, srslte_dci_ul_t* dci, srslte_pusch_grant_t* grant); -SRSLTE_API void srslte_ra_ul_compute_nof_re(srslte_pusch_grant_t* grant, - srslte_cp_t cp, - uint32_t N_srs); +SRSLTE_API void srslte_ra_ul_compute_nof_re(srslte_pusch_grant_t* grant, srslte_cp_t cp, uint32_t N_srs); /** Others */ SRSLTE_API uint32_t srslte_ra_ul_info(srslte_pusch_grant_t* grant, char* info_str, uint32_t len); diff --git a/lib/include/srslte/phy/ue/ue_mib_sl.h b/lib/include/srslte/phy/ue/ue_mib_sl.h index ad2e7b08d..a21d65913 100644 --- a/lib/include/srslte/phy/ue/ue_mib_sl.h +++ b/lib/include/srslte/phy/ue/ue_mib_sl.h @@ -49,15 +49,15 @@ typedef struct SRSLTE_API { } srslte_ue_mib_sl_t; -int srslte_ue_mib_sl_set(srslte_ue_mib_sl_t* q, - uint32_t nof_prb, - uint32_t tdd_config, - uint32_t direct_frame_number, - uint32_t direct_subframe_number, - bool in_coverage); +int srslte_ue_mib_sl_set(srslte_ue_mib_sl_t* q, + uint32_t nof_prb, + uint32_t tdd_config, + uint32_t direct_frame_number, + uint32_t direct_subframe_number, + bool in_coverage); -void srslte_ue_mib_sl_pack(srslte_ue_mib_sl_t *q, uint8_t *msg); -void srlste_ue_mib_sl_unpack(srslte_ue_mib_sl_t *q, uint8_t *msg); +void srslte_ue_mib_sl_pack(srslte_ue_mib_sl_t* q, uint8_t* msg); +void srlste_ue_mib_sl_unpack(srslte_ue_mib_sl_t* q, uint8_t* msg); void srslte_ue_mib_sl_free(srslte_ue_mib_sl_t* q); diff --git a/lib/include/srslte/upper/rlc_common.h b/lib/include/srslte/upper/rlc_common.h index 29e3c355d..2876de0ee 100644 --- a/lib/include/srslte/upper/rlc_common.h +++ b/lib/include/srslte/upper/rlc_common.h @@ -278,7 +278,7 @@ public: virtual void discard_sdu(uint32_t discard_sn) = 0; // MAC interface - virtual bool has_data() = 0; + virtual bool has_data() = 0; bool is_suspended() { return suspended; }; virtual uint32_t get_buffer_state() = 0; virtual int read_pdu(uint8_t* payload, uint32_t nof_bytes) = 0; diff --git a/lib/src/phy/rf/rf_zmq_imp.h b/lib/src/phy/rf/rf_zmq_imp.h index bf167576a..2f31b3ab5 100644 --- a/lib/src/phy/rf/rf_zmq_imp.h +++ b/lib/src/phy/rf/rf_zmq_imp.h @@ -19,8 +19,8 @@ * */ -#include #include +#include #include "srslte/config.h" #include "srslte/phy/rf/rf.h" diff --git a/lib/src/phy/rf/rf_zmq_imp_trx.h b/lib/src/phy/rf/rf_zmq_imp_trx.h index 65cfdb03b..92a15b4a8 100644 --- a/lib/src/phy/rf/rf_zmq_imp_trx.h +++ b/lib/src/phy/rf/rf_zmq_imp_trx.h @@ -59,10 +59,10 @@ typedef struct { } rf_zmq_tx_t; typedef struct { - char id[ZMQ_ID_STRLEN]; - uint32_t socket_type; - rf_zmq_format_t sample_format; - void* sock; + char id[ZMQ_ID_STRLEN]; + uint32_t socket_type; + rf_zmq_format_t sample_format; + void* sock; #if ZMQ_MONITOR void* socket_monitor; bool tx_connected; @@ -75,7 +75,7 @@ typedef struct { cf_t* temp_buffer; void* temp_buffer_convert; uint32_t frequency_mhz; - bool fail_on_disconnect; + bool fail_on_disconnect; } rf_zmq_rx_t; typedef struct { diff --git a/lib/src/radio/test/benchmark_radio.cc b/lib/src/radio/test/benchmark_radio.cc index 51858b0cd..d1ff0264a 100644 --- a/lib/src/radio/test/benchmark_radio.cc +++ b/lib/src/radio/test/benchmark_radio.cc @@ -244,8 +244,8 @@ int main(int argc, char** argv) int ret = SRSLTE_ERROR; radio* radio_h[SRSLTE_MAX_RADIOS] = {NULL}; srslte_timestamp_t ts_prev[SRSLTE_MAX_RADIOS], ts_rx[SRSLTE_MAX_RADIOS], ts_tx; - uint32_t nof_gaps = 0; - char filename[256] = {}; + uint32_t nof_gaps = 0; + char filename[256] = {}; srslte_filesink_t filesink[SRSLTE_MAX_RADIOS] = {}; srslte_dft_plan_t dft_plan = {}, idft_plan = {}; srslte_agc_t agc[SRSLTE_MAX_RADIOS] = {}; diff --git a/lib/src/upper/pdcp_entity_base.cc b/lib/src/upper/pdcp_entity_base.cc index 63dbc1180..3c31185db 100644 --- a/lib/src/upper/pdcp_entity_base.cc +++ b/lib/src/upper/pdcp_entity_base.cc @@ -277,7 +277,7 @@ void pdcp_entity_base::write_data_header(const srslte::unique_byte_buffer_t& sdu // Add SN switch (cfg.sn_len) { case PDCP_SN_LEN_5: - sdu->msg[0] = SN(count); // Data PDU and SN LEN 5 implies SRB, D flag must not be present + sdu->msg[0] = SN(count); // Data PDU and SN LEN 5 implies SRB, D flag must not be present break; case PDCP_SN_LEN_12: srslte::uint16_to_uint8(SN(count), sdu->msg); diff --git a/lib/src/upper/pdcp_entity_lte.cc b/lib/src/upper/pdcp_entity_lte.cc index c6f4d6dca..2742e279f 100644 --- a/lib/src/upper/pdcp_entity_lte.cc +++ b/lib/src/upper/pdcp_entity_lte.cc @@ -172,19 +172,19 @@ void pdcp_entity_lte::handle_srb_pdu(srslte::unique_byte_buffer_t pdu) log->info_hex(pdu->msg, pdu->N_bytes, "RX %s PDU", rrc->get_rb_name(lcid).c_str()); // Read recvd SN from header - uint32_t sn = read_data_header(pdu); + uint32_t sn = read_data_header(pdu); log->debug("RX SRB PDU. Next_PDCP_RX_SN %d, SN %d", next_pdcp_rx_sn, sn); // Estimate COUNT for integrity check and decryption uint32_t count; - if (sn < next_pdcp_rx_sn){ + if (sn < next_pdcp_rx_sn) { count = COUNT(rx_hfn + 1, sn); } else { count = COUNT(rx_hfn, sn); } - - // Perform decription + + // Perform decription if (do_encryption) { cipher_decrypt(&pdu->msg[cfg.hdr_len_bytes], pdu->N_bytes - cfg.hdr_len_bytes, count, &pdu->msg[cfg.hdr_len_bytes]); log->info_hex(pdu->msg, pdu->N_bytes, "RX %s PDU (decrypted)", rrc->get_rb_name(lcid).c_str()); diff --git a/lib/src/upper/pdcp_entity_nr.cc b/lib/src/upper/pdcp_entity_nr.cc index 4d0197569..1ed0e1549 100644 --- a/lib/src/upper/pdcp_entity_nr.cc +++ b/lib/src/upper/pdcp_entity_nr.cc @@ -228,7 +228,6 @@ void pdcp_entity_nr::write_pdu(unique_byte_buffer_t pdu) * Packing / Unpacking Helpers */ - // Deliver all consecutivly associated COUNTs. // Update RX_NEXT after submitting to higher layers void pdcp_entity_nr::deliver_all_consecutive_counts() diff --git a/lib/test/upper/pdcp_base_test.h b/lib/test/upper/pdcp_base_test.h index 902388786..99e747a80 100644 --- a/lib/test/upper/pdcp_base_test.h +++ b/lib/test/upper/pdcp_base_test.h @@ -109,10 +109,10 @@ public: std::string get_rb_name(uint32_t lcid) { return "None"; } - srslte::log* log; + srslte::log* log; // Members for testing - uint32_t rx_count = 0; + uint32_t rx_count = 0; srslte::unique_byte_buffer_t last_pdu; // Methods for testing diff --git a/lib/test/upper/pdcp_lte_test.h b/lib/test/upper/pdcp_lte_test.h index d51bf198f..66eb1858e 100644 --- a/lib/test/upper/pdcp_lte_test.h +++ b/lib/test/upper/pdcp_lte_test.h @@ -89,16 +89,16 @@ public: void set_pdcp_initial_state(pdcp_lte_initial_state init_state) { - pdcp.set_tx_count(init_state.tx_count); + pdcp.set_tx_count(init_state.tx_count); pdcp.set_rx_hfn(init_state.rx_hfn); pdcp.set_next_pdcp_rx_sn(init_state.next_pdcp_rx_sn); pdcp.set_last_submitted_pdcp_rx_sn(init_state.last_submitted_pdcp_rx_sn); } - rlc_dummy rlc; - rrc_dummy rrc; - gw_dummy gw; - srslte::timer_handler timers; + rlc_dummy rlc; + rrc_dummy rrc; + gw_dummy gw; + srslte::timer_handler timers; srslte::pdcp_entity_lte pdcp; }; diff --git a/lib/test/upper/pdcp_lte_test_rx.cc b/lib/test/upper/pdcp_lte_test_rx.cc index 814a8c591..e2decfaa6 100644 --- a/lib/test/upper/pdcp_lte_test_rx.cc +++ b/lib/test/upper/pdcp_lte_test_rx.cc @@ -46,7 +46,7 @@ int test_rx(std::vector events, pdcp_lte_test_helper pdcp_hlp_rx(cfg_rx, sec_cfg, log); srslte::pdcp_entity_lte* pdcp_rx = &pdcp_hlp_rx.pdcp; gw_dummy* gw_rx = &pdcp_hlp_rx.gw; - rrc_dummy* rrc_rx = &pdcp_hlp_rx.rrc; + rrc_dummy* rrc_rx = &pdcp_hlp_rx.rrc; srslte::timer_handler* timers_rx = &pdcp_hlp_rx.timers; pdcp_hlp_rx.set_pdcp_initial_state(init_state); @@ -115,7 +115,7 @@ int test_rx_all(srslte::byte_buffer_pool* pool, srslte::log* log) * This tests correct handling of HFN in the case of SN wraparound (SN LEN 12) */ { - std::vector test_counts(2); // Test two packets + std::vector test_counts(2); // Test two packets std::iota(test_counts.begin(), test_counts.end(), 4095); // Starting at COUNT 4095 std::vector test_pdus = gen_expected_pdus_vector( tst_sdu1, test_counts, srslte::PDCP_SN_LEN_12, srslte::PDCP_RB_IS_DRB, sec_cfg, pool, log);