aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2023-08-08 15:56:31 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2023-08-10 14:56:24 +0200
commitfa96a767d19583a1e75b0722bb39b2af5ecd8ed5 (patch)
tree6ea8c9a41604098fcf62cd61c9da0580d37dfd0b
parente98b315d12fb009359410809f4169f9380f3d933 (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 Change-Id: I4a25039dfe329e68879bc68936e49c4b190625e6
-rw-r--r--include/osmocom/pcu/pcuif_proto.h12
-rw-r--r--src/pcu_l1_if.cpp8
-rw-r--r--src/pcu_l1_if.h2
3 files changed, 11 insertions, 11 deletions
diff --git a/include/osmocom/pcu/pcuif_proto.h b/include/osmocom/pcu/pcuif_proto.h
index 1dda160d..c538b91b 100644
--- a/include/osmocom/pcu/pcuif_proto.h
+++ b/include/osmocom/pcu/pcuif_proto.h
@@ -18,7 +18,7 @@
#define PCU_IF_MSG_SUSP_REQ 0x03 /* BTS forwards GPRS SUSP REQ to PCU */
#define PCU_IF_MSG_APP_INFO_REQ 0x04 /* BTS asks PCU to transmit APP INFO via PACCH */
#define PCU_IF_MSG_RTS_REQ 0x10 /* ready to send request */
-#define PCU_IF_MSG_DATA_CNF_DT 0x11 /* confirm (with direct tlli) */
+#define PCU_IF_MSG_DATA_CNF_DT 0x11 /* confirm (using message id) */
#define PCU_IF_MSG_RACH_IND 0x22 /* receive RACH */
#define PCU_IF_MSG_INFO_IND 0x32 /* retrieve BTS info */
#define PCU_IF_MSG_E1_CCU_IND 0x33 /* retrieve E1 CCU comm. parameters */
@@ -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/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index ed64cc13..8597dd4b 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -300,11 +300,11 @@ void pcu_l1if_tx_pch(struct gprs_rlcmac_bts *bts, bitvec *block, int plen, const
/* Send a MAC block via the paging channel. This will (obviously) only work for MAC blocks that contain an
* IMMEDIATE ASSIGNMENT or a PAGING COMMAND message. In case the MAC block contains an IMMEDIATE ASSIGNMENT
* message, the receiving end is required to confirm when the IMMEDIATE ASSIGNMENT has been sent. */
-void pcu_l1if_tx_pch_dt(struct gprs_rlcmac_bts *bts, struct bitvec *block, int plen, const char *imsi, uint32_t tlli)
+void pcu_l1if_tx_pch_dt(struct gprs_rlcmac_bts *bts, struct bitvec *block, int plen, const char *imsi, uint32_t msg_id)
{
struct gsm_pcu_if_pch_dt pch_dt = { 0 };
- pch_dt.tlli = tlli;
+ pch_dt.msg_id = msg_id;
if (imsi)
OSMO_STRLCPY_ARRAY(pch_dt.imsi, imsi);
/* OS#6097: if strlen(pch_dt.imsi) == 0: We assume the MS is in non-DRX
@@ -563,7 +563,7 @@ static int pcu_rx_data_cnf_dt(struct gprs_rlcmac_bts *bts, struct gsm_pcu_if_dat
switch (data_cnf_dt->sapi) {
case PCU_IF_SAPI_PCH_DT:
- bts_rcv_imm_ass_cnf(bts, NULL, data_cnf_dt->tlli, data_cnf_dt->fn);
+ bts_rcv_imm_ass_cnf(bts, NULL, data_cnf_dt->msg_id, data_cnf_dt->fn);
break;
default:
LOGP(DL1IF, LOGL_ERROR, "Received PCU data confirm with unsupported sapi %d\n", data_cnf_dt->sapi);
@@ -789,7 +789,7 @@ static int pcu_rx_info_ind(struct gprs_rlcmac_bts *bts, const struct gsm_pcu_if_
/* NOTE: The classic way to confirm an IMMEDIATE assignment is to send the whole MAC block payload back to the
* PCU. So it is the MAC block itsself that serves a reference for the confirmation. This method has certain
- * disadvantages so it was replaced with a method that uses the TLLI as a reference ("Direct TLLI"). This new
+ * disadvantages so it was replaced with a method that uses the TLLI as a reference (msg_id). This new
* method will replace the old one. The code that handles the old method will be removed in the foreseeable
* future. (see also OS#5927) */
if (info_ind->version == 0x0a) {
diff --git a/src/pcu_l1_if.h b/src/pcu_l1_if.h
index bc036bfc..3ff17dc6 100644
--- a/src/pcu_l1_if.h
+++ b/src/pcu_l1_if.h
@@ -156,7 +156,7 @@ struct gprs_rlcmac_bts;
int pcu_tx_neigh_addr_res_req(struct gprs_rlcmac_bts *bts, const struct neigh_cache_entry_key *neigh_key);
void pcu_l1if_tx_pch(struct gprs_rlcmac_bts *bts, struct bitvec *block, int plen, const char *imsi);
-void pcu_l1if_tx_pch_dt(struct gprs_rlcmac_bts *bts, struct bitvec *block, int plen, const char *imsi, uint32_t tlli);
+void pcu_l1if_tx_pch_dt(struct gprs_rlcmac_bts *bts, struct bitvec *block, int plen, const char *imsi, uint32_t msg_id);
int pcu_rx(struct gsm_pcu_if *pcu_prim, size_t pcu_prim_length);
int pcu_l1if_open(void);