Change in osmo-bsc[master]: abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS

2020-12-01 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21084 )

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


Patch Set 11: Code-Review+2


--
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: 11
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 01 Dec 2020 11:58:02 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS

2020-12-01 Thread laforge
laforge has submitted this change. ( 
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
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, 43 insertions(+), 0 deletions(-)

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



diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index ed40e36..a5b5a50 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -322,6 +322,9 @@
enum subscr_sccp_state state;
} lb;
} lcs;
+
+   struct gsm48_classmark3 cm3;
+   bool cm3_valid;
 };


diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index 858c683..f8ea5a5 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -457,6 +457,35 @@
 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 rep_acch_cap_for_bts(struct gsm_lchan *lchan,
+struct msgb *msg)
+{
+   struct abis_rsl_osmo_rep_acch_cap *cap;
+   struct gsm_bts *bts = lchan->ts->trx->bts;
+
+   /* The RSL_IE_OSMO_REP_ACCH_CAP IE is a proprietary IE, that can only
+* be used with osmo-bts type BTSs */
+   if (!(bts->model->type == GSM_BTS_TYPE_OSMOBTS
+ && osmo_bts_has_feature(>features, BTS_FEAT_ACCH_REP)))
+   return;
+
+   cap = (struct abis_rsl_osmo_rep_acch_cap*) msg->tail;
+   msgb_tlv_put(msg, RSL_IE_OSMO_REP_ACCH_CAP, sizeof(*cap),
+(uint8_t*) >repeated_acch_policy);
+
+   if (!(lchan->conn && lchan->conn->cm3_valid
+ && lchan->conn->cm3.repeated_acch_capability)) {
+   /* MS supports only FACCH repetition for command frames, so
+* we mask out all other features, even when they are enabled
+* on this BTS. */
+   cap->dl_facch_all = 0;
+   cap->dl_sacch = 0;
+   cap->ul_sacch = 0;
+   }
+}
+
 /* Chapter 8.4.1 */
 int rsl_tx_chan_activ(struct gsm_lchan *lchan, uint8_t act_type, uint8_t 
ho_ref)
 {
@@ -552,6 +581,7 @@
   better skip sending it unless we know for sure what each expects. */

mr_config_for_bts(lchan, msg);
+   rep_acch_cap_for_bts(lchan, msg);

msg->dst = trx->rsl_link;

@@ -590,6 +620,7 @@
}

mr_config_for_bts(lchan, msg);
+rep_acch_cap_for_bts(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..9c5cf2f 100644
--- a/src/osmo-bsc/gsm_08_08.c
+++ b/src/osmo-bsc/gsm_08_08.c
@@ -34,6 +34,7 @@
 #include 

 #include 
+#include 
 #include 
 #include 
 #include 
@@ -602,6 +603,14 @@
}
conn_update_ms_power_class(conn, rc8);

+rc = gsm48_decode_classmark3(>cm3, cm3, cm3_len);
+   if (rc < 0) {
+   LOGP(DMSC, LOGL_NOTICE, "Unable to decode classmark3 during CM 
Update.\n");
+   memset(>cm3, 0, sizeof(conn->cm3));
+   conn->cm3_valid = false;
+   } else
+   conn->cm3_valid = 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: 12
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-bsc[master]: abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS

2020-11-26 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21084 )

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


Patch Set 11: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/11/src/osmo-bsc/gsm_08_08.c
File src/osmo-bsc/gsm_08_08.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/11/src/osmo-bsc/gsm_08_08.c@612
PS11, Line 612: conn->cm3_valid = true;
else {}



--
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: 11
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Thu, 26 Nov 2020 12:26:49 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS

2020-11-26 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21084 )

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


Patch Set 11: Code-Review+1


--
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: 11
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Thu, 26 Nov 2020 10:05:31 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS

2020-11-20 Thread dexter
dexter has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21084 )

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


Patch Set 10:

This change is ready for review.


--
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: 10
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 20 Nov 2020 17:56:49 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bsc[master]: abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS

2020-11-20 Thread dexter
dexter has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21084 )

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


Patch Set 9:

(1 comment)

I did not squash this and the previous patch because I thought it would be 
simpler to review. I should have done that, but I think now its a little late 
as well.

The VTY settings write directly on an abis_rsl_osmo_rep_acch_cap struct. This 
patch just uses this struct in abis_rsl.c, but only when the the MS indicates 
the repeated_acch is supported. If not it sends the IE anyway, but masks out 
everything except repeated FACCH with command frames only (any MS supports 
this). Also the BTS must have support for ACCH repeation as well, but we know 
this from the BTS features we receive via OML.

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/8/src/osmo-bsc/abis_rsl.c
File src/osmo-bsc/abis_rsl.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/8/src/osmo-bsc/abis_rsl.c@475
PS8, Line 475:  msgb_tlv_put(msg, RSL_IE_OSMO_REP_ACCH_CAP, sizeof(*cap),
> No, msgb_tlv_put() returns pointer past the added TLV.
Done



--
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: 9
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 20 Nov 2020 15:12:06 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-bsc[master]: abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS

2020-11-20 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21084 )

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


Patch Set 9: Code-Review+2

I don't see the per-BTS and vty configured flag of the previous patch used 
here, which makes me wonder even more what it might be intended to used for?

This patch looks good in that it only considers the auto-discovered features of 
the BTS and the classmark of the MS!


--
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: 9
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 20 Nov 2020 09:05:31 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS

2020-11-19 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21084 )

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


Patch Set 8: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/8/src/osmo-bsc/abis_rsl.c
File src/osmo-bsc/abis_rsl.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/8/src/osmo-bsc/abis_rsl.c@475
PS8, Line 475:  msgb_tlv_put(msg, RSL_IE_OSMO_REP_ACCH_CAP, sizeof(*cap),
> AFAIU you can directly do cap = msgb_tlb_put(... here.
No, msgb_tlv_put() returns pointer past the added TLV.



--
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: 8
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Comment-Date: Thu, 19 Nov 2020 11:59:14 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-bsc[master]: abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS

2020-11-19 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21084 )

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


Patch Set 8: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/8/src/osmo-bsc/abis_rsl.c
File src/osmo-bsc/abis_rsl.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/8/src/osmo-bsc/abis_rsl.c@475
PS8, Line 475:  msgb_tlv_put(msg, RSL_IE_OSMO_REP_ACCH_CAP, sizeof(*cap),
AFAIU you can directly do cap = msgb_tlb_put(... here.



--
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: 8
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-CC: fixeria 
Gerrit-CC: laforge 
Gerrit-Comment-Date: Thu, 19 Nov 2020 11:57:05 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS

2020-11-19 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21084 )

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


Patch Set 8:

(1 comment)

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/4/src/osmo-bsc/abis_rsl.c
File src/osmo-bsc/abis_rsl.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/4/src/osmo-bsc/abis_rsl.c@476
PS4, Line 476:  if (!(bts->model->type == GSM_BTS_TYPE_OSMOBTS
> What happens if we have a different BTS vendor that also has 
> BTS_FEAT_ACCH_REP, but implemented diff […]
How can this ever happen if this is osmocom specific?



--
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: 8
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-CC: fixeria 
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Thu, 19 Nov 2020 11:52:41 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: dexter 
Gerrit-MessageType: comment


Change in osmo-bsc[master]: abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS

2020-11-19 Thread dexter
dexter has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21084 )

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


Patch Set 8:

(6 comments)

thanks for your review!

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/4/src/osmo-bsc/abis_rsl.c
File src/osmo-bsc/abis_rsl.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/4/src/osmo-bsc/abis_rsl.c@476
PS4, Line 476:  if (!(bts->model->type == GSM_BTS_TYPE_OSMOBTS
> Remove BTS type and simply check for the feature.
What happens if we have a different BTS vendor that also has BTS_FEAT_ACCH_REP, 
but implemented differently?


https://gerrit.osmocom.org/c/osmo-bsc/+/21084/7/src/osmo-bsc/abis_rsl.c
File src/osmo-bsc/abis_rsl.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/7/src/osmo-bsc/abis_rsl.c@462
PS7, Line 462: static void put_rsl_ie_osmo_rep_acch_cap(struct gsm_lchan *lchan,
> (function name reads like it always puts an RSL IE in a msgb, but it first 
> decides on whether that s […]
Done


https://gerrit.osmocom.org/c/osmo-bsc/+/21084/7/src/osmo-bsc/abis_rsl.c@468 
PS7, Line 468: if (!lchan->conn)
 :  return;
 :
 :  bts = conn_get_bts(lchan->conn);
 :  OSMO_ASSERT(bts);
> instead of all this, just say […]
Done


https://gerrit.osmocom.org/c/osmo-bsc/+/21084/7/src/osmo-bsc/abis_rsl.c@494
PS7, Line 494:  msgb_tlv_put(msg, RSL_IE_OSMO_REP_ACCH_CAP, sizeof(cap),
> I think it should be possible to avoid allocating this structure on stack and 
> then copying it over t […]
Done


https://gerrit.osmocom.org/c/osmo-bsc/+/21084/7/src/osmo-bsc/abis_rsl.c@495
PS7, Line 495:   (uint8_t *) & cap);
> (unusual spaces)
Done


https://gerrit.osmocom.org/c/osmo-bsc/+/21084/4/src/osmo-bsc/gsm_08_08.c
File src/osmo-bsc/gsm_08_08.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/4/src/osmo-bsc/gsm_08_08.c@613
PS4, Line 613:  conn->repeated_acch_capability = true;
> As stated I'd put the "struct gsm48_classmark3" cm3 field inside conn struct 
> and simply pass it to g […]
Done



--
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: 8
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-CC: fixeria 
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Thu, 19 Nov 2020 11:45:28 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels 
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


Change in osmo-bsc[master]: abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS

2020-11-19 Thread dexter
Hello Jenkins Builder, neels,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-bsc/+/21084

to look at the new patch set (#8).

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
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, 43 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/84/21084/8
--
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: 8
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-CC: fixeria 
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-MessageType: newpatchset


Change in osmo-bsc[master]: abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS

2020-11-18 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21084 )

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


Patch Set 7:

(1 comment)

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/7/src/osmo-bsc/abis_rsl.c
File src/osmo-bsc/abis_rsl.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/7/src/osmo-bsc/abis_rsl.c@494
PS7, Line 494:  msgb_tlv_put(msg, RSL_IE_OSMO_REP_ACCH_CAP, sizeof(cap),
I think it should be possible to avoid allocating this structure on stack and 
then copying it over to the buffer on heap:

  struct abis_rsl_osmo_rep_acch_cap *cap;

  cap = (struct abis_rsl_osmo_rep_acch_cap *) msgb->tail;
  msgb_tlv_put(msg, RSL_IE_OSMO_REP_ACCH_CAP, sizeof(*cap),
   (uint8_t *) bts->repeated_acch_capability_bts);

  cap->foo = bar; // ...



--
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: 7
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-CC: fixeria 
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Wed, 18 Nov 2020 08:22:31 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bsc[master]: abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS

2020-11-17 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21084 )

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


Patch Set 7: Code-Review+1

(4 comments)

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/7/src/osmo-bsc/abis_rsl.c
File src/osmo-bsc/abis_rsl.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/7/src/osmo-bsc/abis_rsl.c@462
PS7, Line 462: static void put_rsl_ie_osmo_rep_acch_cap(struct gsm_lchan *lchan,
(function name reads like it always puts an RSL IE in a msgb, but it first 
decides on whether that should happen, maybe acch_cap_config() or something?)


https://gerrit.osmocom.org/c/osmo-bsc/+/21084/7/src/osmo-bsc/abis_rsl.c@468
PS7, Line 468: if (!lchan->conn)
 :  return;
 :
 :  bts = conn_get_bts(lchan->conn);
 :  OSMO_ASSERT(bts);
instead of all this, just say

 bts = lchan->ts->trx->bts;

read conn_get_bts() for the reason; also no need to assert presence of the BTS, 
an lchan is guaranteed to always have a bts backpointer


https://gerrit.osmocom.org/c/osmo-bsc/+/21084/7/src/osmo-bsc/abis_rsl.c@495
PS7, Line 495:   (uint8_t *) & cap);
(unusual spaces)


https://gerrit.osmocom.org/c/osmo-bsc/+/21084/7/src/osmo-bsc/gsm_08_08.c
File src/osmo-bsc/gsm_08_08.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/7/src/osmo-bsc/gsm_08_08.c@609
PS7, Line 609:  memset(>cm3, 0, sizeof(conn->cm3));
(could just do  'conn->cm3 = {};')



--
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: 7
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 23:07:48 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS

2020-11-17 Thread dexter
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-bsc/+/21084

to look at the new patch set (#6).

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
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, 52 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/84/21084/6
--
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: 6
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-MessageType: newpatchset


Change in osmo-bsc[master]: abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS

2020-11-16 Thread dexter
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-bsc/+/21084

to look at the new patch set (#5).

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
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, 47 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/84/21084/5
--
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: 5
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-MessageType: newpatchset


Change in osmo-bsc[master]: abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS

2020-11-16 Thread dexter
dexter has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21084 )

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


Patch Set 4:

> Patch Set 4:
>
> (2 comments)
>
> I'm wondering whether it would make more sense to simply parse cm3 inside 
> osmo-bts and apply whatever is needed directly in there instead of doing it 
> in osmo-bsc, given there's no standard way to notify this information in Abis.

Unfortunately this is not possible. The CLASSMARK CHANGE is transferred while 
the MS is still on an SDCCH/4, one would need to correlate which lchan belongs 
to which MS, the BTS does not know about this, but the BSC does. Thats why we 
have to parse the CM3 in the BSC and signal the repeated acch capabilities back 
to the BTS.


--
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: 4
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Mon, 16 Nov 2020 17:01:08 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bsc[master]: abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS

2020-11-16 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21084 )

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


Patch Set 4:

(2 comments)

I'm wondering whether it would make more sense to simply parse cm3 inside 
osmo-bts and apply whatever is needed directly in there instead of doing it in 
osmo-bsc, given there's no standard way to notify this information in Abis.

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/4/src/osmo-bsc/abis_rsl.c
File src/osmo-bsc/abis_rsl.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/4/src/osmo-bsc/abis_rsl.c@476
PS4, Line 476:  if (!(bts->model->type == GSM_BTS_TYPE_OSMOBTS
Remove BTS type and simply check for the feature.


https://gerrit.osmocom.org/c/osmo-bsc/+/21084/4/src/osmo-bsc/gsm_08_08.c
File src/osmo-bsc/gsm_08_08.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/4/src/osmo-bsc/gsm_08_08.c@613
PS4, Line 613:  conn->repeated_acch_capability = true;
As stated I'd put the "struct gsm48_classmark3" cm3 field inside conn struct 
and simply pass it to gsm48_decode_classmark3 above, then you don't need this 
extra field.



--
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: 4
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Mon, 16 Nov 2020 09:33:11 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bsc[master]: abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS

2020-11-15 Thread dexter
dexter has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21084 )

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


Patch Set 4:

(3 comments)

This change is ready for review.

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/1/include/osmocom/bsc/gsm_data.h
File include/osmocom/bsc/gsm_data.h:

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/1/include/osmocom/bsc/gsm_data.h@328
PS1, Line 328:  bool repeated_acch_capability;
> yes, I also think that is a very good idea, but it could be done in a 
> subsequent patch. […]
Done


https://gerrit.osmocom.org/c/osmo-bsc/+/21084/1/src/osmo-bsc/abis_rsl.c
File src/osmo-bsc/abis_rsl.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/1/src/osmo-bsc/abis_rsl.c@467
PS1, Line 467:  /* The RSL_IE_OSMO_REP_ACCH_CAP IE is a propritary IE, that can 
only
> proprietary
Done


https://gerrit.osmocom.org/c/osmo-bsc/+/21084/1/src/osmo-bsc/abis_rsl.c@469
PS1, Line 469:  if (conn_get_bts(lchan->conn)->model->type != 
GSM_BTS_TYPE_OSMOBTS)
> We should negotiate the feature in OML.
I understand, you mean that the BTS should set the feature flags...



-- 
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: 4
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Sun, 15 Nov 2020 20:28:41 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-bsc[master]: abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS

2020-11-11 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21084 )

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


Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/1/include/osmocom/bsc/gsm_data.h
File include/osmocom/bsc/gsm_data.h:

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/1/include/osmocom/bsc/gsm_data.h@328
PS1, Line 328:  bool repeated_acch_capability;
> what about storing here the whole MS cm3 in case we need more info later?
yes, I also think that is a very good idea, but it could be done in a 
subsequent patch.  The more advanced features we add, the more likely we need 
access to decoded CM3



--
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: 3
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Wed, 11 Nov 2020 19:58:43 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-bsc[master]: abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS

2020-11-10 Thread dexter
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-bsc/+/21084

to look at the new patch set (#3).

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, 39 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/84/21084/3
--
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: 3
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-MessageType: newpatchset


Change in osmo-bsc[master]: abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS

2020-11-10 Thread dexter
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-bsc/+/21084

to look at the new patch set (#2).

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/2
--
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: 2
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-MessageType: newpatchset


Change in osmo-bsc[master]: abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS

2020-11-09 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21084 )

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


Patch Set 1:

(3 comments)

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/1/include/osmocom/bsc/gsm_data.h
File include/osmocom/bsc/gsm_data.h:

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/1/include/osmocom/bsc/gsm_data.h@328
PS1, Line 328:  bool repeated_acch_capability;
what about storing here the whole MS cm3 in case we need more info later?


https://gerrit.osmocom.org/c/osmo-bsc/+/21084/1/src/osmo-bsc/abis_rsl.c
File src/osmo-bsc/abis_rsl.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/1/src/osmo-bsc/abis_rsl.c@467
PS1, Line 467:  /* The RSL_IE_OSMO_REP_ACCH_CAP IE is a propritary IE, that can 
only
proprietary


https://gerrit.osmocom.org/c/osmo-bsc/+/21084/1/src/osmo-bsc/abis_rsl.c@469
PS1, Line 469:  if (conn_get_bts(lchan->conn)->model->type != 
GSM_BTS_TYPE_OSMOBTS)
We should negotiate the feature in OML.



--
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 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Comment-Date: Mon, 09 Nov 2020 12:53:09 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bsc[master]: abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS

2020-11-09 Thread dexter
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 

 #include 
+#include 
 #include 
 #include 
 #include 
@@ -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(_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 
Gerrit-MessageType: newchange