Commit 2a8e7f3f authored by Stefan's avatar Stefan

modif fill_nfapi_uci_acknaks

parent 485e83f9
......@@ -1149,10 +1149,10 @@ program_dlsch_acknak(module_id_t module_idP,
if ((ul_config_pdu = has_ul_grant(module_idP, CC_idP, ul_absSF, rnti)) == NULL) {
// no UL grant so
// Program ACK/NAK alone Format 1a/b or 3
ul_req = &eNB->UL_req_tmp[CC_idP][ul_absSF %10].ul_config_request_body;
ul_req = &eNB->UL_req_tmp[CC_idP][ul_absSF % 10].ul_config_request_body;
ul_config_pdu = &ul_req->ul_config_pdu_list[ul_req->number_of_pdus];
// Do PUCCH
fill_nfapi_uci_acknak(module_idP, CC_idP, rnti, ul_absSF, cce_idx);
fill_nfapi_uci_acknak(module_idP, CC_idP, rnti, subframeP + (10 * frameP), cce_idx);
} else {
/* there is already an existing UL grant so update it if needed
* on top of some other UL resource (PUSCH,combined SR/CQI/HARQ on PUCCH, etc)
......@@ -1270,7 +1270,6 @@ program_dlsch_acknak(module_id_t module_idP,
if (harq_information) {
fill_nfapi_harq_information(module_idP, CC_idP, rnti, harq_information, cce_idx);
}
return;
}
uint8_t get_V_UL_DAI(module_id_t module_idP, int CC_idP, uint16_t rntiP,sub_frame_t subframeP) {
......@@ -1389,8 +1388,7 @@ fill_nfapi_harq_information(module_id_t module_idP,
int CC_idP,
uint16_t rntiP,
nfapi_ul_config_harq_information *harq_information,
uint8_t cce_idxP)
{
uint8_t cce_idxP) {
eNB_MAC_INST *eNB = RC.mac[module_idP];
COMMON_channels_t *cc = &eNB->common_channels[CC_idP];
UE_list_t *UE_list = &eNB->UE_list;
......@@ -1470,13 +1468,15 @@ void
fill_nfapi_uci_acknak(module_id_t module_idP,
int CC_idP,
uint16_t rntiP,
uint16_t ul_absSF,
uint16_t absSFP,
uint8_t cce_idxP)
{
//eNB_MAC_INST *eNB = RC.mac[module_idP];
nfapi_ul_config_request_t *ul_req = &RC.mac[module_idP]->UL_req_tmp[CC_idP][ul_absSF % 10];
eNB_MAC_INST *eNB = RC.mac[module_idP];
COMMON_channels_t *cc = &eNB->common_channels[CC_idP];
nfapi_ul_config_request_t *ul_req = &eNB->UL_req_tmp[CC_idP][absSFP % 10];
nfapi_ul_config_request_body_t *ul_req_body = &ul_req->ul_config_request_body;
nfapi_ul_config_request_pdu_t *ul_config_pdu = &ul_req_body->ul_config_pdu_list[ul_req_body->number_of_pdus];
int ackNAK_absSF = get_pucch1_absSF(cc, absSFP);
memset((void *) ul_config_pdu, 0, sizeof(nfapi_ul_config_request_pdu_t));
......@@ -1494,16 +1494,15 @@ fill_nfapi_uci_acknak(module_id_t module_idP,
LOG_D(MAC, "Filled in UCI HARQ request for rnti %xacknakSF %d.%d, cce_idxP %d-> n1_pucch %d\n",
rntiP,
ul_absSF / 10,
ul_absSF % 10,
ackNAK_absSF / 10,
ackNAK_absSF % 10,
cce_idxP,
ul_config_pdu->uci_harq_pdu.
harq_information.harq_information_rel9_fdd.n_pucch_1_0);
ul_config_pdu->uci_harq_pdu.harq_information.harq_information_rel9_fdd.n_pucch_1_0);
ul_req_body->number_of_pdus++;
ul_req_body->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
ul_req->header.message_id = NFAPI_UL_CONFIG_REQUEST;
ul_req->sfn_sf = ((ul_absSF / 10) << 4) | ul_absSF % 10;
ul_req->sfn_sf = ((ackNAK_absSF / 10) << 4) | ackNAK_absSF % 10;
return;
}
......@@ -1574,8 +1573,7 @@ fill_nfapi_tx_req(nfapi_tx_request_body_t *tx_req_body,
uint8_t *pdu) {
nfapi_tx_request_pdu_t *TX_req = &tx_req_body->tx_pdu_list[tx_req_body->number_of_pdus];
LOG_D(MAC, "Filling TX_req %d for pdu length %d\n",
tx_req_body->number_of_pdus,
pdu_length);
tx_req_body->number_of_pdus, pdu_length);
TX_req->pdu_length = pdu_length;
TX_req->pdu_index = pdu_index;
TX_req->num_segments = 1;
......@@ -2326,8 +2324,7 @@ UE_is_to_be_scheduled(module_id_t module_idP, int CC_id, uint8_t UE_id) {
uint8_t
get_tmode(module_id_t module_idP,
int CC_idP,
int UE_idP)
{
int UE_idP) {
eNB_MAC_INST *eNB = RC.mac[module_idP];
COMMON_channels_t *cc = &eNB->common_channels[CC_idP];
LTE_PhysicalConfigDedicated_t *physicalConfigDedicated = eNB->UE_list.physicalConfigDedicated[CC_idP][UE_idP];
......@@ -2520,8 +2517,7 @@ get_bw_index(module_id_t module_id,
int
get_min_rb_unit(module_id_t module_id,
uint8_t CC_id)
{
uint8_t CC_id) {
int min_rb_unit = 0;
int N_RB_DL = to_prb(RC.mac[module_id]->common_channels[CC_id].mib->message.dl_Bandwidth);
......@@ -2555,21 +2551,12 @@ get_min_rb_unit(module_id_t module_id,
}
uint32_t
allocate_prbs_sub(int nb_rb,
int N_RB_DL,
int N_RBG,
uint8_t *rballoc)
{
allocate_prbs_sub(int nb_rb, int N_RB_DL, int N_RBG, uint8_t *rballoc) {
int check = 0; //check1=0,check2=0;
uint32_t rballoc_dci = 0;
//uint8_t number_of_subbands=13;
LOG_T(MAC, "*****Check1RBALLOC****: %d%d%d%d (nb_rb %d,N_RBG %d)\n",
rballoc[3],
rballoc[2],
rballoc[1],
rballoc[0],
nb_rb,
N_RBG);
rballoc[3], rballoc[2], rballoc[1], rballoc[0], nb_rb, N_RBG);
while ((nb_rb > 0) && (check < N_RBG)) {
//printf("rballoc[%d] %d\n",check,rballoc[check]);
......@@ -2606,13 +2593,12 @@ allocate_prbs_sub(int nb_rb,
}
// printf("rb_alloc %x\n",rballoc_dci);
check++;
check = check + 1;
// check1 = check1+2;
}
// rballoc_dci = (rballoc_dci)&(0x1fff);
LOG_T(MAC, "*********RBALLOC : %x\n",
rballoc_dci);
LOG_T(MAC, "*********RBALLOC : %x\n", rballoc_dci);
// exit(-1);
return (rballoc_dci);
}
......
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