aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2023-08-08 16:10:54 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2023-08-08 17:40:22 +0200
commit4f538375280ebb9eef2d3214d504d560b4d03ea9 (patch)
tree65eff08287b34b95926f56229ce6a869d8da3067
parentb74b3ae38f94b2108a7382c71ab8b3c103f44c0a (diff)
pcuif_proto: rename tlli to msg_id
To confirm downlink IMMEDIATE ASSIGNMENT messages, we use the TLLI as an identifier and the related struct member is also called "tlli". Unfortunately this is misleading since the message identifier does not necessarly have to be a TLLI. It is just an implementation detail that osmo-pcu uses the TLLI as a message identifier. To make that clear, lets rename the tlli member (and variable and parameter names where it is passed on) to "msg_id". (Since this change only renames variables and struct members it will not break compatibility with other programs that use the PCUIF) Related: OS#5927 Depends: osmo-pcu.git I4a25039dfe329e68879bc68936e49c4b190625e6 Change-Id: Ifb3f257099b52c50e525768484f9e93282089d0f
-rw-r--r--include/osmocom/bsc/abis_rsl.h2
-rw-r--r--include/osmocom/bsc/pcu_if.h2
-rw-r--r--include/osmocom/bsc/pcuif_proto.h10
-rw-r--r--src/osmo-bsc/abis_rsl.c10
-rw-r--r--src/osmo-bsc/pcu_sock.c15
5 files changed, 18 insertions, 21 deletions
diff --git a/include/osmocom/bsc/abis_rsl.h b/include/osmocom/bsc/abis_rsl.h
index 3da0d6ce4..a6b2cefd1 100644
--- a/include/osmocom/bsc/abis_rsl.h
+++ b/include/osmocom/bsc/abis_rsl.h
@@ -67,7 +67,7 @@ int rsl_establish_request(struct gsm_lchan *lchan, uint8_t link_id);
int rsl_relase_request(struct gsm_lchan *lchan, uint8_t link_id);
/* Ericcson vendor specific RSL extensions */
-int rsl_ericsson_imm_assign_cmd(const struct gsm_bts *bts, uint32_t tlli, uint8_t len,
+int rsl_ericsson_imm_assign_cmd(const struct gsm_bts *bts, uint32_t msg_id, uint8_t len,
const uint8_t *val, uint8_t pag_grp);
/* Siemens vendor-specific RSL extensions */
diff --git a/include/osmocom/bsc/pcu_if.h b/include/osmocom/bsc/pcu_if.h
index 525b2e49b..d2d3444f0 100644
--- a/include/osmocom/bsc/pcu_if.h
+++ b/include/osmocom/bsc/pcu_if.h
@@ -25,7 +25,7 @@ int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint16_t ra, uint32_t fn,
uint8_t is_11bit, enum ph_burst_type burst_type);
/* Confirm the sending of an immediate assignment to the pcu */
-int pcu_tx_pch_confirm(struct gsm_bts *bts, uint32_t tlli);
+int pcu_tx_pch_confirm(struct gsm_bts *bts, uint32_t msg_id);
/* Open connection to PCU */
int pcu_sock_init(struct gsm_network *net);
diff --git a/include/osmocom/bsc/pcuif_proto.h b/include/osmocom/bsc/pcuif_proto.h
index 1dda160d0..80e3b6d75 100644
--- a/include/osmocom/bsc/pcuif_proto.h
+++ b/include/osmocom/bsc/pcuif_proto.h
@@ -41,7 +41,7 @@
#define PCU_IF_SAPI_PDTCH 0x05 /* packet data/control/ccch block */
#define PCU_IF_SAPI_PRACH 0x06 /* packet random access channel */
#define PCU_IF_SAPI_PTCCH 0x07 /* packet TA control channel */
-#define PCU_IF_SAPI_PCH_DT 0x08 /* assignment on PCH (confirmed using TLLI) */
+#define PCU_IF_SAPI_PCH_DT 0x08 /* assignment on PCH (confirmed using message id) */
/* flags */
#define PCU_IF_FLAG_ACTIVE (1 << 0)/* BTS is active */
@@ -93,10 +93,10 @@ struct gsm_pcu_if_data {
int16_t lqual_cb; /* !< \brief Link quality in centiBel */
} __attribute__ ((packed));
-/* data confirmation with direct tlli (instead of raw mac block with tlli) */
+/* data confirmation with message id (instead of raw mac block) */
struct gsm_pcu_if_data_cnf_dt {
uint8_t sapi;
- uint32_t tlli;
+ uint32_t msg_id;
uint32_t fn;
uint16_t arfcn;
uint8_t trx_nr;
@@ -274,8 +274,8 @@ struct gsm_pcu_if_neigh_addr_cnf {
/* Struct to send a (confirmed) IMMEDIATE ASSIGNMENT message via PCH. The struct is sent 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;
+ /* message id as reference for confirmation */
+ uint32_t msg_id;
/* IMSI (to derive paging group) */
char imsi[OSMO_IMSI_BUF_SIZE];
/* GSM mac-block (with immediate assignment message) */
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index 3bc580839..5440a236d 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -995,7 +995,7 @@ int rsl_imm_assign_cmd(const struct gsm_bts *bts, uint8_t len, const uint8_t *va
}
/* Chapter 8.5.6 Immediate Assignment Command (with Ericcson vendor specific RSL extension) */
-int rsl_ericsson_imm_assign_cmd(const struct gsm_bts *bts, uint32_t tlli, uint8_t len,
+int rsl_ericsson_imm_assign_cmd(const struct gsm_bts *bts, uint32_t msg_id, uint8_t len,
const uint8_t *val, uint8_t pag_grp)
{
struct msgb *msg = rsl_imm_assign_cmd_common(bts, len, val);
@@ -1009,7 +1009,7 @@ int rsl_ericsson_imm_assign_cmd(const struct gsm_bts *bts, uint32_t tlli, uint8_
/* ericsson can handle a reference at the end of the message which is used in
* the confirm message. The confirm message is only sent if the trailer is present */
msgb_put_u8(msg, RSL_IE_ERIC_MOBILE_ID);
- msgb_put_u32(msg, tlli);
+ msgb_put_u32(msg, msg_id);
return abis_rsl_sendmsg(msg);
}
@@ -2552,7 +2552,7 @@ static int rsl_rx_ericsson_imm_assign_sent(struct msgb *msg)
{
struct e1inp_sign_link *sign_link = msg->dst;
struct abis_rsl_dchan_hdr *dh = msgb_l2(msg);
- uint32_t tlli;
+ uint32_t msg_id;
LOGP(DRSL, LOGL_INFO, "IMM.ass sent\n");
msgb_pull(msg, sizeof(*dh));
@@ -2564,8 +2564,8 @@ static int rsl_rx_ericsson_imm_assign_sent(struct msgb *msg)
LOGP(DRSL, LOGL_ERROR, "unsupported IMM.ass message format! (please fix)\n");
else {
msgb_pull(msg, 1); /* drop previous data to use msg_pull_u32 */
- tlli = msgb_pull_u32(msg);
- pcu_tx_pch_confirm(sign_link->trx->bts, tlli);
+ msg_id = msgb_pull_u32(msg);
+ pcu_tx_pch_confirm(sign_link->trx->bts, msg_id);
}
return 0;
}
diff --git a/src/osmo-bsc/pcu_sock.c b/src/osmo-bsc/pcu_sock.c
index 8a1d5b025..5353081b0 100644
--- a/src/osmo-bsc/pcu_sock.c
+++ b/src/osmo-bsc/pcu_sock.c
@@ -436,13 +436,13 @@ int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint16_t ra, uint32_t fn,
}
/* Confirm the sending of an immediate assignment to the pcu */
-int pcu_tx_pch_confirm(struct gsm_bts *bts, uint32_t tlli)
+int pcu_tx_pch_confirm(struct gsm_bts *bts, uint32_t msg_id)
{
struct msgb *msg;
struct gsm_pcu_if *pcu_prim;
struct gsm_pcu_if_data_cnf_dt *data_cnf_dt;
- LOG_BTS(bts, DPCU, LOGL_INFO, "Sending PCH confirm with direct TLLI\n");
+ LOG_BTS(bts, DPCU, LOGL_INFO, "Sending PCH confirm with message id\n");
msg = pcu_msgb_alloc(PCU_IF_MSG_DATA_CNF_DT, bts->nr);
if (!msg)
@@ -451,7 +451,7 @@ int pcu_tx_pch_confirm(struct gsm_bts *bts, uint32_t tlli)
data_cnf_dt = &pcu_prim->u.data_cnf_dt;
data_cnf_dt->sapi = PCU_IF_SAPI_PCH_DT;
- data_cnf_dt->tlli = tlli;
+ data_cnf_dt->msg_id = msg_id;
return pcu_sock_send(bts->network, msg);
}
@@ -508,15 +508,15 @@ static int pcu_rx_rr_paging_pch(struct gsm_bts *bts, uint8_t paging_group,
static int pcu_rx_rr_imm_ass_pch(struct gsm_bts *bts, uint8_t paging_group,
const struct gsm_pcu_if_pch_dt *pch_dt)
{
- LOG_BTS(bts, DPCU, LOGL_DEBUG, "PCU Sends immediate assignment via PCH (TLLI=0x%08x, IMSI=%s, Paging group=0x%02x)\n",
- pch_dt->tlli, pch_dt->imsi, paging_group);
+ LOG_BTS(bts, DPCU, LOGL_DEBUG, "PCU Sends immediate assignment via PCH (msg_id=0x%08x, IMSI=%s, Paging group=0x%02x)\n",
+ pch_dt->msg_id, pch_dt->imsi, paging_group);
/* 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 (is_ericsson_bts(bts))
- return rsl_ericsson_imm_assign_cmd(bts, pch_dt->tlli, sizeof(pch_dt->data), pch_dt->data, paging_group);
+ return rsl_ericsson_imm_assign_cmd(bts, pch_dt->msg_id, sizeof(pch_dt->data), pch_dt->data, paging_group);
LOG_BTS(bts, DPCU, LOGL_ERROR, "BTS model does not support sending immediate assignment via PCH!\n");
return -ENOTSUP;
@@ -541,9 +541,6 @@ static int pcu_rx_data_req(struct gsm_bts *bts, uint8_t msg_type,
rc = -EIO;
break;
case PCU_IF_SAPI_PCH_DT:
- /* DT = direct TLLI. A tlli is prefixed so that the BSC/BTS can confirm the sending of the downlink
- * IMMEDIATE ASSIGNMENT or PAGING COMMAND towards the PCU using this TLLI as a reference. */
-
if (data_req->len < sizeof(struct gsm_pcu_if_pch_dt)) {
LOG_BTS(bts, DPCU, LOGL_ERROR, "Received PCU data request with invalid/small length %d\n",
data_req->len);