diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2021-06-04 17:53:37 +0200 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2021-06-05 15:48:53 +0000 |
commit | 4d5604ad92e1ffd09efde2180feb94b6620ceace (patch) | |
tree | 4a492f741152b8ac8673f5110385a8fc52c8b1de | |
parent | 245465662e14109ca6797707308bf5f7634e2ef0 (diff) |
fixup: pass tsc = -1 for previous default training sequence code
An unintended change in default behavior was introduced in patch:
"allow explixit TSC Set and TSC on chan activ / modif / assignment"
Ic665125255d7354f5499d10dda1dd866ab243d24
c33eb8d56943b8981523754b081967e6ff5f245d
Set tsc_set and tsc = -1 for all lchan_activate_info and
assignment_request requests to actually yield the default behavior of
selecting the TSC based on the timeslot cfg or the BSIC value.
By setting tsc = 0 implicitly, the patch caused all requests to ask for
tsc 0 instead of calling gsm_ts_tsc().
For a Channel Mode Modify in assignment_fsm, pass the lchan's current
TSC to keep it unchanged.
osmo-ttcn3-hacks Id67a949e0f61ec8123976eb8d336f04510c55c01 adds a test
to verify the expected TSC in all of the activation, assignment and
modify messages. Current osmo-bsc master fails, this patch fixes.
Related: SYS#5315 OS#4940 Ic665125255d7354f5499d10dda1dd866ab243d24
Change-Id: If12df11511fe22ea167782f776736a1a9c484b1f
-rw-r--r-- | src/osmo-bsc/abis_rsl.c | 2 | ||||
-rw-r--r-- | src/osmo-bsc/assignment_fsm.c | 6 | ||||
-rw-r--r-- | src/osmo-bsc/lchan_fsm.c | 2 | ||||
-rw-r--r-- | src/osmo-bsc/osmo_bsc_bssap.c | 4 |
4 files changed, 13 insertions, 1 deletions
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index fc8e217c6..69052ee67 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -1807,6 +1807,8 @@ void abis_rsl_chan_rqd_queue_poll(struct gsm_bts *bts) }, .ta = rqd->ta, .ta_known = true, + .tsc_set = -1, + .tsc = -1, }; lchan_activate(lchan, &info); diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c index 6a9eb810d..a15807acb 100644 --- a/src/osmo-bsc/assignment_fsm.c +++ b/src/osmo-bsc/assignment_fsm.c @@ -808,14 +808,18 @@ static void assignment_fsm_wait_mgw_endpoint_to_msc(struct osmo_fsm_inst *fi, ui static void assignment_fsm_wait_lchan_modified_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) { struct gsm_subscriber_connection *conn = assignment_fi_conn(fi); + struct gsm_lchan *lchan = conn->lchan; struct assignment_request *req = &conn->assignment.req; struct lchan_modify_info modif_info = { .modify_for = MODIFY_FOR_ASSIGNMENT, .ch_mode_rate = conn->assignment.selected_ch_mode_rate, .requires_voice_stream = conn->assignment.requires_voice_stream, .msc_assigned_cic = req->msc_assigned_cic, + /* keep previous training sequence code */ + .tsc_set = lchan->tsc_set, + .tsc = lchan->tsc, }; - lchan_mode_modify(conn->lchan, &modif_info); + lchan_mode_modify(lchan, &modif_info); } static void assignment_fsm_wait_lchan_modified(struct osmo_fsm_inst *fi, uint32_t event, void *data) diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c index 17e0c891e..c06735f76 100644 --- a/src/osmo-bsc/lchan_fsm.c +++ b/src/osmo-bsc/lchan_fsm.c @@ -984,6 +984,8 @@ static void lchan_fsm_wait_rsl_chan_mode_modify_ack(struct osmo_fsm_inst *fi, ui .ch_mode_rate = lchan->modify.ch_mode_rate, .requires_voice_stream = true, .msc_assigned_cic = lchan->modify.info.msc_assigned_cic, + .tsc_set = -1, + .tsc = -1, }; lchan->activate.concluded = false; lchan_fsm_state_chg(LCHAN_ST_WAIT_RLL_RTP_ESTABLISH); diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index d6048bfc9..da0429bf2 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -928,6 +928,8 @@ static int bssmap_handle_assignm_req(struct gsm_subscriber_connection *conn, .msc_assigned_cic = cic, .use_osmux = use_osmux, .osmux_cid = osmux_cid, + .tsc_set = -1, + .tsc = -1, }; /* Match codec information from the assignment command against the @@ -954,6 +956,8 @@ static int bssmap_handle_assignm_req(struct gsm_subscriber_connection *conn, req = (struct assignment_request){ .assign_for = ASSIGN_FOR_BSSMAP_REQ, .aoip = aoip, + .tsc_set = -1, + .tsc = -1, }; rc = select_sign_chan(&req, &ct); |