osmith has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/34683?usp=email )

Change subject: Do not prefix UI header to System Information Type 10
......................................................................

Do not prefix UI header to System Information Type 10

System Information Type 10 uses short L2 header that is transmitted as
Bter UI frame. The complete frame is sent by BSC, including short L2
header. Only the SACCH layer 1 header is added by the BTS.

A switch() statement is used, so other System Information with short L2
header can be added in the future.

Change-Id: Ifede42bfd84ea5914b559a20ae68f594d2ee1a5c
(cherry picked from commit ddc15996ddecfdb533d77ae45fa33587c51bb223)
---
M src/common/rsl.c
1 file changed, 26 insertions(+), 0 deletions(-)

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




diff --git a/src/common/rsl.c b/src/common/rsl.c
index 5231765..fdb9899 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -993,6 +993,15 @@
  *  \param[in] len length of \a current in octets */
 static inline void lapdm_ui_prefix(uint8_t *buf, uint32_t *valid, const 
uint8_t *current, uint8_t osmo_si, uint16_t len)
 {
+       /* Special case for short header SI. Do not pre-fix the two-byte UI 
header. */
+       switch (osmo_si) {
+       case SYSINFO_TYPE_10:
+               (*valid) |= (1 << osmo_si);
+               memset(buf, GSM_MACBLOCK_PADDING, sizeof(sysinfo_buf_t));
+               memcpy(buf, current, len);
+               return;
+       }
+
        /* We have to pre-fix with the two-byte LAPDM UI header */
        if (len > sizeof(sysinfo_buf_t) - 2) {
                LOGP(DRSL, LOGL_ERROR, "Truncating received SI%s (%u -> %zu) to 
prepend LAPDM UI header (2 bytes)\n",

--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/34683?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: osmith/1.7.1
Gerrit-Change-Id: Ifede42bfd84ea5914b559a20ae68f594d2ee1a5c
Gerrit-Change-Number: 34683
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osm...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <lafo...@osmocom.org>
Gerrit-Reviewer: osmith <osm...@sysmocom.de>
Gerrit-Reviewer: pespin <pes...@sysmocom.de>
Gerrit-CC: jolly <andr...@eversberg.eu>
Gerrit-MessageType: merged

Reply via email to