sm: Provide RAI obtained from network

MS needs to store this information, hence the app needs to be provided
with it.

Change-Id: Icd357d8c7f4848441da011d59a4e520785d64779
This commit is contained in:
Pau Espin 2023-05-16 19:55:44 +02:00 committed by pespin
parent 1947a84469
commit 824d00f9e7
3 changed files with 4 additions and 0 deletions

View File

@ -90,6 +90,7 @@ struct osmo_gprs_sm_smreg_prim {
struct {
uint32_t allocated_ptmsi;
uint32_t allocated_tlli;
struct gprs_ra_id rai;
} gmm;
} acc;
struct {

View File

@ -225,6 +225,7 @@ int gprs_sm_submit_smreg_pdp_act_cnf(const struct gprs_sm_entity *sme, enum gsm4
memcpy(sm_prim_tx->smreg.pdp_act_cnf.acc.qos, &sme->qos, sme->qos_len);
sm_prim_tx->smreg.pdp_act_cnf.acc.gmm.allocated_ptmsi = sme->ms->gmm.ptmsi;
sm_prim_tx->smreg.pdp_act_cnf.acc.gmm.allocated_tlli = sme->ms->gmm.tlli;
memcpy(&sm_prim_tx->smreg.pdp_act_cnf.acc.gmm.rai, &sme->ms->gmm.ra, sizeof(sme->ms->gmm.ra));
} else {
sm_prim_tx->smreg.pdp_act_cnf.rej.cause = cause;
}

View File

@ -481,6 +481,8 @@ static int gprs_sm_prim_handle_gmmsm_establish_cnf(struct osmo_gprs_gmm_prim *gm
sme->ms->gmm.ptmsi = gmm_prim->gmmsm.establish_cnf.acc.allocated_ptmsi;
/* Set allocated TLLI: */
sme->ms->gmm.tlli = gmm_prim->gmmsm.establish_cnf.acc.allocated_tlli;
/* Set the current RAI: */
memcpy(&sme->ms->gmm.ra, &gmm_prim->gmmsm.establish_cnf.acc.rai, sizeof(sme->ms->gmm.ra));
rc = osmo_fsm_inst_dispatch(sme->ms_fsm.fi, GPRS_SM_MS_EV_RX_GMM_ESTABLISH_CNF, NULL);
} else {
rc = osmo_fsm_inst_dispatch(sme->ms_fsm.fi, GPRS_SM_MS_EV_RX_GMM_ESTABLISH_REJ, NULL);