Commit ef701be8 authored by francescomani's avatar francescomani

bugfixes for SR

parent 86cf5e70
...@@ -1166,6 +1166,7 @@ void nr_configure_pucch(nfapi_nr_pucch_pdu_t* pucch_pdu, ...@@ -1166,6 +1166,7 @@ void nr_configure_pucch(nfapi_nr_pucch_pdu_t* pucch_pdu,
break; break;
case NR_PUCCH_Resource__format_PR_format2 : case NR_PUCCH_Resource__format_PR_format2 :
pucch_pdu->format_type = 2; pucch_pdu->format_type = 2;
pucch_pdu->sr_flag = O_sr;
pucch_pdu->nr_of_symbols = pucchres->format.choice.format2->nrofSymbols; pucch_pdu->nr_of_symbols = pucchres->format.choice.format2->nrofSymbols;
pucch_pdu->start_symbol_index = pucchres->format.choice.format2->startingSymbolIndex; pucch_pdu->start_symbol_index = pucchres->format.choice.format2->startingSymbolIndex;
pucch_pdu->data_scrambling_id = pusch_id!= NULL ? *pusch_id : *scc->physCellId; pucch_pdu->data_scrambling_id = pusch_id!= NULL ? *pusch_id : *scc->physCellId;
......
...@@ -1222,7 +1222,7 @@ void nr_sr_reporting(gNB_MAC_INST *nrmac, frame_t SFN, sub_frame_t slot, int mod ...@@ -1222,7 +1222,7 @@ void nr_sr_reporting(gNB_MAC_INST *nrmac, frame_t SFN, sub_frame_t slot, int mod
if (curr_pucch->active && if (curr_pucch->active &&
curr_pucch->frame == SFN && curr_pucch->frame == SFN &&
curr_pucch->ul_slot == slot && curr_pucch->ul_slot == slot &&
curr_pucch->resource_indicator == found) { curr_pucch->resource_indicator == idx) {
curr_pucch->sr_flag = true; curr_pucch->sr_flag = true;
found = true; found = true;
break; break;
...@@ -1230,7 +1230,7 @@ void nr_sr_reporting(gNB_MAC_INST *nrmac, frame_t SFN, sub_frame_t slot, int mod ...@@ -1230,7 +1230,7 @@ void nr_sr_reporting(gNB_MAC_INST *nrmac, frame_t SFN, sub_frame_t slot, int mod
else if (!curr_pucch->active) else if (!curr_pucch->active)
free_pucch = i; // found an available pucch structure free_pucch = i; // found an available pucch structure
} }
AssertFatal(found || free_pucch>0, "Coulnd't find an available PUCCH resource to schedule SR\n"); AssertFatal(found || free_pucch>-1, "Coulnd't find an available PUCCH resource to schedule SR\n");
if (!found) { if (!found) {
uint16_t *vrb_map_UL = &RC.nrmac[mod_id]->common_channels[CC_id].vrb_map_UL[slot * MAX_BWP_SIZE]; uint16_t *vrb_map_UL = &RC.nrmac[mod_id]->common_channels[CC_id].vrb_map_UL[slot * MAX_BWP_SIZE];
int bwp_start = ul_bwp->BWPStart; int bwp_start = ul_bwp->BWPStart;
......
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