fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/31582 )
Change subject: doxygen: fix various typos in commands \param and \returns
......................................................................
doxygen: fix various typos in commands \param and \returns
Change-Id: If87cec3739449c6a54e24fb2cb81e746d8244da2
---
M src/codec/ecu.c
M src/core/exec.c
M src/core/mnl.c
M src/ctrl/control_if.c
M src/gb/gprs_ns.c
M src/gb/gprs_ns2_message.c
M src/gsm/gsm0411_utils.c
M src/gsm/gsm48_ie.c
M src/gsm/lapdm.c
M src/gsm/tlv_parser.c
M src/isdn/i460_mux.c
11 files changed, 23 insertions(+), 14 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/82/31582/1
diff --git a/src/codec/ecu.c b/src/codec/ecu.c
index 59194ae..def72e6 100644
--- a/src/codec/ecu.c
+++ b/src/codec/ecu.c
@@ -44,7 +44,7 @@
/*! initialize an ECU instance for given codec.
* \param[in] ctx talloc context from which to allocate
- * \parma[in] codec codec for which to initialize/create ECU */
+ * \param[in] codec codec for which to initialize/create ECU */
struct osmo_ecu_state *osmo_ecu_init(void *ctx, enum osmo_ecu_codec codec)
{
if (codec >= ARRAY_SIZE(g_ecu_ops))
diff --git a/src/core/exec.c b/src/core/exec.c
index fd63d85..6412270 100644
--- a/src/core/exec.c
+++ b/src/core/exec.c
@@ -74,7 +74,7 @@
*
* Constraints: Keys up to a maximum length of 255 characters are supported.
*
- * \oaram[out] out caller-allocated array of pointers for the generated output
+ * \param[out] out caller-allocated array of pointers for the generated output
* \param[in] out_len size of out (number of pointers)
* \param[in] in input environment (NULL-terminated list of pointers like **environ)
* \param[in] whitelist whitelist of permitted keys in environment (like **environ)
@@ -131,7 +131,7 @@
* Constraints: If the same key exists in 'out' and 'in', duplicate keys are
* generated. It is a simple append, without any duplicate checks.
*
- * \oaram[out] out caller-allocated array of pointers for the generated output
+ * \param[out] out caller-allocated array of pointers for the generated output
* \param[in] out_len size of out (number of pointers)
* \param[in] in input environment (NULL-terminated list of pointers like **environ)
* \returns number of entries filled in 'out'; negative on error */
diff --git a/src/core/mnl.c b/src/core/mnl.c
index c3f5fe6..d148e1b 100644
--- a/src/core/mnl.c
+++ b/src/core/mnl.c
@@ -54,7 +54,7 @@
}
/*! create an osmocom-wrapped limnl netlink socket.
- * \parma[in] ctx talloc context from which to allocate
+ * \param[in] ctx talloc context from which to allocate
* \param[in] bus netlink socket bus ID (see NETLINK_* constants)
* \param[in] groups groups of messages to bind/subscribe to
* \param[in] mnl_cb callback function called for each incoming message
diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c
index 9438f7e..94b8975 100644
--- a/src/ctrl/control_if.c
+++ b/src/ctrl/control_if.c
@@ -96,7 +96,7 @@
/*! Send a CTRL command to all connections.
* \param[in] ctrl global control handle
- * \param[in] cmd command to send to all connections in \ctrl
+ * \param[in] cmd command to send to all connections in ctrl
* \returns number of times the command has been sent */
int ctrl_cmd_send_to_all(struct ctrl_handle *ctrl, struct ctrl_cmd *cmd)
{
@@ -1048,7 +1048,7 @@
* This function is used by e.g. library code to install lookup helpers
* for additional nodes in the control interface.
* \param[in] lookup The lookup helper function
- * \retuns - on success; negative on error.
+ * \returns - on success; negative on error.
*/
int ctrl_lookup_register(ctrl_cmd_lookup lookup)
{
diff --git a/src/gb/gprs_ns.c b/src/gb/gprs_ns.c
index e250eda..304fe7c 100644
--- a/src/gb/gprs_ns.c
+++ b/src/gb/gprs_ns.c
@@ -532,7 +532,7 @@
/*! Transmit a NS-RESET on a given NSVC
* \param[in] nsvc NS-VC used for transmission
- * \paam[in] cause Numeric NS cause value
+ * \param[in] cause Numeric NS cause value
*/
int gprs_ns_tx_reset(struct gprs_nsvc *nsvc, uint8_t cause)
{
diff --git a/src/gb/gprs_ns2_message.c b/src/gb/gprs_ns2_message.c
index cc95334..1b986fe 100644
--- a/src/gb/gprs_ns2_message.c
+++ b/src/gb/gprs_ns2_message.c
@@ -282,7 +282,7 @@
/*! Transmit a NS-RESET on a given NS-VC.
* \param[in] nsvc NS-VC used for transmission
- * \paam[in] cause Numeric NS cause value
+ * \param[in] cause Numeric NS cause value
* \returns 0 in case of success */
int ns2_tx_reset(struct gprs_ns2_vc *nsvc, uint8_t cause)
{
diff --git a/src/gsm/gsm0411_utils.c b/src/gsm/gsm0411_utils.c
index c26cd82..470b017 100644
--- a/src/gsm/gsm0411_utils.c
+++ b/src/gsm/gsm0411_utils.c
@@ -293,7 +293,7 @@
* \param[in] type GSM340_TYPE_*
* \param[in] plan Numbering Plan
* \param[in] number string containing number
- * \reurns number of bytes of \a oa that have been used */
+ * \returns number of bytes of \a oa that have been used */
int gsm340_gen_oa(uint8_t *oa, unsigned int oa_len, uint8_t type,
uint8_t plan, const char *number)
{
@@ -348,7 +348,7 @@
* \param[in] proto Protocol
* \param[in] trans Transaction
* \param[in] msg_type Message Type
- * \retrns 0 */
+ * \returns 0 */
int gsm411_push_cp_header(struct msgb *msg, uint8_t proto, uint8_t trans,
uint8_t msg_type)
{
diff --git a/src/gsm/gsm48_ie.c b/src/gsm/gsm48_ie.c
index 11b7168..e431e4f 100644
--- a/src/gsm/gsm48_ie.c
+++ b/src/gsm/gsm48_ie.c
@@ -369,7 +369,7 @@
/*! Decode TS 04.08 Call Control Capabilities IE (10.5.4.5a)
* \param[out] Caller-provided memory for decoded CC capabilities
* \param[in] lv Length-Value of IE
- * \retursns 0 on success; negative on error */
+ * \returns 0 on success; negative on error */
int gsm48_decode_cccap(struct gsm_mncc_cccap *ccap, const uint8_t *lv)
{
uint8_t in_len = lv[0];
diff --git a/src/gsm/lapdm.c b/src/gsm/lapdm.c
index e7d46e6..b7f5769 100644
--- a/src/gsm/lapdm.c
+++ b/src/gsm/lapdm.c
@@ -253,7 +253,7 @@
* \param[in] t200_ms_dcch per-SAPI array of T200 in milli-seconds for DCCH
* \param[in] t200_ms_acch per-SAPI array of T200 in milli-seconds for SACCH
* \param[in] chan_t GSM channel type (to correctly set N200)
- * \parma[in] name_pfx human-readable name (copied by function + extended with ACCH/DCCH)
+ * \param[in] name_pfx human-readable name (copied by function + extended with ACCH/DCCH)
*/
int lapdm_channel_init3(struct lapdm_channel *lc, enum lapdm_mode mode,
const int *t200_ms_dcch, const int *t200_ms_acch, enum gsm_chan_t chan_t,
diff --git a/src/gsm/tlv_parser.c b/src/gsm/tlv_parser.c
index c5aac97..de76688 100644
--- a/src/gsm/tlv_parser.c
+++ b/src/gsm/tlv_parser.c
@@ -126,7 +126,7 @@
* \param[inout] msg Caller-allocated message buffer with sufficient tailroom
* \param[in] type TLV type/format to use during encode
* \param[in] tag Tag of TLV to be encoded
- * \parma[in] len Length of TLV to be encoded
+ * \param[in] len Length of TLV to be encoded
* \param[in] val Value part of TLV to be encoded
* \returns 0 on success; negative in case of error */
int tlv_encode_one(struct msgb *msg, enum tlv_type type, uint8_t tag,
diff --git a/src/isdn/i460_mux.c b/src/isdn/i460_mux.c
index 9e9489a..0e84816 100644
--- a/src/isdn/i460_mux.c
+++ b/src/isdn/i460_mux.c
@@ -197,7 +197,7 @@
/*! provide one byte with the subchan-specific bits of given sub-channel.
* \param[in] schan sub-channel that is to provide bits
- * \parma[out] mask bitmask of those bits filled in
+ * \param[out] mask bitmask of those bits filled in
* \returns bits of given sub-channel */
static uint8_t mux_subchan_provide_bits(struct osmo_i460_subchan *schan, uint8_t *mask)
{
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31582
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: If87cec3739449c6a54e24fb2cb81e746d8244da2
Gerrit-Change-Number: 31582
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/31176 )
Change subject: support for Ericsson RBS E1 CCU
......................................................................
Patch Set 14:
(2 comments)
File src/ericsson-rbs/er_ccu_l1_if.c:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-4116):
https://gerrit.osmocom.org/c/osmo-pcu/+/31176/comment/f0155c85_07b95af8
PS14, Line 241: "afn_ul=%u (computed) != afn_ul=%u (sync-ind) => delta=%u \n", afn_ul,
unnecessary whitespace before a quoted newline
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-4116):
https://gerrit.osmocom.org/c/osmo-pcu/+/31176/comment/452b4156_b709cc25
PS14, Line 246: "afn_dl=%u (computed) != afn_dl=%u (sync-ind) => delta=%u \n", afn_dl,
unnecessary whitespace before a quoted newline
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/31176
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I5c0a76667339ca984a12cbd2052f5d9e5b0f9c4d
Gerrit-Change-Number: 31176
Gerrit-PatchSet: 14
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 27 Feb 2023 19:50:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-pcu/+/31176
to look at the new patch set (#14).
Change subject: support for Ericsson RBS E1 CCU
......................................................................
support for Ericsson RBS E1 CCU
Ericsson RBS series BTSs do not have a built in PCU. Rather than having
the PCU on board the PCU is co-located to the BTS in those cases. Just
like the MGW the PCU would connect to the CCU (Channel Coding Unit) via
E1 line. The PCU is connected via an unix domain socket (pcu_sock) to
the BSC to receive RACH requests and to control Paging and TBF assignment.
This patch adds all the required functionality to fun an Ercisson RBS in
GPRS/EGPRS mode. It supports 16k I.460 E1 subslots and full 64k E1
timeslots (recommended)
Change-Id: I5c0a76667339ca984a12cbd2052f5d9e5b0f9c4d
Related: OS#5198
---
M configure.ac
M src/Makefile.am
A src/ericsson-rbs/er_ccu_descr.h
A src/ericsson-rbs/er_ccu_if.c
A src/ericsson-rbs/er_ccu_if.h
A src/ericsson-rbs/er_ccu_l1_if.c
A src/ericsson-rbs/er_ccu_l1_if.h
M src/gprs_debug.c
M src/gprs_debug.h
M src/pcu_l1_if.cpp
M src/pcu_l1_if.h
11 files changed, 1,142 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/76/31176/14
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/31176
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I5c0a76667339ca984a12cbd2052f5d9e5b0f9c4d
Gerrit-Change-Number: 31176
Gerrit-PatchSet: 14
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: neels, pespin, fixeria.
Hello Jenkins Builder, laforge, fixeria, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-pcu/+/31145
to look at the new patch set (#17).
Change subject: bts: add IMMEDIATE ASSIGNMENT via PCH transmission
......................................................................
bts: add IMMEDIATE ASSIGNMENT via PCH transmission
In situations where the PCU is co-located to the BSC, the IMMEDIATE ASSIGNMENT
for downlink TBFs must be sent via RSL and the BSC also must instruct the BTS
to transmit the IMMEDIATE ASSIGNMENT via PCH instead of AGCH. Eventually the
BSC must sent a confirmation message (follow-up patch) where the TLLI is used
as an identifer.
Change-Id: I2a78651593323e8b9627c39918d949a33497b70f
Related: OS#5198
---
M include/osmocom/pcu/pcuif_proto.h
M src/bts.cpp
M src/bts.h
M src/pcu_l1_if.cpp
M src/pcu_l1_if.h
5 files changed, 65 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/45/31145/17
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/31145
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I2a78651593323e8b9627c39918d949a33497b70f
Gerrit-Change-Number: 31145
Gerrit-PatchSet: 17
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: neels, pespin, fixeria.
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/31145 )
Change subject: bts: add IMMEDIATE ASSIGNMENT via PCH transmission
......................................................................
Patch Set 17:
(2 comments)
File src/bts.h:
https://gerrit.osmocom.org/c/osmo-pcu/+/31145/comment/16bc6db8_9db56f2e
PS16, Line 284: bool use_dt_confirm;
> what does "dt" mean?
DT stands für "Direct TLLI" that refers to a way where we directly transfer the TLLI instead of using a payload that just contains the TLLI.
File src/pcu_l1_if.cpp:
https://gerrit.osmocom.org/c/osmo-pcu/+/31145/comment/360a633d_44477aac
PS5, Line 320: data[sizeof(tlli) + (PAGING_GROUP_LEN - 1 - i)]
> i also dislike the pattern of unreadable encoding magic, especially in the middle of flow control an […]
Ye have discussed this today. I will add a struct for that.
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/31145
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I2a78651593323e8b9627c39918d949a33497b70f
Gerrit-Change-Number: 31145
Gerrit-PatchSet: 17
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 27 Feb 2023 19:50:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: comment
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/31176 )
Change subject: support for Ericsson RBS E1 CCU
......................................................................
Patch Set 13:
(1 comment)
Patchset:
PS13:
@neels Thanks for reviewing this. I will get to your comments tomorrow. Since there were some changes in patches below I had to update a few code pathes. I will post those changes now.
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/31176
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I5c0a76667339ca984a12cbd2052f5d9e5b0f9c4d
Gerrit-Change-Number: 31176
Gerrit-PatchSet: 13
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 27 Feb 2023 19:49:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31578 )
Change subject: pcu_sock: use struct to transfer IMMEDIATE ASSIGNMENT for PCH
......................................................................
Patch Set 1:
(1 comment)
File src/osmo-bsc/pcu_sock.c:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-4113):
https://gerrit.osmocom.org/c/osmo-bsc/+/31578/comment/08cff42f_354c01ac
PS1, Line 575: pch_dt = (struct gsm_pcu_if_pch_dt*)data_req->data;
"(foo*)" should be "(foo *)"
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31578
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Id6acbd243adf26169e5e8319dd66bb68dd6a3c22
Gerrit-Change-Number: 31578
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Mon, 27 Feb 2023 19:47:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31577 )
Change subject: abis_rsl: assert maximum length
......................................................................
abis_rsl: assert maximum length
The length parameter in rsl_imm_assign_cmd_common() may cause a buffer
overflow when it is chosen larger than GSM_MACBLOCK_LEN. This should be
asserted.
Change-Id: I9417b35fb8c0517f2555e17059bf8ac60fa59791
---
M src/osmo-bsc/abis_rsl.c
1 file changed, 14 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/77/31577/1
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index ee2e2d3..410f08e 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -944,6 +944,7 @@
break;
default:
/* If phase 2, construct a FULL_IMM_ASS_INFO */
+ OSMO_ASSERT(len <= sizeof(buf));
pad_macblock(buf, val, len);
msgb_tlv_put(msg, RSL_IE_FULL_IMM_ASS_INFO, GSM_MACBLOCK_LEN,
buf);
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31577
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I9417b35fb8c0517f2555e17059bf8ac60fa59791
Gerrit-Change-Number: 31577
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31578 )
Change subject: pcu_sock: use struct to transfer IMMEDIATE ASSIGNMENT for PCH
......................................................................
pcu_sock: use struct to transfer IMMEDIATE ASSIGNMENT for PCH
When the IMMEDIATE ASSIGNMENT is sent from the PCU to the BSC using the
"direct TLLI" method, the TLLI (and the paging group) is premended to
the MAC block. Currently we are taking the fields apart manually using
offsets. The code for this is difficult to read and the method is error
prone. Lets define a struct that we can just overlay to access the
fields directly.
Change-Id: Id6acbd243adf26169e5e8319dd66bb68dd6a3c22
Related: OS#5198
---
M include/osmocom/bsc/pcuif_proto.h
M src/osmo-bsc/pcu_sock.c
2 files changed, 39 insertions(+), 11 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/78/31578/1
diff --git a/include/osmocom/bsc/pcuif_proto.h b/include/osmocom/bsc/pcuif_proto.h
index 7e13b5c..1d12f50 100644
--- a/include/osmocom/bsc/pcuif_proto.h
+++ b/include/osmocom/bsc/pcuif_proto.h
@@ -3,6 +3,7 @@
#include <osmocom/gsm/l1sap.h>
#include <arpa/inet.h>
+#include <osmocom/gsm/protocol/gsm_04_08.h>
#define PCU_SOCK_DEFAULT "/tmp/pcu_bts"
@@ -270,6 +271,17 @@
} cgi_ps;
} __attribute__ ((packed));
+/* Container to send a (confirmed) IMMEDIATE ASSIGNMENT message via PCH. The struct is send as a data request
+ * (data_req) under SAPI PCU_IF_SAPI_PCH_DT. */
+struct gsm_pcu_if_pch_dt {
+ /* TLLI as reference for confirmation */
+ uint32_t tlli;
+ /* Paging group */
+ uint8_t pgroup[3];
+ /* GSM mac-block (with immediate assignment message) */
+ uint8_t data[GSM_MACBLOCK_LEN];
+} __attribute__((packed));
+
struct gsm_pcu_if {
/* context based information */
uint8_t msg_type; /* message type */
diff --git a/src/osmo-bsc/pcu_sock.c b/src/osmo-bsc/pcu_sock.c
index 0d84781..8286f68 100644
--- a/src/osmo-bsc/pcu_sock.c
+++ b/src/osmo-bsc/pcu_sock.c
@@ -533,9 +533,9 @@
struct gsm_pcu_if_data *data_req)
{
struct msgb *msg;
- uint32_t tlli = -1;
uint8_t pag_grp;
int rc = 0;
+ struct gsm_pcu_if_pch_dt *pch_dt;
LOGP(DPCU, LOGL_DEBUG, "Data request received: sapi=%s arfcn=%d "
"block=%d data=%s\n", sapi_string[data_req->sapi],
@@ -566,34 +566,33 @@
/* DT = direct TLLI. A tlli is prefixed so that the BSC/BTS can confirm the sending of the downlink
* IMMEDIATE ASSIGNMENT towards the PCU using this TLLI as a reference. */
- if (data_req->len < 8) {
+ if (data_req->len < sizeof(struct gsm_pcu_if_pch_dt)) {
LOGP(DPCU, LOGL_ERROR, "Received PCU data request with invalid/small length %d\n",
data_req->len);
break;
}
- /* Extract 4 byte TLLI */
- memcpy(&tlli, data_req->data, 4);
+ pch_dt = (struct gsm_pcu_if_pch_dt*)data_req->data;
- /* Extract 3 byte paging group */
- pag_grp = extract_paging_group(bts, data_req->data + 4);
+ pag_grp = extract_paging_group(bts, pch_dt->pgroup);
LOGP(DPCU, LOGL_DEBUG, "PCU Sends immediate assignment via PCH (tlli=0x%08x, pag_grp=0x%02x)\n",
- tlli, pag_grp);
- msg = msgb_alloc(data_req->len - 7, "pcu_pch");
+ pch_dt->tlli, pag_grp);
+ msg = msgb_alloc(sizeof(pch_dt->data), "pcu_pch");
if (!msg) {
rc = -ENOMEM;
break;
}
- msg->l3h = msgb_put(msg, data_req->len - 7);
- memcpy(msg->l3h, data_req->data + 7, data_req->len - 7);
+
+ msg->l3h = msgb_put(msg, sizeof(pch_dt->data));
+ memcpy(msg->l3h, pch_dt->data, sizeof(pch_dt->data));
/* NOTE: Sending an IMMEDIATE ASSIGNMENT via PCH became necessary with GPRS in order to be able to
* assign downlink TBFs directly through the paging channel. However, this method never became part
* of the RSL specs. This means that each BTS vendor has to come up with a proprietary method. At
* the moment we only support Ericsson RBS here. */
if (bts->type == GSM_BTS_TYPE_RBS2000) {
- rc = rsl_ericsson_imm_assign_cmd(bts, tlli, msg->len, msg->data, pag_grp);
+ rc = rsl_ericsson_imm_assign_cmd(bts, pch_dt->tlli, msg->len, msg->data, pag_grp);
} else {
LOGP(DPCU, LOGL_ERROR, "BTS model does not support sending immediate assignment via PCH!\n");
rc = -ENOTSUP;
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31578
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Id6acbd243adf26169e5e8319dd66bb68dd6a3c22
Gerrit-Change-Number: 31578
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange