summaryrefslogtreecommitdiff
path: root/lib/src
diff options
context:
space:
mode:
Diffstat (limited to 'lib/src')
-rw-r--r--lib/src/asn1/rrc_nr_utils.cc4
-rw-r--r--lib/src/mac/mac_rar_pdu_nr.cc8
2 files changed, 9 insertions, 3 deletions
diff --git a/lib/src/asn1/rrc_nr_utils.cc b/lib/src/asn1/rrc_nr_utils.cc
index b2f9d104f..d552d890b 100644
--- a/lib/src/asn1/rrc_nr_utils.cc
+++ b/lib/src/asn1/rrc_nr_utils.cc
@@ -106,6 +106,10 @@ void make_mac_rach_cfg(const rach_cfg_common_s& asn1_type, rach_cfg_nr_t* rach_c
rach_cfg_nr->PreambleReceivedTargetPower = asn1_type.rach_cfg_generic.preamb_rx_target_pwr;
rach_cfg_nr->preambleTransMax = asn1_type.rach_cfg_generic.preamb_trans_max.to_number();
rach_cfg_nr->ra_ContentionResolutionTimer = asn1_type.ra_contention_resolution_timer.to_number();
+
+ if (asn1_type.total_nof_ra_preambs_present) {
+ rach_cfg_nr->nof_preambles = asn1_type.total_nof_ra_preambs;
+ }
};
int make_rlc_config_t(const rlc_cfg_c& asn1_type, uint8_t bearer_id, rlc_config_t* cfg_out)
diff --git a/lib/src/mac/mac_rar_pdu_nr.cc b/lib/src/mac/mac_rar_pdu_nr.cc
index ecfd05641..507422730 100644
--- a/lib/src/mac/mac_rar_pdu_nr.cc
+++ b/lib/src/mac/mac_rar_pdu_nr.cc
@@ -290,22 +290,24 @@ bool mac_rar_pdu_nr::unpack(const uint8_t* payload, const uint32_t& len)
bool ret = false;
bool have_more_subpdus = false;
uint32_t offset = 0;
+ bool success = false;
remaining_len = len;
do {
mac_rar_subpdu_nr rar_subpdu(this);
- ret = rar_subpdu.read_subpdu(payload + offset);
+ success = rar_subpdu.read_subpdu(payload + offset);
have_more_subpdus = rar_subpdu.has_more_subpdus();
offset += rar_subpdu.get_total_length();
remaining_len -= rar_subpdu.get_total_length();
// only append if subPDU could be read successfully
- if (ret == true) {
+ if (success == true) {
subpdus.push_back(rar_subpdu);
}
+ ret |= success;
// continue reading as long as subPDUs can be extracted ok and we are not overrunning the PDU length
- } while (ret && have_more_subpdus && offset <= len);
+ } while (success && have_more_subpdus && offset <= len);
return ret;
}