Commit 05f4c15e authored by masayuki.harada's avatar masayuki.harada

Fix Msg5 procedure in sa mode.

parent df922e5f
......@@ -344,7 +344,7 @@ int create_gNB_tasks(uint32_t gnb_nb) {
}
if (AMF_MODE_ENABLED && (get_softmodem_params()->phy_test==0 && get_softmodem_params()->do_ra==0 && get_softmodem_params()->sa==0)) {
if (AMF_MODE_ENABLED && (get_softmodem_params()->phy_test==0 && get_softmodem_params()->do_ra==0)) {
if (gnb_nb > 0) {
/*
if (itti_create_task (TASK_SCTP, sctp_eNB_task, NULL) < 0) {
......
......@@ -327,7 +327,7 @@ void processSlotRX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
LOG_D(PHY, "In %s: slot %d, time %lu\n", __FUNCTION__, proc->nr_slot_rx, (rdtsc()-a)/3500);
#endif
if(IS_SOFTMODEM_NOS1){
if(IS_SOFTMODEM_NOS1 || get_softmodem_params()->sa ){
NR_UE_MAC_INST_t *mac = get_mac_inst(0);
protocol_ctxt_t ctxt;
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, UE->Mod_id, ENB_FLAG_NO, mac->crnti, proc->frame_rx, proc->nr_slot_rx, 0);
......
......@@ -514,7 +514,7 @@ int main( int argc, char **argv ) {
RC.nrrrc = (gNB_RRC_INST **)malloc(1*sizeof(gNB_RRC_INST *));
RC.nrrrc[0] = (gNB_RRC_INST*)malloc(sizeof(gNB_RRC_INST));
RC.nrrrc[0]->node_type = ngran_gNB;
nr_rrc_ue_generate_RRCSetupRequest(ctxt_pP.module_id, 0); //TODO need to set ctxt_pP
//nr_rrc_ue_generate_RRCSetupRequest(ctxt_pP.module_id, 0); //TODO need to set ctxt_pP
if (create_tasks_nrue(1) < 0) {
printf("cannot create ITTI tasks\n");
......
......@@ -896,7 +896,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
LOG_D(NR_MAC,"(%i): 0x%x\n",k,mac->ulsch_pdu.payload[k]);
}
} else {
if (IS_SOFTMODEM_NOS1 && (mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] != ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator)){
if ((IS_SOFTMODEM_NOS1 || get_softmodem_params()->sa) && (mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] != ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator)){
// Getting IP traffic to be transmitted
data_existing = nr_ue_get_sdu(mod_id,
cc_id,
......@@ -910,7 +910,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] = ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator;
//Random traffic to be transmitted if there is no IP traffic available for this Tx opportunity
if (!IS_SOFTMODEM_NOS1 || !data_existing) {
if (!(IS_SOFTMODEM_NOS1 || get_softmodem_params()->sa) || !data_existing) {
//Use zeros for the header bytes in noS1 mode, in order to make sure that the LCID is not valid
//and block this traffic from being forwarded to the upper layers at the gNB
LOG_D(PHY, "In %s: Random data to be transmitted: TBS_bytes %d \n", __FUNCTION__, TBS_bytes);
......
......@@ -738,7 +738,7 @@ void pf_ul(module_id_t module_id,
/* Calculate TBS from MCS */
NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch;
const int mcs = 9;
const int mcs = 4;
sched_pusch->mcs = mcs;
sched_pusch->R = nr_get_code_rate_ul(mcs, ps->mcs_table);
sched_pusch->Qm = nr_get_Qm_ul(mcs, ps->mcs_table);
......
......@@ -672,13 +672,8 @@ rb_found:
ctxt.brOption = 0;
ctxt.rnti = ue->rnti;
nr_rrc_data_ind( &ctxt, srb_id, size, buf);
if (ccch_or_dcch == 0) {
nr_rrc_data_ind_ccch( &ctxt, srb_id, size, buf);
ccch_or_dcch = 1;
} else {
nr_rrc_data_ind( &ctxt, srb_id, size, buf);
}
return;
}
......@@ -1045,7 +1040,7 @@ boolean_t nr_rrc_pdcp_config_asn1_req(
//kUPenc != NULL ||
pmch_InfoList_r9 != NULL /*||
defaultDRB != NULL */) {
TODO;
//TODO;
}
if (srb2add_list != NULL) {
......@@ -1302,6 +1297,7 @@ static boolean_t pdcp_data_req_srb(
if (rb == NULL) {
LOG_E(PDCP, "%s:%d:%s: no SRB found (rnti %d, rb_id %ld)\n",
__FILE__, __LINE__, __FUNCTION__, rnti, rb_id);
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
return 0;
}
......
......@@ -666,7 +666,7 @@ static void add_srb(int rnti, struct NR_SRB_ToAddMod *s, NR_RLC_BearerConfig_t *
if (channel_id != srb_id) {
LOG_E(RLC, "%s:%d:%s: todo, remove this limitation\n",
__FILE__, __LINE__, __FUNCTION__);
exit(1);
//exit(1);
}
logical_channel_group = *l->ul_SpecificParameters->logicalChannelGroup;
......
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