Commit d6df3bd3 authored by Robert Schmidt's avatar Robert Schmidt

nrUE: send padding byte before random data in TB

Note: in the DL, we do the same
parent 9f719696
......@@ -909,10 +909,9 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
//and block this traffic from being forwarded to the upper layers at the gNB
LOG_D(PHY, "In %s: Random data to be transmitted: TBS_bytes %d \n", __FUNCTION__, TBS_bytes);
//Give the first byte a dummy value (a value not corresponding to any valid LCID based on 38.321, Table 6.2.1-2)
//in order to distinguish the PHY random packets at the MAC layer of the gNB receiver from the normal packets that should
//have a valid LCID (nr_process_mac_pdu function)
ulsch_input_buffer[0] = 0x31;
// Make the first byte padding so that gNB ignores the PHY random
// data in the TB for the PHY at the MAC layer
ulsch_input_buffer[0] = UL_SCH_LCID_PADDING;
for (int i = 1; i < TBS_bytes; i++) {
ulsch_input_buffer[i] = (unsigned char) rand();
......
......@@ -298,7 +298,7 @@ void nr_process_mac_pdu(module_id_t module_idP,
break;
default:
LOG_D(MAC, "Received unknown MAC header (LCID = 0x%02x)\n", rx_lcid);
LOG_E(MAC, "Received unknown MAC header (LCID = 0x%02x)\n", rx_lcid);
return;
break;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment