Commit 401eb087 authored by heshanyun's avatar heshanyun Committed by Haruki NAOI

treat DTX as ACK, don not resend the dl if DTX is received

(cherry picked from commit b54fe7e4e3b878e1293dfaf1b1b89d0f1f8b305f)

# Conflicts:
#	openair2/LAYER2/MAC/eNB_scheduler_primitives.c
parent 415c6b71
......@@ -1864,7 +1864,7 @@ void fill_uci_harq_indication (PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci, int frame, i
}
pdu->harq_indication_fdd_rel13.harq_tb_n[0] = harq_ack[0];
// release DLSCH if needed
release_harq(eNB,UE_id,0,frame,subframe,0xffff, harq_ack[0] == 1);
release_harq(eNB,UE_id,0,frame,subframe,0xffff, harq_ack[0] == 1 || harq_ack[0] == 4);
} else if (uci->pucch_fmt == pucch_format1b) {
pdu->harq_indication_fdd_rel13.tl.tag = NFAPI_HARQ_INDICATION_FDD_REL13_TAG;
pdu->harq_indication_fdd_rel13.mode = 0;
......@@ -1881,8 +1881,8 @@ void fill_uci_harq_indication (PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci, int frame, i
pdu->harq_indication_fdd_rel13.harq_tb_n[0] = harq_ack[0];
pdu->harq_indication_fdd_rel13.harq_tb_n[1] = harq_ack[1];
// release DLSCH if needed
release_harq(eNB,UE_id,0,frame,subframe,0xffff, harq_ack[0] == 1);
release_harq(eNB,UE_id,1,frame,subframe,0xffff, harq_ack[1] == 1);
release_harq(eNB,UE_id,0,frame,subframe,0xffff, harq_ack[0] == 1 || harq_ack[0] == 4);
release_harq(eNB,UE_id,1,frame,subframe,0xffff, harq_ack[1] == 1 || harq_ack[0] == 4);
} else {
LOG_E(PHY,"only format 1a/b for now, received %d\n",uci->pucch_fmt);
return;
......@@ -1909,7 +1909,7 @@ void fill_uci_harq_indication (PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci, int frame, i
}
pdu->harq_indication_tdd_rel13.harq_data[0].bundling.value_0 = harq_ack[0];
// release all bundled DLSCH if needed
release_harq(eNB,UE_id,0,frame,subframe,0xffff, harq_ack[0] == 1);
release_harq(eNB,UE_id,0,frame,subframe,0xffff, harq_ack[0] == 1 || harq_ack[0] == 4);
} else if (uci->pucch_fmt == pucch_format1b) {
pdu->harq_indication_tdd_rel13.number_of_ack_nack = 2;
if (harq_ack[0] != 1 && harq_ack[0] != 2 && harq_ack[0] != 4) {
......@@ -1924,8 +1924,8 @@ void fill_uci_harq_indication (PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci, int frame, i
pdu->harq_indication_tdd_rel13.harq_data[0].bundling.value_0 = harq_ack[0];
pdu->harq_indication_tdd_rel13.harq_data[1].bundling.value_0 = harq_ack[1];
// release all DLSCH if needed
release_harq(eNB,UE_id,0,frame,subframe,0xffff, harq_ack[0] == 1);
release_harq(eNB,UE_id,1,frame,subframe,0xffff, harq_ack[1] == 1);
release_harq(eNB,UE_id,0,frame,subframe,0xffff, harq_ack[0] == 1 || harq_ack[0] == 4);
release_harq(eNB,UE_id,1,frame,subframe,0xffff, harq_ack[1] == 1 || harq_ack[0] == 4);
}
break;
......@@ -1945,7 +1945,7 @@ void fill_uci_harq_indication (PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci, int frame, i
}
pdu->harq_indication_tdd_rel13.harq_data[0].multiplex.value_0 = harq_ack[0];
// release all DLSCH if needed
release_harq(eNB,UE_id,0,frame,subframe,0xffff, harq_ack[0] == 1);
release_harq(eNB,UE_id,0,frame,subframe,0xffff, harq_ack[0] == 1 || harq_ack[0] == 4);
} else if (uci->num_pucch_resources == 1 && uci->pucch_fmt == pucch_format1b) {
pdu->harq_indication_tdd_rel13.tl.tag = NFAPI_HARQ_INDICATION_TDD_REL13_TAG;
pdu->harq_indication_tdd_rel13.number_of_ack_nack = 2;
......@@ -1960,8 +1960,8 @@ void fill_uci_harq_indication (PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci, int frame, i
pdu->harq_indication_tdd_rel13.harq_data[0].multiplex.value_0 = harq_ack[0];
pdu->harq_indication_tdd_rel13.harq_data[1].multiplex.value_0 = harq_ack[1];
// release all DLSCH if needed
release_harq(eNB,UE_id,0,frame,subframe,0xffff, harq_ack[0] == 1);
release_harq(eNB,UE_id,1,frame,subframe,0xffff, harq_ack[1] == 1);
release_harq(eNB,UE_id,0,frame,subframe,0xffff, harq_ack[0] == 1 || harq_ack[0] == 4);
release_harq(eNB,UE_id,1,frame,subframe,0xffff, harq_ack[1] == 1 || harq_ack[0] == 4);
} else { // num_pucch_resources (M) > 1
pdu->harq_indication_tdd_rel13.tl.tag = NFAPI_HARQ_INDICATION_TDD_REL13_TAG;
pdu->harq_indication_tdd_rel13.number_of_ack_nack = uci->num_pucch_resources;
......
......@@ -4726,7 +4726,7 @@ extract_harq(module_id_t mod_idP,
RA_t *ra = &RC.mac[mod_idP]->common_channels[CC_idP].ra[0];
if(num_ack_nak==1){
if(harq_indication_tdd->harq_data[0].bundling.value_0==1){ //ack
if(harq_indication_tdd->harq_data[0].bundling.value_0==1 || harq_indication_tdd->harq_data[0].bundling.value_0==4){ //ack
sched_ctl->round[CC_idP][harq_pid][TB1] = 8; // release HARQ process
sched_ctl->tbcnt[CC_idP][harq_pid] = 0;
LOG_D(MAC,"frame %u subframe %u Acking (%d,%u) harq_pid %hhu round %hhu\n",frameP,subframeP,frame_tx,subframe_tx,harq_pid,sched_ctl->round[CC_idP][harq_pid][TB1]);
......@@ -4767,15 +4767,15 @@ extract_harq(module_id_t mod_idP,
}else{
if( (num_ack_nak==2)
&& (harq_indication_tdd->harq_data[select_tb].bundling.value_0==1)
&& (harq_indication_tdd->harq_data[oppose_tb].bundling.value_0==1)){
&& ((harq_indication_tdd->harq_data[select_tb].bundling.value_0==1) || (harq_indication_tdd->harq_data[select_tb].bundling.value_0==4))
&& ((harq_indication_tdd->harq_data[oppose_tb].bundling.value_0==1) || (harq_indication_tdd->harq_data[oppose_tb].bundling.value_0==4))){
sched_ctl->round[CC_idP][harq_pid][select_tb] = 8;
sched_ctl->round[CC_idP][harq_pid][oppose_tb] = 8;
sched_ctl->rsn[CC_idP][harq_pid][select_tb] = 0;
sched_ctl->rsn[CC_idP][harq_pid][oppose_tb] = 0;
}else if( (num_ack_nak==2)
&& ((harq_indication_tdd->harq_data[select_tb].bundling.value_0==2) || (harq_indication_tdd->harq_data[select_tb].bundling.value_0==4))
&& ((harq_indication_tdd->harq_data[oppose_tb].bundling.value_0==2) || (harq_indication_tdd->harq_data[oppose_tb].bundling.value_0==4))){
&& (harq_indication_tdd->harq_data[select_tb].bundling.value_0==2)
&& (harq_indication_tdd->harq_data[oppose_tb].bundling.value_0==2)){
//sched_ctl->round[CC_idP][harq_pid][select_tb]++;
//sched_ctl->round[CC_idP][harq_pid][oppose_tb]++;
//sched_ctl->rsn[CC_idP][harq_pid][select_tb]++;
......@@ -4832,11 +4832,11 @@ extract_harq(module_id_t mod_idP,
sched_ctl->rsn[CC_idP][harq_pid][select_tb] = 0;
}
}else if( (num_ack_nak==1)
&& (harq_indication_tdd->harq_data[TB1].bundling.value_0==1)){
&& ((harq_indication_tdd->harq_data[TB1].bundling.value_0==1) || (harq_indication_tdd->harq_data[TB1].bundling.value_0==4))){
sched_ctl->round[CC_idP][harq_pid][swap_flg] = 8;
sched_ctl->rsn[CC_idP][harq_pid][swap_flg] = 0;
}else if( (num_ack_nak==1)
&& ((harq_indication_tdd->harq_data[TB1].bundling.value_0==2) || (harq_indication_tdd->harq_data[TB1].bundling.value_0==4))){
&& (harq_indication_tdd->harq_data[TB1].bundling.value_0==2)){
sched_ctl->round[CC_idP][harq_pid][swap_flg]++;
sched_ctl->rsn[CC_idP][harq_pid][swap_flg]++;
......@@ -4972,14 +4972,14 @@ extract_harq(module_id_t mod_idP,
LOG_D(MAC, "In extract_harq(): pdu[0] = %d for harq_pid = %d\n", pdu[0], harq_pid);
if (pdu[0] == 1) { // ACK
if (pdu[0] == 1 || pdu[0] == 4) { // ACK(treat DTX as ACK)
sched_ctl->round[CC_idP][harq_pid][TB1] = 8; // release HARQ process
sched_ctl->tbcnt[CC_idP][harq_pid] = 0;
/* CDRX: PUCCH gives an ACK, so reset corresponding HARQ RTT */
sched_ctl->harq_rtt_timer[CC_idP][harq_pid] = 0;
} else if (pdu[0] == 2 || pdu[0] == 4) { // NAK (treat DTX as NAK)
} else if (pdu[0] == 2) { // NAK
sched_ctl->round[CC_idP][harq_pid][TB1]++; // increment round
if (sched_ctl->round[CC_idP][harq_pid][TB1] == 4) {
......@@ -5015,7 +5015,7 @@ extract_harq(module_id_t mod_idP,
if ((num_ack_nak == 2)
&& (sched_ctl->round[CC_idP][harq_pid][select_tb] < 8)
&& (sched_ctl->round[CC_idP][harq_pid][oppose_tb] < 8)
&& (pdu[select_tb] == 1) && (pdu[oppose_tb] == 1)) {
&& ((pdu[select_tb] == 1) || (pdu[select_tb] == 4)) && ((pdu[oppose_tb] == 1) || (pdu[oppose_tb] == 4))) {
sched_ctl->round[CC_idP][harq_pid][select_tb] = 8;
sched_ctl->round[CC_idP][harq_pid][oppose_tb] = 8;
sched_ctl->rsn[CC_idP][harq_pid][select_tb] = 0;
......@@ -5027,8 +5027,8 @@ extract_harq(module_id_t mod_idP,
} else if ((num_ack_nak == 2)
&& (sched_ctl->round[CC_idP][harq_pid][select_tb] < 8)
&& (sched_ctl->round[CC_idP][harq_pid][oppose_tb] < 8)
&& ((pdu[select_tb] == 2) || (pdu[select_tb] == 4))
&& ((pdu[oppose_tb] == 2) || (pdu[oppose_tb] == 4))) {
&& (pdu[select_tb] == 2)
&& (pdu[oppose_tb] == 2)) {
sched_ctl->round[CC_idP][harq_pid][select_tb]++;
sched_ctl->round[CC_idP][harq_pid][oppose_tb]++;
sched_ctl->rsn[CC_idP][harq_pid][select_tb]++;
......@@ -5086,11 +5086,11 @@ extract_harq(module_id_t mod_idP,
/* CDRX: PUCCH gives an NACK and max number of repetitions reached so reset corresponding HARQ RTT */
sched_ctl->harq_rtt_timer[CC_idP][harq_pid] = 0;
}
} else if( (num_ack_nak == 1) && (pdu[TB1] == 1) ){ // ACK
} else if( (num_ack_nak == 1) && ((pdu[TB1] == 1) || (pdu[TB1] == 4))){ // ACK(treat DTX as ACK)
sched_ctl->round[CC_idP][harq_pid][swap_flg] = 8; // release HARQ process
sched_ctl->rsn[CC_idP][harq_pid][swap_flg] = 0;
} else if( (num_ack_nak == 1)
&& (pdu[TB1] == 2 || pdu[TB1] == 4)) { // NAK (treat DTX as NAK)
&& (pdu[TB1] == 2)) { // NAK
sched_ctl->round[CC_idP][harq_pid][swap_flg]++; // increment round
sched_ctl->rsn[CC_idP][harq_pid][swap_flg]++;
......
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