Commit b77f026f authored by laurent's avatar laurent

fix CI warnings

parent e1869e38
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include <unistd.h> #include <unistd.h>
nfapi_pnf_config_t *nfapi_pnf_config_create() { nfapi_pnf_config_t *nfapi_pnf_config_create() {
static pnf_t *_this==NULL; static pnf_t *_this=NULL;
if (_this) if (_this)
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s: called twice\n", __FUNCTION__); NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s: called twice\n", __FUNCTION__);
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#define FAPI2_IP_DSCP 0 #define FAPI2_IP_DSCP 0
nfapi_vnf_p7_config_t *nfapi_vnf_p7_config_create() { nfapi_vnf_p7_config_t *nfapi_vnf_p7_config_create() {
static vnf_p7_t *_this==NULL; static vnf_p7_t *_this=NULL;
if (_this) if (_this)
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s: called twice\n", __FUNCTION__); NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s: called twice\n", __FUNCTION__);
......
...@@ -48,17 +48,13 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -48,17 +48,13 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
int G, int G,
uint8_t q, uint8_t q,
uint16_t frame, uint16_t frame,
uint8_t Ns) uint8_t Ns) {
{
int n; int n;
// uint8_t reset; // uint8_t reset;
uint32_t x1, x2, s=0; uint32_t x1, x2, s=0;
uint8_t *dlsch_e=dlsch->harq_processes[harq_pid]->e; uint8_t *dlsch_e=dlsch->harq_processes[harq_pid]->e;
uint8_t *e=dlsch_e; uint8_t *e=dlsch_e;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING, VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING, VCD_FUNCTION_IN);
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
// Rule for accumulation of subframes for BL/CE UEs // Rule for accumulation of subframes for BL/CE UEs
uint8_t Nacc=4; uint8_t Nacc=4;
...@@ -69,28 +65,34 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -69,28 +65,34 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
#else #else
uint16_t i0 = dlsch->i0; uint16_t i0 = dlsch->i0;
#endif #endif
#ifdef PHY_TX_THREAD #ifdef PHY_TX_THREAD
if (dlsch->harq_processes[harq_pid]->sib1_br_flag==1) Nacc=1; if (dlsch->harq_processes[harq_pid]->sib1_br_flag==1) Nacc=1;
#else #else
if (dlsch->sib1_br_flag==1) Nacc=1; if (dlsch->sib1_br_flag==1) Nacc=1;
#endif #endif
else if (dlsch->rnti == 0xFFFF || dlsch->rnti == 0xFFFE) Nacc = (frame_parms->frame_type == TDD) ? 10 : 4; else if (dlsch->rnti == 0xFFFF || dlsch->rnti == 0xFFFE) Nacc = (frame_parms->frame_type == TDD) ? 10 : 4;
#ifdef PHY_TX_THREAD #ifdef PHY_TX_THREAD
// Note: above SC-RNTI will also have to be added when/if implemented // Note: above SC-RNTI will also have to be added when/if implemented
else if (dlsch->harq_processes[harq_pid]->CEmode == CEmodeA) Nacc=1; else if (dlsch->harq_processes[harq_pid]->CEmode == CEmodeA) Nacc=1;
else if (dlsch->harq_processes[harq_pid]->CEmode == CEmodeB) Nacc = (frame_parms->frame_type == TDD) ? 10 : 4; else if (dlsch->harq_processes[harq_pid]->CEmode == CEmodeB) Nacc = (frame_parms->frame_type == TDD) ? 10 : 4;
#else #else
// Note: above SC-RNTI will also have to be added when/if implemented // Note: above SC-RNTI will also have to be added when/if implemented
else if (dlsch->CEmode == CEmodeA) Nacc=1; else if (dlsch->CEmode == CEmodeA) Nacc=1;
else if (dlsch->CEmode == CEmodeB) Nacc = (frame_parms->frame_type == TDD) ? 10 : 4; else if (dlsch->CEmode == CEmodeB) Nacc = (frame_parms->frame_type == TDD) ? 10 : 4;
#endif #endif
if (frame_parms->frame_type == FDD || Nacc == 1) idelta = 0; if (frame_parms->frame_type == FDD || Nacc == 1) idelta = 0;
else idelta = Nacc-2; else idelta = Nacc-2;
j0 = (i0+idelta)/Nacc; j0 = (i0+idelta)/Nacc;
j = (i - i0)/Nacc; j = (i - i0)/Nacc;
#endif #endif
// reset = 1; // reset = 1;
...@@ -98,17 +100,19 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -98,17 +100,19 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
if (mbsfn_flag == 0) { if (mbsfn_flag == 0) {
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#ifdef PHY_TX_THREAD #ifdef PHY_TX_THREAD
if (dlsch->harq_processes[harq_pid]->i0 != 0xFFFF) { if (dlsch->harq_processes[harq_pid]->i0 != 0xFFFF) {
#else #else
if (dlsch->i0 != 0xFFFF) { if (dlsch->i0 != 0xFFFF) {
#endif #endif
// rule for BL/CE UEs from Section 6.3.1 in 36.211 // rule for BL/CE UEs from Section 6.3.1 in 36.211
x2= (dlsch->rnti<<14) + (q<<13) + ((((j0+j)*Nacc)%10)<<9) + frame_parms->Nid_cell; x2= (dlsch->rnti<<14) + (q<<13) + ((((j0+j)*Nacc)%10)<<9) + frame_parms->Nid_cell;
if ((frame&1023) < 200) LOG_D(PHY,"Scrambling init for (i0 %d, i %d, j0 %d, j %d, Nacc %d) => x2 %d\n",i0,i,j0,j,Nacc,x2); if ((frame&1023) < 200) LOG_D(PHY,"Scrambling init for (i0 %d, i %d, j0 %d, j %d, Nacc %d) => x2 %d\n",i0,i,j0,j,Nacc,x2);
} } else
else
#endif #endif
x2 = (dlsch->rnti<<14) + (q<<13) + ((Ns>>1)<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.3.1 for PDSCH x2 = (dlsch->rnti<<14) + (q<<13) + ((Ns>>1)<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.3.1 for PDSCH
} else { } else {
x2 = ((Ns>>1)<<9) + frame_parms->Nid_cell_mbsfn; //this is c_init in 36.211 Sec 6.3.1 for PMCH x2 = ((Ns>>1)<<9) + frame_parms->Nid_cell_mbsfn; //this is c_init in 36.211 Sec 6.3.1 for PMCH
} }
...@@ -123,68 +127,61 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -123,68 +127,61 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
s = lte_gold_generic(&x1, &x2, 1); s = lte_gold_generic(&x1, &x2, 1);
for (n=0; n<(1+(G>>5)); n++) { for (n=0; n<(1+(G>>5)); n++) {
#ifdef DEBUG_SCRAMBLING #ifdef DEBUG_SCRAMBLING
for (int k=0;k<32;k++) printf("scrambling %d : %u xor %d = %u\n",k+(n<<5),e[k],(s>>k)&1,e[k]^((s>>k)&1));
#endif
for (int k=0; k<32; k++) printf("scrambling %d : %u xor %d = %u\n",k+(n<<5),e[k],(s>>k)&1,e[k]^((s>>k)&1));
e[0] = (e[0]) ^ (s&1);
e[1] = (e[1]) ^ ((s>>1)&1); #endif
e[2] = (e[2]) ^ ((s>>2)&1); e[0] = (e[0]) ^ (s&1);
e[3] = (e[3]) ^ ((s>>3)&1); e[1] = (e[1]) ^ ((s>>1)&1);
e[4] = (e[4]) ^ ((s>>4)&1); e[2] = (e[2]) ^ ((s>>2)&1);
e[5] = (e[5]) ^ ((s>>5)&1); e[3] = (e[3]) ^ ((s>>3)&1);
e[6] = (e[6]) ^ ((s>>6)&1); e[4] = (e[4]) ^ ((s>>4)&1);
e[7] = (e[7]) ^ ((s>>7)&1); e[5] = (e[5]) ^ ((s>>5)&1);
e[8] = (e[8]) ^ ((s>>8)&1); e[6] = (e[6]) ^ ((s>>6)&1);
e[9] = (e[9]) ^ ((s>>9)&1); e[7] = (e[7]) ^ ((s>>7)&1);
e[10] = (e[10]) ^ ((s>>10)&1); e[8] = (e[8]) ^ ((s>>8)&1);
e[11] = (e[11]) ^ ((s>>11)&1); e[9] = (e[9]) ^ ((s>>9)&1);
e[12] = (e[12]) ^ ((s>>12)&1); e[10] = (e[10]) ^ ((s>>10)&1);
e[13] = (e[13]) ^ ((s>>13)&1); e[11] = (e[11]) ^ ((s>>11)&1);
e[14] = (e[14]) ^ ((s>>14)&1); e[12] = (e[12]) ^ ((s>>12)&1);
e[15] = (e[15]) ^ ((s>>15)&1); e[13] = (e[13]) ^ ((s>>13)&1);
e[16] = (e[16]) ^ ((s>>16)&1); e[14] = (e[14]) ^ ((s>>14)&1);
e[17] = (e[17]) ^ ((s>>17)&1); e[15] = (e[15]) ^ ((s>>15)&1);
e[18] = (e[18]) ^ ((s>>18)&1); e[16] = (e[16]) ^ ((s>>16)&1);
e[19] = (e[19]) ^ ((s>>19)&1); e[17] = (e[17]) ^ ((s>>17)&1);
e[20] = (e[20]) ^ ((s>>20)&1); e[18] = (e[18]) ^ ((s>>18)&1);
e[21] = (e[21]) ^ ((s>>21)&1); e[19] = (e[19]) ^ ((s>>19)&1);
e[22] = (e[22]) ^ ((s>>22)&1); e[20] = (e[20]) ^ ((s>>20)&1);
e[23] = (e[23]) ^ ((s>>23)&1); e[21] = (e[21]) ^ ((s>>21)&1);
e[24] = (e[24]) ^ ((s>>24)&1); e[22] = (e[22]) ^ ((s>>22)&1);
e[25] = (e[25]) ^ ((s>>25)&1); e[23] = (e[23]) ^ ((s>>23)&1);
e[26] = (e[26]) ^ ((s>>26)&1); e[24] = (e[24]) ^ ((s>>24)&1);
e[27] = (e[27]) ^ ((s>>27)&1); e[25] = (e[25]) ^ ((s>>25)&1);
e[28] = (e[28]) ^ ((s>>28)&1); e[26] = (e[26]) ^ ((s>>26)&1);
e[29] = (e[29]) ^ ((s>>29)&1); e[27] = (e[27]) ^ ((s>>27)&1);
e[30] = (e[30]) ^ ((s>>30)&1); e[28] = (e[28]) ^ ((s>>28)&1);
e[31] = (e[31]) ^ ((s>>31)&1); e[29] = (e[29]) ^ ((s>>29)&1);
e[30] = (e[30]) ^ ((s>>30)&1);
e[31] = (e[31]) ^ ((s>>31)&1);
// This is not faster for some unknown reason // This is not faster for some unknown reason
// ((__m128i *)e)[0] = _mm_xor_si128(((__m128i *)e)[0],((__m128i *)scrambling_lut)[s&65535]); // ((__m128i *)e)[0] = _mm_xor_si128(((__m128i *)e)[0],((__m128i *)scrambling_lut)[s&65535]);
// ((__m128i *)e)[1] = _mm_xor_si128(((__m128i *)e)[1],((__m128i *)scrambling_lut)[s>>16]); // ((__m128i *)e)[1] = _mm_xor_si128(((__m128i *)e)[1],((__m128i *)scrambling_lut)[s>>16]);
s = lte_gold_generic(&x1, &x2, 0); s = lte_gold_generic(&x1, &x2, 0);
e += 32; e += 32;
} }
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING, VCD_FUNCTION_OUT);
} }
void init_scrambling_lut(void) { void init_scrambling_lut(void) {
uint32_t s; uint32_t s;
int i=0,j; int i=0,j;
for (s=0;s<=65535;s++) { for (s=0; s<=65535; s++) {
for (j=0;j<16;j++) { for (j=0; j<16; j++) {
scrambling_lut[i++] = (uint8_t)((s>>j)&1); scrambling_lut[i++] = (uint8_t)((s>>j)&1);
} }
} }
...@@ -194,11 +191,9 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -194,11 +191,9 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
int mbsfn_flag, int mbsfn_flag,
LTE_UE_DLSCH_t *dlsch, LTE_UE_DLSCH_t *dlsch,
int G, int G,
int16_t* llr, int16_t *llr,
uint8_t q, uint8_t q,
uint8_t Ns) uint8_t Ns) {
{
int i,j,k=0; int i,j,k=0;
// uint8_t reset; // uint8_t reset;
uint32_t x1, x2, s=0; uint32_t x1, x2, s=0;
...@@ -212,14 +207,14 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -212,14 +207,14 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
x2 = ((Ns>>1)<<9) + frame_parms->Nid_cell_mbsfn; //this is c_init in 36.211 Sec 6.3.1 x2 = ((Ns>>1)<<9) + frame_parms->Nid_cell_mbsfn; //this is c_init in 36.211 Sec 6.3.1
#ifdef DEBUG_SCRAMBLING #ifdef DEBUG_SCRAMBLING
printf("unscrambling: rnti %x, q %d, Ns %d, Nid_cell %d G %d, x2 %x\n",dlsch->rnti,q,Ns,frame_parms->Nid_cell,G,x2); printf("unscrambling: rnti %x, q %d, Ns %d, Nid_cell %d G %d, x2 %x\n",dlsch->rnti,q,Ns,frame_parms->Nid_cell,G,x2);
#endif #endif
s = lte_gold_generic(&x1, &x2, 1); s = lte_gold_generic(&x1, &x2, 1);
for (i=0; i<(1+(G>>5)); i++) { for (i=0; i<(1+(G>>5)); i++) {
for (j=0; j<32; j++,k++) { for (j=0; j<32; j++,k++) {
#ifdef DEBUG_SCRAMBLING #ifdef DEBUG_SCRAMBLING
printf("unscrambling %d : %d xor %d =",k,llr[k],(s>>j)&1); printf("unscrambling %d : %d xor %d =",k,llr[k],(s>>j)&1);
#endif #endif
llr[k] = ((2*((s>>j)&1))-1)*llr[k]; llr[k] = ((2*((s>>j)&1))-1)*llr[k];
#ifdef DEBUG_SCRAMBLING #ifdef DEBUG_SCRAMBLING
...@@ -232,12 +227,11 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -232,12 +227,11 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
} }
void init_unscrambling_lut(void) { void init_unscrambling_lut(void) {
uint32_t s; uint32_t s;
int i=0,j; int i=0,j;
for (s=0;s<=65535;s++) { for (s=0; s<=65535; s++) {
for (j=0;j<16;j++) { for (j=0; j<16; j++) {
unscrambling_lut[i++] = (int16_t)((((s>>j)&1)<<1)-1); unscrambling_lut[i++] = (int16_t)((((s>>j)&1)<<1)-1);
} }
} }
......
...@@ -829,7 +829,7 @@ int rx_pdsch(PHY_VARS_UE *ue, ...@@ -829,7 +829,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
pdsch_vars[eNB_id]->llr_offset[symbol], pdsch_vars[eNB_id]->llr_offset[symbol],
(int16_t*)pdsch_vars[eNB_id]->llr[0], (int16_t*)pdsch_vars[eNB_id]->llr[0],
pllr_symbol_cw0); pllr_symbol_cw0);
*/ */
switch (dlsch0_harq->Qm) { switch (dlsch0_harq->Qm) {
case 2 : case 2 :
if ((rx_type==rx_standard) || (codeword_TB1 == -1)) { if ((rx_type==rx_standard) || (codeword_TB1 == -1)) {
......
...@@ -122,7 +122,6 @@ void handle_nfapi_hi_dci0_hi_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxt ...@@ -122,7 +122,6 @@ void handle_nfapi_hi_dci0_hi_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxt
phich->config[phich->num_hi].n_DMRS = hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.cyclic_shift_2_for_drms; phich->config[phich->num_hi].n_DMRS = hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.cyclic_shift_2_for_drms;
phich->num_hi++; phich->num_hi++;
AssertFatal(phich->num_hi<32,"Maximum number of phich reached in subframe\n"); AssertFatal(phich->num_hi<32,"Maximum number of phich reached in subframe\n");
} }
void handle_nfapi_bch_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc, void handle_nfapi_bch_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
...@@ -186,6 +185,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro ...@@ -186,6 +185,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
#endif #endif
harq_pid = dlsch0->harq_ids[proc->frame_tx%2][proc->subframe_tx]; harq_pid = dlsch0->harq_ids[proc->frame_tx%2][proc->subframe_tx];
if((harq_pid < 0) || (harq_pid >= dlsch0->Mdlharq)) { if((harq_pid < 0) || (harq_pid >= dlsch0->Mdlharq)) {
LOG_E(PHY,"illegal harq_pid %d %s:%d\n", harq_pid, __FILE__, __LINE__); LOG_E(PHY,"illegal harq_pid %d %s:%d\n", harq_pid, __FILE__, __LINE__);
return; return;
...@@ -260,9 +260,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro ...@@ -260,9 +260,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
dlsch0->harq_mask = 1; dlsch0->harq_mask = 1;
dlsch0_harq = dlsch0->harq_processes[0]; dlsch0_harq = dlsch0->harq_processes[0];
dlsch0_harq->pdu = sdu; dlsch0_harq->pdu = sdu;
LOG_D(PHY,"NFAPI: frame %d, subframe %d (TX %d.%d): Programming SI-BR (%d) => %d\n",frame,subframe,proc->frame_tx,proc->subframe_tx,rel13->pdsch_payload_type,UE_id); LOG_D(PHY,"NFAPI: frame %d, subframe %d (TX %d.%d): Programming SI-BR (%d) => %d\n",frame,subframe,proc->frame_tx,proc->subframe_tx,rel13->pdsch_payload_type,UE_id);
dlsch0->rnti = 0xFFFF; dlsch0->rnti = 0xFFFF;
dlsch0->Kmimo = 1; dlsch0->Kmimo = 1;
dlsch0->Mdlharq = 4; dlsch0->Mdlharq = 4;
...@@ -569,8 +567,7 @@ void handle_uci_sr_pdu(PHY_VARS_eNB *eNB, ...@@ -569,8 +567,7 @@ void handle_uci_sr_pdu(PHY_VARS_eNB *eNB,
nfapi_ul_config_request_pdu_t *ul_config_pdu, nfapi_ul_config_request_pdu_t *ul_config_pdu,
uint16_t frame, uint16_t frame,
uint8_t subframe, uint8_t subframe,
uint8_t srs_active) uint8_t srs_active) {
{
LTE_eNB_UCI *uci = &eNB->uci_vars[UE_id]; LTE_eNB_UCI *uci = &eNB->uci_vars[UE_id];
if (NFAPI_MODE==NFAPI_MODE_VNF) return; if (NFAPI_MODE==NFAPI_MODE_VNF) return;
...@@ -803,13 +800,13 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) { ...@@ -803,13 +800,13 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
// clear DCI allocation maps for new subframe // clear DCI allocation maps for new subframe
if (NFAPI_MODE!=NFAPI_MODE_VNF) if (NFAPI_MODE!=NFAPI_MODE_VNF)
for (i=0; i<NUMBER_OF_UE_MAX; i++) { for (i=0; i<NUMBER_OF_UE_MAX; i++) {
if (eNB->ulsch[i]) { if (eNB->ulsch[i]) {
ulsch_harq = eNB->ulsch[i]->harq_processes[harq_pid]; ulsch_harq = eNB->ulsch[i]->harq_processes[harq_pid];
ulsch_harq->dci_alloc=0; ulsch_harq->dci_alloc=0;
ulsch_harq->rar_alloc=0; ulsch_harq->rar_alloc=0;
}
} }
}
} }
for (i=0; i<number_dl_pdu; i++) { for (i=0; i<number_dl_pdu; i++) {
...@@ -820,6 +817,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) { ...@@ -820,6 +817,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
case NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE: case NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE:
if (NFAPI_MODE!=NFAPI_MODE_VNF) if (NFAPI_MODE!=NFAPI_MODE_VNF)
handle_nfapi_dci_dl_pdu(eNB,NFAPI_SFNSF2SFN(DL_req->sfn_sf),NFAPI_SFNSF2SF(DL_req->sfn_sf),proc,dl_config_pdu); handle_nfapi_dci_dl_pdu(eNB,NFAPI_SFNSF2SFN(DL_req->sfn_sf),NFAPI_SFNSF2SF(DL_req->sfn_sf),proc,dl_config_pdu);
eNB->pdcch_vars[NFAPI_SFNSF2SF(DL_req->sfn_sf)&1].num_dci++; eNB->pdcch_vars[NFAPI_SFNSF2SF(DL_req->sfn_sf)&1].num_dci++;
//LOG_E(PHY,"Incremented num_dci:%d but already set??? dl_config:num_dci:%d\n", eNB->pdcch_vars[subframe&1].num_dci, number_dci); //LOG_E(PHY,"Incremented num_dci:%d but already set??? dl_config:num_dci:%d\n", eNB->pdcch_vars[subframe&1].num_dci, number_dci);
do_oai=1; do_oai=1;
...@@ -832,11 +830,13 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) { ...@@ -832,11 +830,13 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
TX_req->tx_request_body.number_of_pdus); TX_req->tx_request_body.number_of_pdus);
eNB->pbch_configured=1; eNB->pbch_configured=1;
do_oai=1; do_oai=1;
//LOG_D(PHY,"%s() NFAPI_DL_CONFIG_BCH_PDU_TYPE TX:%d/%d RX:%d/%d TXREQ:%d/%d\n", //LOG_D(PHY,"%s() NFAPI_DL_CONFIG_BCH_PDU_TYPE TX:%d/%d RX:%d/%d TXREQ:%d/%d\n",
//__FUNCTION__, proc->frame_tx, proc->subframe_tx, proc->frame_rx, proc->subframe_rx, NFAPI_SFNSF2SFN(TX_req->sfn_sf), NFAPI_SFNSF2SF(TX_req->sfn_sf)); //__FUNCTION__, proc->frame_tx, proc->subframe_tx, proc->frame_rx, proc->subframe_rx, NFAPI_SFNSF2SFN(TX_req->sfn_sf), NFAPI_SFNSF2SF(TX_req->sfn_sf));
if (NFAPI_MODE!=NFAPI_MODE_VNF) if (NFAPI_MODE!=NFAPI_MODE_VNF)
handle_nfapi_bch_pdu(eNB,proc,dl_config_pdu, handle_nfapi_bch_pdu(eNB,proc,dl_config_pdu,
TX_req->tx_request_body.tx_pdu_list[dl_config_pdu->bch_pdu.bch_pdu_rel8.pdu_index].segments[0].segment_data); TX_req->tx_request_body.tx_pdu_list[dl_config_pdu->bch_pdu.bch_pdu_rel8.pdu_index].segments[0].segment_data);
break; break;
case NFAPI_DL_CONFIG_MCH_PDU_TYPE: case NFAPI_DL_CONFIG_MCH_PDU_TYPE:
...@@ -867,8 +867,8 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) { ...@@ -867,8 +867,8 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
dlsch_pdu_rel8->transport_blocks); dlsch_pdu_rel8->transport_blocks);
if (1) { //sdu != NULL) if (1) { //sdu != NULL)
if (NFAPI_MODE!=NFAPI_MODE_VNF) if (NFAPI_MODE!=NFAPI_MODE_VNF)
handle_nfapi_dlsch_pdu(eNB,NFAPI_SFNSF2SFN(DL_req->sfn_sf),NFAPI_SFNSF2SF(DL_req->sfn_sf),proc,dl_config_pdu, dlsch_pdu_rel8->transport_blocks-1, sdu); handle_nfapi_dlsch_pdu(eNB,NFAPI_SFNSF2SFN(DL_req->sfn_sf),NFAPI_SFNSF2SF(DL_req->sfn_sf),proc,dl_config_pdu, dlsch_pdu_rel8->transport_blocks-1, sdu);
} else { } else {
dont_send=1; dont_send=1;
LOG_E(MAC,"%s() NFAPI_DL_CONFIG_DLSCH_PDU_TYPE sdu is NULL DL_CFG:SFN/SF:%d:pdu_index:%d TX_REQ:SFN/SF:%d:pdus:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(DL_req->sfn_sf), pdu_index, LOG_E(MAC,"%s() NFAPI_DL_CONFIG_DLSCH_PDU_TYPE sdu is NULL DL_CFG:SFN/SF:%d:pdu_index:%d TX_REQ:SFN/SF:%d:pdus:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(DL_req->sfn_sf), pdu_index,
...@@ -911,6 +911,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) { ...@@ -911,6 +911,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
case NFAPI_DL_CONFIG_MPDCCH_PDU_TYPE: case NFAPI_DL_CONFIG_MPDCCH_PDU_TYPE:
if (NFAPI_MODE!=NFAPI_MODE_VNF) if (NFAPI_MODE!=NFAPI_MODE_VNF)
handle_nfapi_mpdcch_pdu(eNB,proc,dl_config_pdu); handle_nfapi_mpdcch_pdu(eNB,proc,dl_config_pdu);
eNB->mpdcch_vars[subframe&1].num_dci++; eNB->mpdcch_vars[subframe&1].num_dci++;
break; break;
#endif #endif
...@@ -918,10 +919,11 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) { ...@@ -918,10 +919,11 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
} }
if ((NFAPI_MODE!=NFAPI_MONOLITHIC) && do_oai && !dont_send) { if ((NFAPI_MODE!=NFAPI_MONOLITHIC) && do_oai && !dont_send) {
if(Sched_INFO->TX_req->tx_request_body.number_of_pdus > 0){ if(Sched_INFO->TX_req->tx_request_body.number_of_pdus > 0) {
Sched_INFO->TX_req->sfn_sf = frame << 4 | subframe; Sched_INFO->TX_req->sfn_sf = frame << 4 | subframe;
oai_nfapi_tx_req(Sched_INFO->TX_req); oai_nfapi_tx_req(Sched_INFO->TX_req);
} }
Sched_INFO->DL_req->sfn_sf = frame << 4 | subframe; Sched_INFO->DL_req->sfn_sf = frame << 4 | subframe;
oai_nfapi_dl_config_req(Sched_INFO->DL_req); // DJP - .dl_config_request_body.dl_config_pdu_list[0]); // DJP - FIXME TODO - yuk - only copes with 1 pdu oai_nfapi_dl_config_req(Sched_INFO->DL_req); // DJP - .dl_config_request_body.dl_config_pdu_list[0]); // DJP - FIXME TODO - yuk - only copes with 1 pdu
Sched_INFO->UE_release_req->sfn_sf = frame << 4 | subframe; Sched_INFO->UE_release_req->sfn_sf = frame << 4 | subframe;
...@@ -935,27 +937,27 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) { ...@@ -935,27 +937,27 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
eNB->pdcch_vars[NFAPI_SFNSF2SF(HI_DCI0_req->sfn_sf)&1].num_pdcch_symbols=0; eNB->pdcch_vars[NFAPI_SFNSF2SF(HI_DCI0_req->sfn_sf)&1].num_pdcch_symbols=0;
} }
if (NFAPI_MODE!=NFAPI_MODE_VNF) if (NFAPI_MODE!=NFAPI_MODE_VNF)
for (i=0; i<number_hi_dci0_pdu; i++) { for (i=0; i<number_hi_dci0_pdu; i++) {
hi_dci0_req_pdu = &HI_DCI0_req->hi_dci0_request_body.hi_dci0_pdu_list[i]; hi_dci0_req_pdu = &HI_DCI0_req->hi_dci0_request_body.hi_dci0_pdu_list[i];
LOG_D(PHY,"NFAPI: hi_dci0_pdu %d : type %d\n",i,hi_dci0_req_pdu->pdu_type); LOG_D(PHY,"NFAPI: hi_dci0_pdu %d : type %d\n",i,hi_dci0_req_pdu->pdu_type);
switch (hi_dci0_req_pdu->pdu_type) { switch (hi_dci0_req_pdu->pdu_type) {
case NFAPI_HI_DCI0_DCI_PDU_TYPE: case NFAPI_HI_DCI0_DCI_PDU_TYPE:
handle_nfapi_hi_dci0_dci_pdu(eNB,NFAPI_SFNSF2SFN(HI_DCI0_req->sfn_sf),NFAPI_SFNSF2SF(HI_DCI0_req->sfn_sf),proc,hi_dci0_req_pdu); handle_nfapi_hi_dci0_dci_pdu(eNB,NFAPI_SFNSF2SFN(HI_DCI0_req->sfn_sf),NFAPI_SFNSF2SF(HI_DCI0_req->sfn_sf),proc,hi_dci0_req_pdu);
eNB->pdcch_vars[NFAPI_SFNSF2SF(HI_DCI0_req->sfn_sf)&1].num_dci++; eNB->pdcch_vars[NFAPI_SFNSF2SF(HI_DCI0_req->sfn_sf)&1].num_dci++;
break; break;
case NFAPI_HI_DCI0_MPDCCH_DCI_PDU_TYPE: case NFAPI_HI_DCI0_MPDCCH_DCI_PDU_TYPE:
handle_nfapi_hi_dci0_mpdcch_dci_pdu(eNB,proc,hi_dci0_req_pdu); handle_nfapi_hi_dci0_mpdcch_dci_pdu(eNB,proc,hi_dci0_req_pdu);
eNB->mpdcch_vars[subframe&1].num_dci++; eNB->mpdcch_vars[subframe&1].num_dci++;
break; break;
case NFAPI_HI_DCI0_HI_PDU_TYPE: case NFAPI_HI_DCI0_HI_PDU_TYPE:
handle_nfapi_hi_dci0_hi_pdu(eNB,NFAPI_SFNSF2SFN(HI_DCI0_req->sfn_sf),NFAPI_SFNSF2SF(HI_DCI0_req->sfn_sf),proc,hi_dci0_req_pdu); handle_nfapi_hi_dci0_hi_pdu(eNB,NFAPI_SFNSF2SFN(HI_DCI0_req->sfn_sf),NFAPI_SFNSF2SF(HI_DCI0_req->sfn_sf),proc,hi_dci0_req_pdu);
break; break;
}
} }
}
if (NFAPI_MODE!=NFAPI_MONOLITHIC) { if (NFAPI_MODE!=NFAPI_MONOLITHIC) {
if (number_ul_pdu>0) { if (number_ul_pdu>0) {
......
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