Skip to content

Refactor UL MAC PDU decoding

Luis Pereira requested to merge Refactor_UL_MAC_PDU_decoding into develop

Refactor the UL MAC PDU decoding: A single function is created to decode the entire MAC subheader uint8_t decode_ul_mac_sub_pdu_header(uint8_t *pduP, uint8_t *lcid, uint16_t *length). It returns the length of the MAC subheader and outputs the LCID and Length).

This new function is called from 2 functions: lcid_crnti_lookahead() and nr_process_mac_pdu()

After calling it in nr_process_mac_pdu(), the validation of the PDU can be made for all the MAC subPDUs in a single place, allowing for less and more clean code (as opposed with the previous version where the validation was made multiple times inside the LCID switch-case)

Additionally, this MR updates the list of LCIDs as in 3GPP TS 38.321 v18.3.0 Table 6.2.1-2: Values of LCID for UL-SCH when the LX field is not present or is set to 0

Edited by Robert Schmidt

Merge request reports

Loading