X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrmac%2Flwr_mac_fsm.c;h=bbef58b7b952601d8a5dd89c8305b87b016e5492;hb=fdf994581c1b672158c911a9a5f7a4191832c695;hp=cbf14be814b0a4f20cdd7baf42e1796ef55bb8b9;hpb=14136d98405a2fb8d8c078b755efb63b95cdc7a3;p=o-du%2Fl2.git diff --git a/src/5gnrmac/lwr_mac_fsm.c b/src/5gnrmac/lwr_mac_fsm.c index cbf14be81..bbef58b7b 100644 --- a/src/5gnrmac/lwr_mac_fsm.c +++ b/src/5gnrmac/lwr_mac_fsm.c @@ -1975,10 +1975,13 @@ uint8_t lwr_mac_procIqSamplesReqEvt(void *msg) uint8_t lwr_mac_procConfigReqEvt(void *msg) { #ifdef INTEL_FAPI - //uint8_t idx = 0; +#ifdef NR_TDD + uint8_t slotIdx = 0; + uint8_t symbolIdx =0; +#endif uint8_t index = 0; - uint16_t *cellId; - uint16_t cellIdx; + uint16_t *cellId =NULLP; + uint16_t cellIdx =0; uint32_t msgLen = 0; uint32_t mib = 0; MacCellCfg macCfgParams; @@ -2140,12 +2143,20 @@ uint8_t lwr_mac_procConfigReqEvt(void *msg) //fillTlvs(&configReq->tlvs[index++], FAPI_MULTIPLE_CELLS_SS_PBCH_IN_A_CARRIER_TAG, \ sizeof(uint8_t), macCfgParams.ssbCfg.multCellCarr, &msgLen); +#ifdef NR_TDD /* fill TDD table */ - //fillTlvs(&configReq->tlvs[index++], FAPI_TDD_PERIOD_TAG, \ + fillTlvs(&configReq->tlvs[index++], FAPI_TDD_PERIOD_TAG, \ sizeof(uint8_t), macCfgParams.tddCfg.tddPeriod, &msgLen); - //fillTlvs(&configReq->tlvs[index++], FAPI_SLOT_CONFIG_TAG, \ - sizeof(uint8_t), macCfgParams.tddCfg.slotCfg[0][0], &msgLen); - + for(slotIdx =0 ;slotIdx< MAX_TDD_PERIODICITY_SLOTS; slotIdx++) + { + for(symbolIdx = 0; symbolIdx< MAX_SYMB_PER_SLOT; symbolIdx++) + { + fillTlvs(&configReq->tlvs[index++], FAPI_SLOT_CONFIG_TAG, \ + sizeof(uint8_t), macCfgParams.tddCfg.slotCfg[slotIdx][symbolIdx], &msgLen); + } + } +#endif + /* fill measurement config */ //fillTlvs(&configReq->tlvs[index++], FAPI_RSSI_MEASUREMENT_TAG, \ sizeof(uint8_t), macCfgParams.rssiUnit, &msgLen); @@ -3888,7 +3899,7 @@ uint16_t fillUlTtiReq(SlotIndInfo currTimingInfo) /* add PHY delta */ ADD_DELTA_TO_TIME(currTimingInfo,ulTtiReqTimingInfo,PHY_DELTA); - currUlSlot = &macCb.macCell[cellIdx]->ulSlot[ulTtiReqTimingInfo.slot % MAX_SLOT_SUPPORTED]; + currUlSlot = &macCb.macCell[cellIdx]->ulSlot[ulTtiReqTimingInfo.slot % MAX_SLOTS]; LWR_MAC_ALLOC(ulTtiElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_ul_tti_req_t))); if(ulTtiElem) @@ -4190,7 +4201,7 @@ uint16_t fillUlDciReq(SlotIndInfo currTimingInfo) { GET_CELL_IDX(currTimingInfo.cellId, cellIdx); memcpy(&ulDciReqTimingInfo, &currTimingInfo, sizeof(SlotIndInfo)); - currDlSlot = &macCb.macCell[cellIdx]->dlSlot[ulDciReqTimingInfo.slot % MAX_SLOT_SUPPORTED]; + currDlSlot = &macCb.macCell[cellIdx]->dlSlot[ulDciReqTimingInfo.slot % MAX_SLOTS]; if(currDlSlot->dlInfo.ulGrant != NULLP) {