Fixed PUSCH retransmissions for non-RRC configured rnti

master
Xavier Arteaga 7 years ago
parent efb7ad709c
commit 0ba58d8d24

@ -224,7 +224,7 @@ public:
bool read_subheader(uint8_t** ptr); bool read_subheader(uint8_t** ptr);
void read_payload(uint8_t **ptr); void read_payload(uint8_t **ptr);
uint32_t get_sdu_lcid(); uint32_t get_sdu_lcid();
uint32_t get_payload_size(); int get_payload_size();
uint32_t get_header_size(bool is_last); uint32_t get_header_size(bool is_last);
uint8_t* get_sdu_ptr(); uint8_t* get_sdu_ptr();

@ -458,7 +458,7 @@ uint32_t sch_subh::get_sdu_lcid()
{ {
return lcid; return lcid;
} }
uint32_t sch_subh::get_payload_size() int sch_subh::get_payload_size()
{ {
return nof_bytes; return nof_bytes;
} }

@ -171,7 +171,7 @@ void ue::process_pdu(uint8_t* pdu, uint32_t nof_bytes, uint32_t tstamp)
if (mac_msg_ul.get()->get_sdu_lcid() == 0) { if (mac_msg_ul.get()->get_sdu_lcid() == 0) {
uint8_t *x = mac_msg_ul.get()->get_sdu_ptr(); uint8_t *x = mac_msg_ul.get()->get_sdu_ptr();
uint32_t sum = 0; uint32_t sum = 0;
for (uint32_t i = 0; i < mac_msg_ul.get()->get_payload_size(); i++) { for (int i = 0; i < mac_msg_ul.get()->get_payload_size(); i++) {
sum += x[i]; sum += x[i];
} }
if (sum == 0) { if (sum == 0) {

@ -152,9 +152,10 @@ uint8_t phch_common::ue_db_get_ri(uint16_t rnti) {
return ret; return ret;
} }
void phch_common::ue_db_set_last_ul_mod(uint16_t rnti, uint32_t tti, srslte_mod_t mcs) { void phch_common::ue_db_set_last_ul_mod(uint16_t rnti, uint32_t tti, srslte_mod_t mcs) {
if (common_ue_db.count(rnti)) { if (!common_ue_db.count(rnti)) {
common_ue_db[rnti].last_ul_mod[TTI_RX(tti)%(2*HARQ_DELAY_MS)] = mcs; ue_db_add_rnti(rnti);
} }
common_ue_db[rnti].last_ul_mod[TTI_RX(tti)%(2*HARQ_DELAY_MS)] = mcs;
} }
srslte_mod_t phch_common::ue_db_get_last_ul_mod(uint16_t rnti, uint32_t tti) { srslte_mod_t phch_common::ue_db_get_last_ul_mod(uint16_t rnti, uint32_t tti) {
srslte_mod_t ret = SRSLTE_MOD_BPSK; srslte_mod_t ret = SRSLTE_MOD_BPSK;
@ -164,12 +165,13 @@ srslte_mod_t phch_common::ue_db_get_last_ul_mod(uint16_t rnti, uint32_t tti) {
return ret; return ret;
} }
void phch_common::ue_db_set_last_ul_tbs(uint16_t rnti, uint32_t tti, int tbs) { void phch_common::ue_db_set_last_ul_tbs(uint16_t rnti, uint32_t tti, int tbs) {
if (common_ue_db.count(rnti)) { if (!common_ue_db.count(rnti)) {
common_ue_db[rnti].last_ul_tbs[TTI_RX(tti)%(2*HARQ_DELAY_MS)] = tbs; ue_db_add_rnti(rnti);
} }
common_ue_db[rnti].last_ul_tbs[TTI_RX(tti)%(2*HARQ_DELAY_MS)] = tbs;
} }
int phch_common::ue_db_get_last_ul_tbs(uint16_t rnti, uint32_t tti) { int phch_common::ue_db_get_last_ul_tbs(uint16_t rnti, uint32_t tti) {
int ret = 0; int ret = -1;
if (common_ue_db.count(rnti)) { if (common_ue_db.count(rnti)) {
ret = common_ue_db[rnti].last_ul_tbs[TTI_RX(tti)%(2*HARQ_DELAY_MS)]; ret = common_ue_db[rnti].last_ul_tbs[TTI_RX(tti)%(2*HARQ_DELAY_MS)];
} }

Loading…
Cancel
Save