aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2023-05-11 13:38:18 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2023-05-22 12:35:09 +0200
commit98e5910ed8accaa1bd8af3b2e5e529701170b1f3 (patch)
tree7fac3313c9853ae66401de514a11eceaf2c29745 /src
parent5fd0022b62846d32bc841006aef51695d6c3476b (diff)
gprs_rlcmac: also use PCU_IF_SAPI_PCH_DT for paging MAC blocks
In the current code we still send PAGING COMMAND MAC blocks via SAPI PCU_IF_SAPI_PCH, which technically belongs to the older PCUIF version (v.10), which we are going to deprecate soon. Let's change this so that PAGING COMMAND MAC blocks will also be sent through PCU_IF_SAPI_PCH_DT. Since PAGING COMMAND messages require no confirmation by the receiving end we may set the TLLI field to GSM_RESERVED_TMSI. Depends: osmo-bsc.git I82443f2b402aa2416469c8c50b1c050323ef3b8f Related: OS#5927 Change-Id: I99cfe373fa157cfb32b74c113ad9935347653a71
Diffstat (limited to 'src')
-rw-r--r--src/gprs_rlcmac.c7
-rw-r--r--src/pcu_l1_if.cpp11
-rw-r--r--src/pcu_l1_if.h3
3 files changed, 12 insertions, 9 deletions
diff --git a/src/gprs_rlcmac.c b/src/gprs_rlcmac.c
index 3163c326..88fcc596 100644
--- a/src/gprs_rlcmac.c
+++ b/src/gprs_rlcmac.c
@@ -43,7 +43,12 @@ int gprs_rlcmac_paging_request(struct gprs_rlcmac_bts *bts, const struct osmo_mo
return -1;
}
bts_do_rate_ctr_inc(bts, CTR_PCH_REQUESTS);
- pcu_l1if_tx_pch(bts, paging_request, plen, imsi);
+
+ if (the_pcu->pcu_if_version >= 0x0b)
+ pcu_l1if_tx_pch_dt(bts, paging_request, plen, imsi, GSM_RESERVED_TMSI);
+ else
+ pcu_l1if_tx_pch(bts, paging_request, plen, imsi);
+
bitvec_free(paging_request);
return 0;
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index 85aaddcc..aadc6406 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -264,6 +264,7 @@ void pcu_l1if_tx_agch(struct gprs_rlcmac_bts *bts, bitvec *block, int plen)
}
#define IMSI_DIGITS_FOR_PAGING 3
+/* Send a MAC block via the paging channel. (See also comment below) */
void pcu_l1if_tx_pch(struct gprs_rlcmac_bts *bts, bitvec *block, int plen, const char *imsi)
{
uint8_t data[IMSI_DIGITS_FOR_PAGING + GSM_MACBLOCK_LEN];
@@ -286,13 +287,11 @@ void pcu_l1if_tx_pch(struct gprs_rlcmac_bts *bts, bitvec *block, int plen, const
pcu_tx_data_req(bts, 0, 0, PCU_IF_SAPI_PCH, 0, 0, 0, data, sizeof(data));
}
-/* Send a block via the paging channel and require a confirmation by the receiving end */
-void pcu_l1if_tx_pch_dt(struct gprs_rlcmac_bts *bts, bitvec *block, int plen, const char *imsi, uint32_t tlli)
+/* 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)
{
- /* NOTE: This is in practice only used to transmit IMMEDIATE ASSIGNMENT messages through the paging channel and
- * it is not guaranteed to work with other message types. The prepended TLLI will be used as an identifier in
- * the confirmation message. */
-
struct gsm_pcu_if_pch_dt pch_dt = { 0 };
pch_dt.tlli = tlli;
diff --git a/src/pcu_l1_if.h b/src/pcu_l1_if.h
index f787c405..bc036bfc 100644
--- a/src/pcu_l1_if.h
+++ b/src/pcu_l1_if.h
@@ -147,8 +147,6 @@ void pcu_l1if_tx_ptcch(struct gprs_rlcmac_bts *bts,
uint32_t fn, uint8_t block_nr,
uint8_t *data, size_t data_len);
void pcu_l1if_tx_agch(struct gprs_rlcmac_bts *bts, bitvec *block, int len);
-
-void pcu_l1if_tx_pch_dt(struct gprs_rlcmac_bts *bts, bitvec *block, int plen, const char *imsi, uint32_t tlli);
#endif
#ifdef __cplusplus
@@ -158,6 +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);
int pcu_rx(struct gsm_pcu_if *pcu_prim, size_t pcu_prim_length);
int pcu_l1if_open(void);