aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2023-08-10 15:04:24 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2023-08-10 15:04:51 +0200
commit5c9162980d622c0869e8df2aeab45c10c8bb07da (patch)
tree9d1ddd0852f0143a1fa5838b2729b6ca50efce04
parent5950ea55e29f91f6bed8418f86eaea27db8d8eb9 (diff)
pcuif_proto: get rid of _DT, _dt (Direct TLLI)
Since we now no longer refer to TLLI when we mean "message ID" (msg_id), we should also remove the "_DT" / "_dt" suffix from structs and define constants and replace it with "_2" if required. Depends: osmo-pcu.git If641b507dcb6b176109c99dce7cff2a7561364b0 Change-Id: I628aaf19999a0004d0760d25ecd323cdbc0076f5 Related: OS#5927
-rw-r--r--include/osmocom/bsc/pcuif_proto.h12
-rw-r--r--src/osmo-bsc/pcu_sock.c38
2 files changed, 25 insertions, 25 deletions
diff --git a/include/osmocom/bsc/pcuif_proto.h b/include/osmocom/bsc/pcuif_proto.h
index d28aec03d..bf49b0683 100644
--- a/include/osmocom/bsc/pcuif_proto.h
+++ b/include/osmocom/bsc/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_2 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 message id) */
+#define PCU_IF_SAPI_PCH_2 0x08 /* assignment on PCH (confirmed using message id) */
/* flags */
#define PCU_IF_FLAG_ACTIVE (1 << 0)/* BTS is active */
@@ -94,7 +94,7 @@ struct gsm_pcu_if_data {
} __attribute__ ((packed));
/* data confirmation with message id (instead of raw mac block) */
-struct gsm_pcu_if_data_cnf_dt {
+struct gsm_pcu_if_data_cnf {
uint8_t sapi;
uint32_t msg_id;
} __attribute__ ((packed));
@@ -263,8 +263,8 @@ struct gsm_pcu_if_neigh_addr_cnf {
} __attribute__ ((packed));
/* 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 {
+ * (data_req) under SAPI PCU_IF_SAPI_PCH_2. */
+struct gsm_pcu_if_pch {
/* message id as reference for confirmation */
uint32_t msg_id;
/* IMSI (to derive paging group) */
@@ -282,7 +282,7 @@ struct gsm_pcu_if {
union {
struct gsm_pcu_if_data data_req;
struct gsm_pcu_if_data data_cnf;
- struct gsm_pcu_if_data_cnf_dt data_cnf_dt;
+ struct gsm_pcu_if_data_cnf data_cnf2;
struct gsm_pcu_if_data data_ind;
struct gsm_pcu_if_susp_req susp_req;
struct gsm_pcu_if_rts_req rts_req;
diff --git a/src/osmo-bsc/pcu_sock.c b/src/osmo-bsc/pcu_sock.c
index 5353081b0..6f48f0f9d 100644
--- a/src/osmo-bsc/pcu_sock.c
+++ b/src/osmo-bsc/pcu_sock.c
@@ -56,7 +56,7 @@ static const char *sapi_string[] = {
[PCU_IF_SAPI_PDTCH] = "PDTCH",
[PCU_IF_SAPI_PRACH] = "PRACH",
[PCU_IF_SAPI_PTCCH] = "PTCCH",
- [PCU_IF_SAPI_PCH_DT] = "PCH_DT",
+ [PCU_IF_SAPI_PCH_2] = "PCH_2",
};
bool pcu_connected(const struct gsm_network *net)
@@ -440,18 +440,18 @@ 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;
+ struct gsm_pcu_if_data_cnf *data_cnf;
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);
+ msg = pcu_msgb_alloc(PCU_IF_MSG_DATA_CNF_2, bts->nr);
if (!msg)
return -ENOMEM;
pcu_prim = (struct gsm_pcu_if *) msg->data;
- data_cnf_dt = &pcu_prim->u.data_cnf_dt;
+ data_cnf = &pcu_prim->u.data_cnf2;
- data_cnf_dt->sapi = PCU_IF_SAPI_PCH_DT;
- data_cnf_dt->msg_id = msg_id;
+ data_cnf->sapi = PCU_IF_SAPI_PCH_2;
+ data_cnf->msg_id = msg_id;
return pcu_sock_send(bts->network, msg);
}
@@ -460,9 +460,9 @@ int pcu_tx_pch_confirm(struct gsm_bts *bts, uint32_t msg_id)
* Encoding::write_paging_request) and extract the mobile identity
* (P-TMSI) from it */
static int pcu_rx_rr_paging_pch(struct gsm_bts *bts, uint8_t paging_group,
- const struct gsm_pcu_if_pch_dt *pch_dt)
+ const struct gsm_pcu_if_pch *pch)
{
- struct gsm48_paging1 *p1 = (struct gsm48_paging1 *) pch_dt->data;
+ struct gsm48_paging1 *p1 = (struct gsm48_paging1 *) pch->data;
uint8_t chan_needed;
struct osmo_mobile_identity mi;
int rc;
@@ -506,17 +506,17 @@ 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)
+ const struct gsm_pcu_if_pch *pch)
{
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);
+ pch->msg_id, pch->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->msg_id, sizeof(pch_dt->data), pch_dt->data, paging_group);
+ return rsl_ericsson_imm_assign_cmd(bts, pch->msg_id, sizeof(pch->data), pch->data, paging_group);
LOG_BTS(bts, DPCU, LOGL_ERROR, "BTS model does not support sending immediate assignment via PCH!\n");
return -ENOTSUP;
@@ -527,7 +527,7 @@ static int pcu_rx_data_req(struct gsm_bts *bts, uint8_t msg_type,
{
uint8_t pag_grp;
int rc = 0;
- struct gsm_pcu_if_pch_dt *pch_dt;
+ struct gsm_pcu_if_pch *pch;
struct gsm48_imm_ass *gsm48_imm_ass;
LOG_BTS(bts, DPCU, LOGL_DEBUG, "Data request received: sapi=%s arfcn=%d "
@@ -540,20 +540,20 @@ static int pcu_rx_data_req(struct gsm_bts *bts, uint8_t msg_type,
if (rsl_imm_assign_cmd(bts, data_req->len, data_req->data))
rc = -EIO;
break;
- case PCU_IF_SAPI_PCH_DT:
- if (data_req->len < sizeof(struct gsm_pcu_if_pch_dt)) {
+ case PCU_IF_SAPI_PCH_2:
+ if (data_req->len < sizeof(struct gsm_pcu_if_pch)) {
LOG_BTS(bts, DPCU, LOGL_ERROR, "Received PCU data request with invalid/small length %d\n",
data_req->len);
break;
}
- pch_dt = (struct gsm_pcu_if_pch_dt *)data_req->data;
- pag_grp = gsm0502_calc_paging_group(&bts->si_common.chan_desc, str_to_imsi(pch_dt->imsi));
+ pch = (struct gsm_pcu_if_pch *)data_req->data;
+ pag_grp = gsm0502_calc_paging_group(&bts->si_common.chan_desc, str_to_imsi(pch->imsi));
- gsm48_imm_ass = (struct gsm48_imm_ass *)pch_dt->data;
+ gsm48_imm_ass = (struct gsm48_imm_ass *)pch->data;
if (gsm48_imm_ass->msg_type == GSM48_MT_RR_IMM_ASS)
- return pcu_rx_rr_imm_ass_pch(bts, pag_grp, pch_dt);
- return pcu_rx_rr_paging_pch(bts, pag_grp, pch_dt);
+ return pcu_rx_rr_imm_ass_pch(bts, pag_grp, pch);
+ return pcu_rx_rr_paging_pch(bts, pag_grp, pch);
default:
LOG_BTS(bts, DPCU, LOGL_ERROR, "Received PCU data request with "
"unsupported sapi %d\n", data_req->sapi);