gmm: Implement submitting GMMSM-RELEASE.ind when MS becomes detached
Change-Id: I74176eba870b19b30666ab5deef5eb56f0f0fd83
This commit is contained in:
parent
16ed7760f1
commit
42f51083f5
|
@ -102,7 +102,7 @@ struct osmo_gprs_gmm_prim *gprs_gmm_prim_alloc_gmmreg_sim_auth_ind(void);
|
|||
struct osmo_gprs_gmm_prim *gprs_gmm_prim_alloc_gmmrr_assign_req(uint32_t old_tlli, uint32_t new_tlli);
|
||||
|
||||
struct osmo_gprs_gmm_prim *gprs_gmm_prim_alloc_gmmsm_establish_cnf(uint32_t id, uint8_t cause);
|
||||
struct osmo_gprs_gmm_prim *gprs_gmm_prim_alloc_gmmrr_release_ind(uint32_t id);
|
||||
struct osmo_gprs_gmm_prim *gprs_gmm_prim_alloc_gmmsm_release_ind(uint32_t id);
|
||||
struct osmo_gprs_gmm_prim *gprs_gmm_prim_alloc_gmmsm_unitdata_ind(uint32_t id, uint8_t *smpdu, unsigned int smpdu_len);
|
||||
|
||||
/* gmm.c: */
|
||||
|
@ -131,6 +131,7 @@ int gprs_gmm_tx_ciph_auth_resp(const struct gprs_gmm_entity *gmme, const uint8_t
|
|||
|
||||
int gprs_gmm_submit_gmmreg_attach_cnf(struct gprs_gmm_entity *gmme, bool accepted, uint8_t cause);
|
||||
int gprs_gmm_submit_gmmsm_establish_cnf(struct gprs_gmm_entity *gmme, bool accepted, uint8_t cause);
|
||||
int gprs_gmm_submit_gmmsm_release_ind(struct gprs_gmm_entity *gmme);
|
||||
int gprs_gmm_submit_llgmm_assing_req(const struct gprs_gmm_entity *gmme);
|
||||
|
||||
/* misc.c */
|
||||
|
|
|
@ -453,6 +453,16 @@ int gprs_gmm_submit_gmmsm_establish_cnf(struct gprs_gmm_entity *gmme, bool accep
|
|||
return rc;
|
||||
}
|
||||
|
||||
int gprs_gmm_submit_gmmsm_release_ind(struct gprs_gmm_entity *gmme)
|
||||
{
|
||||
struct osmo_gprs_gmm_prim *gmm_prim_tx;
|
||||
int rc;
|
||||
|
||||
gmm_prim_tx = gprs_gmm_prim_alloc_gmmsm_release_ind(gmme->sess_id);
|
||||
rc = gprs_gmm_prim_call_up_cb(gmm_prim_tx);
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int gprs_gmm_submit_gmmrr_assing_req(struct gprs_gmm_entity *gmme)
|
||||
{
|
||||
struct osmo_gprs_gmm_prim *gmm_prim_tx;
|
||||
|
@ -911,8 +921,6 @@ static int gprs_gmm_rx_detach_accept(struct gprs_gmm_entity *gmme, struct gsm48_
|
|||
if (force_standby_indicated)
|
||||
gprs_gmm_gmme_ready_timer_stop(gmme);
|
||||
|
||||
/* TODO: submit GMMSM-RELEASE-IND */
|
||||
|
||||
/* Submit LLGMM-ASSIGN-REQ as per TS 24.007 Annex C.3 */
|
||||
gmme->old_tlli = gmme->tlli;
|
||||
gmme->tlli = GPRS_GMM_TLLI_UNASSIGNED;
|
||||
|
|
|
@ -89,6 +89,10 @@ static void st_gmm_ms_deregistered_on_enter(struct osmo_fsm_inst *fi, uint32_t p
|
|||
|
||||
memset(&ctx->attach, 0, sizeof(ctx->attach));
|
||||
gprs_gmm_gmme_t3312_stop(ctx->gmme);
|
||||
|
||||
/* TS 24.007 9.5.1.4: informs SM layerthat the MS has been GPRS detached, e.g. by timer expiry */
|
||||
if (prev_state != GPRS_GMM_MS_ST_NULL)
|
||||
gprs_gmm_submit_gmmsm_release_ind(ctx->gmme);
|
||||
}
|
||||
|
||||
static void st_gmm_ms_deregistered(struct osmo_fsm_inst *fi, uint32_t event, void *data)
|
||||
|
|
|
@ -294,10 +294,10 @@ int test_gmm_prim_up_cb(struct osmo_gprs_gmm_prim *gmm_prim, void *user_data)
|
|||
osmo_hexdump(gmm_prim->gmmsm.unitdata_ind.smpdu,
|
||||
gmm_prim->gmmsm.unitdata_ind.smpdu_len));
|
||||
break;
|
||||
//case OSMO_PRIM(OSMO_GPRS_GMM_GMMSM_DETACH, PRIM_OP_CONFIRM):
|
||||
// printf("%s(): Rx %s detach_type='%s'\n", __func__, pdu_name,
|
||||
// osmo_gprs_gmm_detach_ms_type_name(gmm_prim->gmmsm.detach_cnf.detach_type));
|
||||
// break;
|
||||
case OSMO_PRIM(OSMO_GPRS_GMM_GMMSM_RELEASE, PRIM_OP_INDICATION):
|
||||
printf("%s(): Rx %s sess_id=%u\n", __func__, pdu_name,
|
||||
gmm_prim->gmmsm.sess_id);
|
||||
break;
|
||||
default:
|
||||
printf("%s(): Unexpected Rx %s\n", __func__, pdu_name);
|
||||
OSMO_ASSERT(0)
|
||||
|
|
|
@ -23,6 +23,7 @@ test_gmm_prim_llc_down_cb(): Rx LLGMM-TRIGGER.request TLLI=0xec999002
|
|||
test_gmm_prim_llc_down_cb(): Rx LL-UNITDATA.request TLLI=0xec999002 SAPI=GMM l3=[08 05 20 0a 00 05 f4 ec 99 90 02 ]
|
||||
test_gmm_prim_llc_down_cb(): Rx LLGMM-ASSIGN.request old_TLLI=0xec999002 new_TLLI=0xffffffff
|
||||
test_gmm_prim_up_cb(): Rx GMMREG-DETACH.confirm detach_type='GPRS detach'
|
||||
test_gmm_prim_up_cb(): Rx GMMSM-RELEASE.indication sess_id=4294967295
|
||||
==== test_gmm_prim_ms_gmmreg() [end] ====
|
||||
==== test_gmm_prim_ms_gmmsm() [start] ====
|
||||
sys={0.000000}, mono={0.000000}: clock_override_set
|
||||
|
|
Loading…
Reference in New Issue