dexter submitted this change.
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
---
M src/gprs_rlcmac.c
M src/pcu_l1_if.cpp
M src/pcu_l1_if.h
3 files changed, 32 insertions(+), 9 deletions(-)
diff --git a/src/gprs_rlcmac.c b/src/gprs_rlcmac.c
index 3163c32..88fcc59 100644
--- a/src/gprs_rlcmac.c
+++ b/src/gprs_rlcmac.c
@@ -43,7 +43,12 @@
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 85aaddc..aadc640 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -264,6 +264,7 @@
}
#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 @@
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 f787c40..bc036bf 100644
--- a/src/pcu_l1_if.h
+++ b/src/pcu_l1_if.h
@@ -147,8 +147,6 @@
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 @@
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);
To view, visit change 32694. To unsubscribe, or for help writing mail filters, visit settings.