diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2021-06-02 20:20:03 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2021-06-02 20:30:35 +0200 |
commit | 2f88133083c74daebc331ccea1899af52085697a (patch) | |
tree | db7e659d903cacb5132b3ad066a33f2884b1f3f5 /src/osmo-bsc/gsm_04_08_rr.c | |
parent | 829c8e505216210502571a79fe371cf49d805d7b (diff) |
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:
Ic665125255d7354f5499d10dda1dd866ab243d24
"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
Diffstat (limited to 'src/osmo-bsc/gsm_04_08_rr.c')
-rw-r--r-- | src/osmo-bsc/gsm_04_08_rr.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/osmo-bsc/gsm_04_08_rr.c b/src/osmo-bsc/gsm_04_08_rr.c index 058a1074a..5948e944c 100644 --- a/src/osmo-bsc/gsm_04_08_rr.c +++ b/src/osmo-bsc/gsm_04_08_rr.c @@ -681,7 +681,6 @@ int gsm48_lchan_modify(struct gsm_lchan *lchan, uint8_t mode) 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 @@ int gsm48_lchan_modify(struct gsm_lchan *lchan, uint8_t mode) 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 */ |