Remove write-only or unused variables
This commit is contained in:
@@ -326,7 +326,7 @@ static uint32_t update_dlsch_buffer(frame_t frame, slot_t slot, NR_UE_info_t *UE
|
|||||||
{
|
{
|
||||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
|
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
|
||||||
sched_ctrl->num_total_bytes = 0;
|
sched_ctrl->num_total_bytes = 0;
|
||||||
sched_ctrl->dl_pdus_total = 0;
|
int dl_pdus_total = 0;
|
||||||
|
|
||||||
logical_chan_id_t ch[NR_MAX_NUM_LCID] = {0};
|
logical_chan_id_t ch[NR_MAX_NUM_LCID] = {0};
|
||||||
int n = 0;
|
int n = 0;
|
||||||
@@ -350,7 +350,7 @@ static uint32_t update_dlsch_buffer(frame_t frame, slot_t slot, NR_UE_info_t *UE
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
sched_ctrl->rlc_status[lcid] = ret[i];
|
sched_ctrl->rlc_status[lcid] = ret[i];
|
||||||
sched_ctrl->dl_pdus_total += sched_ctrl->rlc_status[lcid].pdus_in_buffer;
|
dl_pdus_total += sched_ctrl->rlc_status[lcid].pdus_in_buffer;
|
||||||
sched_ctrl->num_total_bytes += sched_ctrl->rlc_status[lcid].bytes_in_buffer;
|
sched_ctrl->num_total_bytes += sched_ctrl->rlc_status[lcid].bytes_in_buffer;
|
||||||
LOG_D(MAC,
|
LOG_D(MAC,
|
||||||
"%4d.%2d UE %04x LCID %d status: %d bytes, %d PDUs, total buffer %d bytes %d PDUs\n",
|
"%4d.%2d UE %04x LCID %d status: %d bytes, %d PDUs, total buffer %d bytes %d PDUs\n",
|
||||||
@@ -361,7 +361,7 @@ static uint32_t update_dlsch_buffer(frame_t frame, slot_t slot, NR_UE_info_t *UE
|
|||||||
ret[i].bytes_in_buffer,
|
ret[i].bytes_in_buffer,
|
||||||
ret[i].pdus_in_buffer,
|
ret[i].pdus_in_buffer,
|
||||||
sched_ctrl->num_total_bytes,
|
sched_ctrl->num_total_bytes,
|
||||||
sched_ctrl->dl_pdus_total);
|
dl_pdus_total);
|
||||||
}
|
}
|
||||||
return sched_ctrl->num_total_bytes;
|
return sched_ctrl->num_total_bytes;
|
||||||
}
|
}
|
||||||
@@ -914,7 +914,6 @@ static void pf_dl(gNB_MAC_INST *mac,
|
|||||||
// (for 4 PDUs) and optionally + 2 for TA. Once RLC gives the number of
|
// (for 4 PDUs) and optionally + 2 for TA. Once RLC gives the number of
|
||||||
// PDUs, we replace with 3 * numPDUs
|
// PDUs, we replace with 3 * numPDUs
|
||||||
const int oh = 3 * 4 + (sched_ctrl->ta_apply ? 2 : 0);
|
const int oh = 3 * 4 + (sched_ctrl->ta_apply ? 2 : 0);
|
||||||
//const int oh = 3 * sched_ctrl->dl_pdus_total + (sched_ctrl->ta_apply ? 2 : 0);
|
|
||||||
nr_find_nb_rb(sched_pdsch.Qm,
|
nr_find_nb_rb(sched_pdsch.Qm,
|
||||||
sched_pdsch.R,
|
sched_pdsch.R,
|
||||||
1, // no transform precoding for DL
|
1, // no transform precoding for DL
|
||||||
|
|||||||
@@ -568,7 +568,6 @@ static int nr_process_mac_pdu(instance_t module_idP,
|
|||||||
sched_pusch->dmrs_info.num_dmrs_symb * sched_pusch->dmrs_info.N_PRB_DMRS, // n_dmrs
|
sched_pusch->dmrs_info.num_dmrs_symb * sched_pusch->dmrs_info.N_PRB_DMRS, // n_dmrs
|
||||||
deltaMCS,
|
deltaMCS,
|
||||||
true);
|
true);
|
||||||
sched_ctrl->ph0 = PH;
|
|
||||||
/* 38.133 Table10.1.18.1-1 */
|
/* 38.133 Table10.1.18.1-1 */
|
||||||
sched_ctrl->pcmax = PCMAX - 29;
|
sched_ctrl->pcmax = PCMAX - 29;
|
||||||
LOG_D(NR_MAC,
|
LOG_D(NR_MAC,
|
||||||
@@ -856,7 +855,6 @@ static void nr_rx_ra_sdu(const module_id_t mod_id,
|
|||||||
}
|
}
|
||||||
if (timing_advance != 0xffff)
|
if (timing_advance != 0xffff)
|
||||||
UE_scheduling_control->ta_update = timing_advance;
|
UE_scheduling_control->ta_update = timing_advance;
|
||||||
UE_scheduling_control->raw_rssi = rssi;
|
|
||||||
LOG_D(NR_MAC, "[UE %04x] PUSCH TPC %d and TA %d\n", UE->rnti, UE_scheduling_control->tpc0, UE_scheduling_control->ta_update);
|
LOG_D(NR_MAC, "[UE %04x] PUSCH TPC %d and TA %d\n", UE->rnti, UE_scheduling_control->tpc0, UE_scheduling_control->ta_update);
|
||||||
|
|
||||||
LOG_D(NR_MAC, "[RAPROC] Received %s:\n", ra->ra_type == RA_2_STEP ? "MsgA-PUSCH" : "Msg3");
|
LOG_D(NR_MAC, "[RAPROC] Received %s:\n", ra->ra_type == RA_2_STEP ? "MsgA-PUSCH" : "Msg3");
|
||||||
@@ -987,7 +985,6 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP,
|
|||||||
|
|
||||||
if (timing_advance != 0xffff)
|
if (timing_advance != 0xffff)
|
||||||
UE_scheduling_control->ta_update = timing_advance;
|
UE_scheduling_control->ta_update = timing_advance;
|
||||||
UE_scheduling_control->raw_rssi = rssi;
|
|
||||||
UE_scheduling_control->pusch_snrx10 = ul_cqi * 5 - 640 - (txpower_calc * 10);
|
UE_scheduling_control->pusch_snrx10 = ul_cqi * 5 - 640 - (txpower_calc * 10);
|
||||||
if (UE_scheduling_control->tpc0 > 1)
|
if (UE_scheduling_control->tpc0 > 1)
|
||||||
LOG_D(NR_MAC,
|
LOG_D(NR_MAC,
|
||||||
@@ -998,7 +995,7 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP,
|
|||||||
UE_scheduling_control->tpc0,
|
UE_scheduling_control->tpc0,
|
||||||
UE_scheduling_control->ta_update,
|
UE_scheduling_control->ta_update,
|
||||||
UE_scheduling_control->pusch_snrx10,
|
UE_scheduling_control->pusch_snrx10,
|
||||||
UE_scheduling_control->raw_rssi,
|
rssi,
|
||||||
txpower_calc,
|
txpower_calc,
|
||||||
UE_scheduling_control->ph,
|
UE_scheduling_control->ph,
|
||||||
UE_scheduling_control->ul_harq_processes[harq_pid].sched_pusch.mcs,
|
UE_scheduling_control->ul_harq_processes[harq_pid].sched_pusch.mcs,
|
||||||
|
|||||||
@@ -628,8 +628,6 @@ typedef struct {
|
|||||||
|
|
||||||
/// PHR info: power headroom level (dB)
|
/// PHR info: power headroom level (dB)
|
||||||
int ph;
|
int ph;
|
||||||
/// PHR info: power headroom level (dB) for 1 PRB
|
|
||||||
int ph0;
|
|
||||||
|
|
||||||
/// PHR info: nominal UE transmit power levels (dBm)
|
/// PHR info: nominal UE transmit power levels (dBm)
|
||||||
int pcmax;
|
int pcmax;
|
||||||
@@ -643,7 +641,6 @@ typedef struct {
|
|||||||
|
|
||||||
/// total amount of data awaiting for this UE
|
/// total amount of data awaiting for this UE
|
||||||
uint32_t num_total_bytes;
|
uint32_t num_total_bytes;
|
||||||
uint16_t dl_pdus_total;
|
|
||||||
/// per-LC status data
|
/// per-LC status data
|
||||||
mac_rlc_status_resp_t rlc_status[NR_MAX_NUM_LCID];
|
mac_rlc_status_resp_t rlc_status[NR_MAX_NUM_LCID];
|
||||||
|
|
||||||
@@ -656,10 +653,8 @@ typedef struct {
|
|||||||
bool ta_apply;
|
bool ta_apply;
|
||||||
uint8_t tpc0;
|
uint8_t tpc0;
|
||||||
uint8_t tpc1;
|
uint8_t tpc1;
|
||||||
int raw_rssi;
|
|
||||||
int pusch_snrx10;
|
int pusch_snrx10;
|
||||||
int pucch_snrx10;
|
int pucch_snrx10;
|
||||||
uint16_t ul_rssi;
|
|
||||||
int pusch_consecutive_dtx_cnt;
|
int pusch_consecutive_dtx_cnt;
|
||||||
int pucch_consecutive_dtx_cnt;
|
int pucch_consecutive_dtx_cnt;
|
||||||
bool ul_failure;
|
bool ul_failure;
|
||||||
|
|||||||
Reference in New Issue
Block a user