From 1af2267fa05c0ff2069b6fe83caa62940ba39ce5 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 13 Jan 2017 00:23:42 +0100 Subject: WIP: Support Early Classmark Sending If SI3 rest octets indicate EARLY CM Sending is allowed, and the 'support' indicates we support it (which we now do by default), then send the classmark change message every time a LAPDm link layer is established. --- src/host/layer23/src/mobile/gsm48_rr.c | 6 ++++++ src/host/layer23/src/mobile/support.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c index 76eaf8f5..6794636f 100644 --- a/src/host/layer23/src/mobile/gsm48_rr.c +++ b/src/host/layer23/src/mobile/gsm48_rr.c @@ -3297,6 +3297,8 @@ static int gsm48_rr_dl_est(struct osmocom_ms *ms) static int gsm48_rr_estab_cnf(struct osmocom_ms *ms, struct msgb *msg) { struct gsm48_rrlayer *rr = &ms->rrlayer; + struct gsm_support *sup = &ms->support; + struct gsm322_cellsel *cs = &ms->cellsel; uint8_t *mode; struct msgb *nmsg; @@ -3317,6 +3319,10 @@ static int gsm48_rr_estab_cnf(struct osmocom_ms *ms, struct msgb *msg) /* 3.3.1.1.4 */ new_rr_state(rr, GSM48_RR_ST_DEDICATED); + /* early classmark sending */ + if (cs->si->ecsm && sup->es_ind) + gsm48_rr_tx_cm_change(ms); + /* send confirm to upper layer */ nmsg = gsm48_rr_msgb_alloc( (rr->rr_est_req) ? GSM48_RR_EST_CNF : GSM48_RR_EST_IND); diff --git a/src/host/layer23/src/mobile/support.c b/src/host/layer23/src/mobile/support.c index 063733a7..e9361a35 100644 --- a/src/host/layer23/src/mobile/support.c +++ b/src/host/layer23/src/mobile/support.c @@ -33,7 +33,7 @@ void gsm_support_init(struct osmocom_ms *ms) sup->ms = ms; /* controlled early classmark sending */ - sup->es_ind = 0; /* no */ + sup->es_ind = 1; /* yes */ /* revision level */ sup->rev_lev = 1; /* phase 2 mobile station */ /* support of VGCS */ -- cgit v1.2.3