Fix RA-Msg3 to logical channel CCCH
This commit is contained in:
@@ -339,7 +339,6 @@ typedef struct {
|
||||
#define UL_SCH_LCID_SRB2 0x02
|
||||
#define UL_SCH_LCID_SRB3 0x03
|
||||
#define UL_SCH_LCID_DTCH 0x04
|
||||
#define UL_SCH_LCID_CCCH_MSG3 0x21
|
||||
#define UL_SCH_LCID_RECOMMENDED_BITRATE_QUERY 0x35
|
||||
#define UL_SCH_LCID_MULTI_ENTRY_PHR_4_OCT 0x36
|
||||
#define UL_SCH_LCID_CONFIGURED_GRANT_CONFIRMATION 0x37
|
||||
|
||||
@@ -513,7 +513,8 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
|
||||
NR_UE_MAC_INST_t *mac = get_mac_inst(mod_id);
|
||||
RA_config_t *ra = &mac->ra;
|
||||
uint8_t mac_sdus[MAX_NR_ULSCH_PAYLOAD_BYTES];
|
||||
uint8_t lcid = UL_SCH_LCID_CCCH_MSG3, *payload;
|
||||
uint8_t lcid = UL_SCH_LCID_CCCH;
|
||||
uint8_t *payload;
|
||||
uint16_t size_sdu = 0;
|
||||
unsigned short post_padding;
|
||||
NR_ServingCellConfigCommon_t *scc = mac->scc;
|
||||
|
||||
@@ -2066,8 +2066,9 @@ uint16_t nr_generate_ulsch_pdu(uint8_t *sdus_payload,
|
||||
last_size = 3;
|
||||
}
|
||||
} else { // UL CCCH SDU
|
||||
mac_pdu_ptr->R = 0;
|
||||
mac_pdu_ptr->LCID = sdu_lcids[i];
|
||||
((NR_MAC_SUBHEADER_FIXED *) mac_pdu_ptr)->R = 0;
|
||||
((NR_MAC_SUBHEADER_FIXED *) mac_pdu_ptr)->LCID = sdu_lcids[i];
|
||||
last_size = 1;
|
||||
}
|
||||
|
||||
mac_pdu_ptr += last_size;
|
||||
|
||||
@@ -303,4 +303,29 @@ int8_t mac_rrc_nr_data_req(const module_id_t Mod_idP,
|
||||
|
||||
return(0);
|
||||
|
||||
}
|
||||
|
||||
int8_t nr_mac_rrc_data_ind(const module_id_t module_idP,
|
||||
const int CC_id,
|
||||
const frame_t frameP,
|
||||
const sub_frame_t sub_frameP,
|
||||
const int UE_id,
|
||||
const rnti_t rntiP,
|
||||
const rb_id_t srb_idP,
|
||||
const uint8_t *sduP,
|
||||
const sdu_size_t sdu_lenP,
|
||||
const boolean_t brOption) {
|
||||
|
||||
protocol_ctxt_t ctxt;
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, GNB_FLAG_YES, rntiP, frameP, sub_frameP,0);
|
||||
|
||||
if((srb_idP & RAB_OFFSET) == CCCH) {
|
||||
LOG_D(NR_RRC, "[gNB %d] Received SDU for CCCH on SRB %ld\n", module_idP, srb_idP);
|
||||
ctxt.brOption = brOption;
|
||||
if (sdu_lenP > 0) {
|
||||
nr_rrc_gNB_decode_ccch(&ctxt, sduP, sdu_lenP, CC_id);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -156,6 +156,24 @@ int
|
||||
nr_rrc_mac_remove_ue(module_id_t mod_idP,
|
||||
rnti_t rntiP);
|
||||
|
||||
int8_t nr_mac_rrc_data_ind(
|
||||
const module_id_t module_idP,
|
||||
const int CC_id,
|
||||
const frame_t frameP,
|
||||
const sub_frame_t sub_frameP,
|
||||
const int UE_id,
|
||||
const rnti_t rntiP,
|
||||
const rb_id_t srb_idP,
|
||||
const uint8_t *sduP,
|
||||
const sdu_size_t sdu_lenP,
|
||||
const boolean_t brOption
|
||||
);
|
||||
|
||||
int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
|
||||
const uint8_t *buffer,
|
||||
int buffer_length,
|
||||
const int CC_id);
|
||||
|
||||
void
|
||||
rrc_gNB_generate_dedicatedRRCReconfiguration_release(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
|
||||
@@ -1383,7 +1383,7 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
|
||||
break;
|
||||
|
||||
case NR_UL_CCCH_MessageType__c1_PR_rrcSetupRequest:
|
||||
LOG_I(NR_RRC, "Received RRCSetupRequest on UL-CCCH-Message (UE rnti %x)\n", ctxt_pP->rnti);
|
||||
LOG_D(NR_RRC, "Received RRCSetupRequest on UL-CCCH-Message (UE rnti %x)\n", ctxt_pP->rnti);
|
||||
ue_context_p = rrc_gNB_get_ue_context(gnb_rrc_inst, ctxt_pP->rnti);
|
||||
if (ue_context_p != NULL) {
|
||||
rrc_gNB_free_mem_UE_context(ctxt_pP, ue_context_p);
|
||||
@@ -1490,15 +1490,13 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
|
||||
CC_id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (ue_context_p != NULL) {
|
||||
ue_context_p->ue_context.establishment_cause = rrcSetupRequest->establishmentCause;
|
||||
}
|
||||
|
||||
rrc_gNB_generate_RRCSetup(ctxt_pP,
|
||||
rrc_gNB_get_ue_context(gnb_rrc_inst, ctxt_pP->rnti),
|
||||
CC_id);
|
||||
rrc_gNB_generate_RRCSetup(ctxt_pP,
|
||||
rrc_gNB_get_ue_context(gnb_rrc_inst, ctxt_pP->rnti),
|
||||
CC_id);
|
||||
}
|
||||
break;
|
||||
|
||||
case NR_UL_CCCH_MessageType__c1_PR_rrcResumeRequest:
|
||||
|
||||
Reference in New Issue
Block a user