This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
neels gerrit-no-reply at lists.osmocom.orgneels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/24375 )
Change subject: implement CHANnel ACTIVate to VAMOS mode
......................................................................
implement CHANnel ACTIVate to VAMOS mode
Related: SYS#5315 OS#4940
Change-Id: If3ac584e4223ef7656c7fedc3bf11df87e4309ec
---
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/abis_rsl.c
M src/osmo-bsc/bsc_vty.c
M src/osmo-bsc/lchan_fsm.c
M tests/osmo-bsc.vty
5 files changed, 54 insertions(+), 17 deletions(-)
Approvals:
neels: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 61e52f6..fc6ce30 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -602,6 +602,8 @@
/* TSC to use, or -1 for automatically determining the TSC to use. Valid range is 0 to 7, as described in 3GPP
* TS 45.002. */
int tsc;
+
+ bool vamos;
};
enum lchan_modify_for {
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index 40bfcec..c206937 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -534,7 +534,7 @@
/* PDCH activation is a job for rsl_tx_dyn_ts_pdch_act_deact(); */
OSMO_ASSERT(act_type != RSL_ACT_OSMO_PDCH);
- rc = channel_mode_from_lchan(&cm, lchan, &lchan->activate.ch_mode_rate, false);
+ rc = channel_mode_from_lchan(&cm, lchan, &lchan->activate.ch_mode_rate, lchan->activate.info.vamos);
if (rc < 0) {
LOGP(DRSL, LOGL_ERROR,
"%s Cannot find channel mode from lchan type\n",
@@ -620,6 +620,10 @@
rep_acch_cap_for_bts(lchan, msg);
+ /* Selecting a specific TSC Set is only applicable to VAMOS mode */
+ if (lchan->activate.info.vamos && lchan->activate.tsc_set >= 1)
+ put_osmo_training_sequence_ie(msg, lchan->activate.tsc_set, lchan->activate.tsc);
+
msg->dst = rsl_chan_link(lchan);
rate_ctr_inc(rate_ctr_group_get_ctr(bts->bts_ctrs, BTS_CTR_CHAN_ACT_TOTAL));
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index 79026a1..1f208bc 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -6215,6 +6215,13 @@
info.ch_mode_rate.chan_rate = chan_t_to_chan_rate(lchan_t);
+ if (activate == 2 || lchan->vamos.is_secondary) {
+ info.vamos = true;
+ info.tsc_set = lchan->vamos.is_secondary ? 1 : 0;
+ info.tsc = 0;
+ info.ch_mode_rate.chan_mode = gsm48_chan_mode_to_vamos(info.ch_mode_rate.chan_mode);
+ }
+
vty_out(vty, "%% activating lchan %s as %s%s", gsm_lchan_name(lchan), gsm_chan_t_name(lchan->type),
VTY_NEWLINE);
lchan_activate(lchan, &info);
@@ -6287,9 +6294,10 @@
* manually in a given mode/codec. This is useful for receiver
* performance testing (FER/RBER/...) */
DEFUN(lchan_act, lchan_act_cmd,
- "bts <0-255> trx <0-255> timeslot <0-7> sub-slot <0-7> (activate|deactivate) (hr|fr|efr|amr|sig) [<0-7>]",
+ "bts <0-255> trx <0-255> timeslot <0-7> sub-slot <0-7> (activate|activate-vamos|deactivate) (hr|fr|efr|amr|sig) [<0-7>]",
BTS_NR_TRX_TS_SS_STR2
"Manual Channel Activation (e.g. for BER test)\n"
+ "Manual Channel Activation, in VAMOS mode\n"
"Manual Channel Deactivation (e.g. for BER test)\n"
"Half-Rate v1\n" "Full-Rate\n" "Enhanced Full Rate\n" "Adaptive Multi-Rate\n" "Signalling\n" "AMR Mode\n")
{
@@ -6312,6 +6320,8 @@
if (!strcmp(act_str, "activate"))
activate = 1;
+ else if (!strcmp(act_str, "activate-vamos"))
+ activate = 2;
else
activate = 0;
diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c
index b772482..c429243 100644
--- a/src/osmo-bsc/lchan_fsm.c
+++ b/src/osmo-bsc/lchan_fsm.c
@@ -311,6 +311,16 @@
OSMO_ASSERT(lchan && info);
+ if ((info->vamos || lchan->vamos.is_secondary)
+ && !osmo_bts_has_feature(&lchan->ts->trx->bts->features, BTS_FEAT_VAMOS)) {
+ lchan->last_error = talloc_strdup(lchan->ts->trx, "VAMOS related channel activation requested,"
+ " but BTS does not support VAMOS");
+ LOG_LCHAN(lchan, LOGL_ERROR,
+ "VAMOS related channel activation requested, but BTS %u does not support VAMOS\n",
+ lchan->ts->trx->bts->nr);
+ goto abort;
+ }
+
if (!lchan_state_is(lchan, LCHAN_ST_UNUSED))
goto abort;
@@ -608,7 +618,13 @@
{
struct osmo_fsm_inst *fi = lchan->fi;
lchan->activate.ch_mode_rate = lchan->activate.info.ch_mode_rate;
- /* future: automatically adjust chan_mode in lchan->activate.ch_mode_rate */
+ lchan->activate.ch_mode_rate.chan_mode = (lchan->activate.info.vamos
+ ? gsm48_chan_mode_to_vamos(lchan->activate.info.ch_mode_rate.chan_mode)
+ : gsm48_chan_mode_to_non_vamos(lchan->activate.info.ch_mode_rate.chan_mode));
+ if (lchan->activate.ch_mode_rate.chan_mode < 0) {
+ lchan_fail("Invalid chan_mode: %s", gsm48_chan_mode_name(lchan->activate.info.ch_mode_rate.chan_mode));
+ return -EINVAL;
+ }
if (gsm48_chan_mode_to_non_vamos(lchan->activate.ch_mode_rate.chan_mode) == GSM48_CMODE_SPEECH_AMR) {
if (lchan_mr_config(&lchan->activate.mr_conf_filtered, lchan, lchan->activate.ch_mode_rate.s15_s0) < 0) {
@@ -737,10 +753,12 @@
lchan->encr = lchan->activate.info.encr;
+ /* If enabling VAMOS mode and no specific TSC Set was selected, make sure to select a sane TSC Set by
+ * default: Set 1 for the primary and Set 2 for the shadow lchan. For non-VAMOS lchans, TSC Set 1. */
if (lchan->activate.info.tsc_set > 0)
lchan->activate.tsc_set = lchan->activate.info.tsc_set;
else
- lchan->activate.tsc_set = 1;
+ lchan->activate.tsc_set = lchan->vamos.is_secondary ? 2 : 1;
/* Use the TSC provided in the modification request, if any. Otherwise use the timeslot's configured
* TSC. */
@@ -819,6 +837,7 @@
lchan->current_ch_mode_rate = lchan->activate.ch_mode_rate;
lchan->current_mr_conf = lchan->activate.mr_conf_filtered;
+ lchan->vamos.enabled = lchan->activate.info.vamos;
lchan->tsc_set = lchan->activate.tsc_set;
lchan->tsc = lchan->activate.tsc;
LOG_LCHAN(lchan, LOGL_INFO, "Rx Activ ACK %s\n",
diff --git a/tests/osmo-bsc.vty b/tests/osmo-bsc.vty
index fba2390..c7e9e6d 100644
--- a/tests/osmo-bsc.vty
+++ b/tests/osmo-bsc.vty
@@ -6,12 +6,13 @@
...
OsmoBSC# bts 0 trx 0 timeslot 0 sub-slot 0 ?
- activate Manual Channel Activation (e.g. for BER test)
- deactivate Manual Channel Deactivation (e.g. for BER test)
- modify Manually send Channel Mode Modify (for debugging)
- mdcx Modify RTP Connection
- handover Manually trigger handover (for debugging)
- assignment Manually trigger assignment (for debugging)
+ activate Manual Channel Activation (e.g. for BER test)
+ activate-vamos Manual Channel Activation, in VAMOS mode
+ deactivate Manual Channel Deactivation (e.g. for BER test)
+ modify Manually send Channel Mode Modify (for debugging)
+ mdcx Modify RTP Connection
+ handover Manually trigger handover (for debugging)
+ assignment Manually trigger assignment (for debugging)
OsmoBSC# bts 0 trx 0 timeslot 0 sub-slot 0 modify ?
vamos Enable VAMOS channel mode
@@ -32,7 +33,7 @@
OsmoBSC# list
...
- bts <0-255> trx <0-255> timeslot <0-7> sub-slot <0-7> (activate|deactivate) (hr|fr|efr|amr|sig) [<0-7>]
+ bts <0-255> trx <0-255> timeslot <0-7> sub-slot <0-7> (activate|activate-vamos|deactivate) (hr|fr|efr|amr|sig) [<0-7>]
...
OsmoBSC# bts?
@@ -65,12 +66,13 @@
<0-7> Sub-slot Number
OsmoBSC# bts 0 trx 0 timeslot 0 sub-slot 0 ?
- activate Manual Channel Activation (e.g. for BER test)
- deactivate Manual Channel Deactivation (e.g. for BER test)
- modify Manually send Channel Mode Modify (for debugging)
- mdcx Modify RTP Connection
- handover Manually trigger handover (for debugging)
- assignment Manually trigger assignment (for debugging)
+ activate Manual Channel Activation (e.g. for BER test)
+ activate-vamos Manual Channel Activation, in VAMOS mode
+ deactivate Manual Channel Deactivation (e.g. for BER test)
+ modify Manually send Channel Mode Modify (for debugging)
+ mdcx Modify RTP Connection
+ handover Manually trigger handover (for debugging)
+ assignment Manually trigger assignment (for debugging)
OsmoBSC# bts 0 trx 0 timeslot 0 sub-slot 0 activate ?
hr Half-Rate v1
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/24375
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: If3ac584e4223ef7656c7fedc3bf11df87e4309ec
Gerrit-Change-Number: 24375
Gerrit-PatchSet: 21
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210610/2d1fd344/attachment.htm>