dexter has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21084 )


Change subject: abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS
......................................................................

abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS

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
---
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/abis_rsl.c
M src/osmo-bsc/gsm_08_08.c
3 files changed, 33 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/84/21084/1

diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index ed40e36..d75cb50 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -322,6 +322,10 @@
                        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 858c683..6bcacdf 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -457,6 +457,22 @@
                     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)
+{
+       if (!lchan->conn)
+               return;
+
+       /* The RSL_IE_OSMO_REP_ACCH_CAP IE is a propritary 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)
+               msgb_tv_fixed_put(msg, RSL_IE_OSMO_REP_ACCH_CAP, 0, NULL);
+}
+
 /* Chapter 8.4.1 */
 int rsl_tx_chan_activ(struct gsm_lchan *lchan, uint8_t act_type, uint8_t 
ho_ref)
 {
@@ -552,6 +568,7 @@
           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 +607,7 @@
        }

        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 2c51c95..3547972 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 @@
                   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 @@
        }
        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;


--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/21084
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I39ae439d05562b35b2e47774dc92f8789fea1a57
Gerrit-Change-Number: 21084
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pma...@sysmocom.de>
Gerrit-MessageType: newchange

Reply via email to