Change in osmo-bsc[master]: fixup for Mode Modify TSC

neels gerrit-no-reply at
Fri Jun 4 11:30:44 UTC 2021

neels has submitted this change. ( )

Change subject: fixup for Mode Modify TSC

fixup for Mode Modify TSC

Use lchan->modify.tsc in gsm48_lchan_modify().

The TSC is chosen exactly once upon LCHAN_EV_REQUEST_MODE_MODIFY
(lchan_fsm.c), and that should be the only place calling gsm_ts_tsc().
All other mode modify code should just use the final lchan->modify.tsc.

This fixes an error in patch:
"allow explixit TSC Set and TSC on chan activ / modif / assignment"

Thanks to coverity for actually detecting this mistake.

Related: SYS#5315 OS#4940 CID#236233
Change-Id: I87ecf7d9266f37f4c775d029e277b614671a9401
M src/osmo-bsc/gsm_04_08_rr.c
1 file changed, 1 insertion(+), 5 deletions(-)

  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  fixeria: Looks good to me, approved

diff --git a/src/osmo-bsc/gsm_04_08_rr.c b/src/osmo-bsc/gsm_04_08_rr.c
index 058a107..5948e94 100644
--- a/src/osmo-bsc/gsm_04_08_rr.c
+++ b/src/osmo-bsc/gsm_04_08_rr.c
@@ -681,7 +681,6 @@
 	struct gsm48_chan_mode_modify *cmm =
 		(struct gsm48_chan_mode_modify *) msgb_put(msg, sizeof(*cmm));
 	struct gsm_bts *bts = lchan->ts->trx->bts;
-	uint8_t tsc;
 	DEBUGP(DRR, "-> CHANNEL MODE MODIFY mode=0x%02x\n", mode);
@@ -689,10 +688,7 @@
 	gh->proto_discr = GSM48_PDISC_RR;
 	gh->msg_type = GSM48_MT_RR_CHAN_MODE_MODIF;
-	/* fill the channel information element, this code
-	 * should probably be shared with rsl_rx_chan_rqd() */
-	tsc = (lchan->modify.tsc >= 0) ? lchan->modify.tsc : gsm_ts_tsc(lchan->ts);
-	gsm48_lchan2chan_desc(&cmm->chan_desc, lchan, tsc);
+	gsm48_lchan2chan_desc(&cmm->chan_desc, lchan, lchan->modify.tsc);
 	cmm->mode = mode;
 	/* in case of multi rate we need to attach a config */

To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I87ecf7d9266f37f4c775d029e277b614671a9401
Gerrit-Change-Number: 24516
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at>
Gerrit-Reviewer: neels <nhofmeyr at>
Gerrit-Reviewer: pespin <pespin at>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list