aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2020-11-06 23:19:45 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2020-11-10 18:46:34 +0100
commit1680a7866595865acf39eddb0f27ca8d52d1c92a (patch)
treec45dd8572943eb3607fb9a591ef8d4d0c9b352a8
parent98439edd85882bf9e8377f78af1bd5f63ba0212a (diff)
abis_rsl: parse cm3 and indicate ACCH repetition cap to BTSpmaier/acch
In order to activate FACCH/SACCH repetition on the BTS, the classmark 3 IE in the CLASSMARK CHANGE message must be parsed and depending on the Repeated ACCH Capability bit the RSL_IE_OSMO_REP_ACCH_CAP is added to the RSL CHAN ACT und RSL CHAN MODE MODIFY. Since RSL_IE_OSMO_REP_ACCH_CAP is a propritary IE, it may only be added for BTS type osmo-bts. Change-Id: I39ae439d05562b35b2e47774dc92f8789fea1a57 Depends: libosmocore Ic8b2bfd00330235f5bed00771e421588abfaac1f Related: OS#4796 SYS#5114
-rw-r--r--include/osmocom/bsc/gsm_data.h4
-rw-r--r--src/osmo-bsc/abis_rsl.c24
-rw-r--r--src/osmo-bsc/gsm_08_08.c11
3 files changed, 39 insertions, 0 deletions
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index ed40e360f..d75cb5073 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -322,6 +322,10 @@ struct gsm_subscriber_connection {
enum subscr_sccp_state state;
} lb;
} lcs;
+
+ /* Set to true when Repeated ACCH Capability bit in Classmark 3 is set.
+ * see also: 3GPP TS 24.008, section 10.5.1.7 */
+ bool repeated_acch_capability;
};
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index 858c683e1..1d4285354 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -457,6 +457,28 @@ static void mr_config_for_bts(struct gsm_lchan *lchan, struct msgb *msg)
lchan->mr_bts_lv + 1);
}
+/* indicate FACCH/SACCH Repetition to be performed by BTS,
+ * see also: 3GPP TS 44.006, section 10 and 11 */
+static void put_rsl_ie_osmo_rep_acch_cap(struct gsm_lchan *lchan, struct msgb *msg)
+{
+ uint8_t val[1];
+
+ if (!lchan->conn)
+ return;
+
+ /* The RSL_IE_OSMO_REP_ACCH_CAP IE is a proprietary IE, that can only
+ * be used with osmo-bts type BTSs */
+ if (conn_get_bts(lchan->conn)->model->type != GSM_BTS_TYPE_OSMOBTS)
+ return;
+
+ if (lchan->conn && lchan->conn->repeated_acch_capability)
+ val[0] = 0x01;
+ else
+ val[0] = 0x00;
+
+ msgb_tlv_put(msg, RSL_IE_OSMO_REP_ACCH_CAP, sizeof(val), val);
+}
+
/* Chapter 8.4.1 */
int rsl_tx_chan_activ(struct gsm_lchan *lchan, uint8_t act_type, uint8_t ho_ref)
{
@@ -552,6 +574,7 @@ int rsl_tx_chan_activ(struct gsm_lchan *lchan, uint8_t act_type, uint8_t ho_ref)
better skip sending it unless we know for sure what each expects. */
mr_config_for_bts(lchan, msg);
+ put_rsl_ie_osmo_rep_acch_cap(lchan, msg);
msg->dst = trx->rsl_link;
@@ -590,6 +613,7 @@ int rsl_chan_mode_modify_req(struct gsm_lchan *lchan)
}
mr_config_for_bts(lchan, msg);
+ put_rsl_ie_osmo_rep_acch_cap(lchan, msg);
msg->dst = lchan->ts->trx->rsl_link;
diff --git a/src/osmo-bsc/gsm_08_08.c b/src/osmo-bsc/gsm_08_08.c
index 2c51c958a..354797249 100644
--- a/src/osmo-bsc/gsm_08_08.c
+++ b/src/osmo-bsc/gsm_08_08.c
@@ -34,6 +34,7 @@
#include <osmocom/bsc/lcs_loc_req.h>
#include <osmocom/gsm/protocol/gsm_08_08.h>
+#include <osmocom/gsm/protocol/gsm_04_08.h>
#include <osmocom/gsm/gsm0808.h>
#include <osmocom/gsm/mncc.h>
#include <osmocom/gsm/gsm48.h>
@@ -582,6 +583,7 @@ void bsc_cm_update(struct gsm_subscriber_connection *conn,
const uint8_t *cm3, uint8_t cm3_len)
{
struct gsm48_classmark2 *cm2_parsed = (struct gsm48_classmark2 *)cm2;
+ struct gsm48_classmark3 cm3_parsed;
int8_t rc8;
int rc;
struct msgb *resp;
@@ -602,6 +604,15 @@ void bsc_cm_update(struct gsm_subscriber_connection *conn,
}
conn_update_ms_power_class(conn, rc8);
+ rc = gsm48_decode_classmark3(&cm3_parsed, cm3, cm3_len);
+ if (rc < 0) {
+ LOGP(DMSC, LOGL_NOTICE, "Unable to decode classmark3 during CM Update.\n");
+ } else {
+ conn->repeated_acch_capability = false;
+ if (cm3_parsed.repeated_acch_capability)
+ conn->repeated_acch_capability = true;
+ }
+
if (!msc_connected(conn))
return;