aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2023-08-24 12:45:18 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2023-08-25 12:27:16 +0200
commit0e47642e963d1ddbd1ca53fc1bf7ee313a4551b5 (patch)
tree009a7688d25403ab62cc35ba8046ee699e153ae0
parent3a6e19ce2b803161662785bfd41dd33012dd0fcc (diff)
pcuif_proto: add confirm flag to struct gsm_pcu_if_pch
At the moment we let OsmoBTS (or OsmoBSC) look into the MAC block we send and in case it is an IMMEDIATE ASSIGNMENT message, a confirmation would be sent back. Unfortunately, this method is not very practical, lets add a flag to struct gsm_pcu_if_pch to tell the receiving end that the MAC block (data) needs to be confirmed when it is sent. Related: OS#5927 Change-Id: Ia202862aafc1f0cb6601574ef61eb9155de11f04
-rw-r--r--include/osmocom/pcu/pcuif_proto.h3
-rw-r--r--src/bts.cpp2
-rw-r--r--src/gprs_rlcmac.c2
-rw-r--r--src/pcu_l1_if.cpp4
-rw-r--r--src/pcu_l1_if.h4
5 files changed, 10 insertions, 5 deletions
diff --git a/include/osmocom/pcu/pcuif_proto.h b/include/osmocom/pcu/pcuif_proto.h
index bf49b068..aa22447e 100644
--- a/include/osmocom/pcu/pcuif_proto.h
+++ b/include/osmocom/pcu/pcuif_proto.h
@@ -271,6 +271,9 @@ struct gsm_pcu_if_pch {
char imsi[OSMO_IMSI_BUF_SIZE];
/* GSM mac-block (with immediate assignment message) */
uint8_t data[GSM_MACBLOCK_LEN];
+ /* Set to true in case the receiving end must send a confirmation
+ * when the MAC block (data) has been sent. */
+ bool confirm;
} __attribute__((packed));
struct gsm_pcu_if {
diff --git a/src/bts.cpp b/src/bts.cpp
index 497c2ce5..5c483d5c 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -1129,7 +1129,7 @@ void bts_snd_dl_ass(struct gprs_rlcmac_bts *bts, const struct gprs_rlcmac_dl_tbf
if (plen >= 0) {
bts_do_rate_ctr_inc(bts, CTR_IMMEDIATE_ASSIGN_DL_TBF);
if (the_pcu->pcu_if_version >= 0x0b)
- pcu_l1if_tx_pch2(bts, immediate_assignment, plen, tbf->imsi(), tbf->tlli());
+ pcu_l1if_tx_pch2(bts, immediate_assignment, plen, true, tbf->imsi(), tbf->tlli());
else
pcu_l1if_tx_pch(bts, immediate_assignment, plen, tbf->imsi());
}
diff --git a/src/gprs_rlcmac.c b/src/gprs_rlcmac.c
index 40fdfaf6..d15445e3 100644
--- a/src/gprs_rlcmac.c
+++ b/src/gprs_rlcmac.c
@@ -45,7 +45,7 @@ int gprs_rlcmac_paging_request(struct gprs_rlcmac_bts *bts, const struct osmo_mo
bts_do_rate_ctr_inc(bts, CTR_PCH_REQUESTS);
if (the_pcu->pcu_if_version >= 0x0b)
- pcu_l1if_tx_pch2(bts, paging_request, plen, imsi, GSM_RESERVED_TMSI);
+ pcu_l1if_tx_pch2(bts, paging_request, plen, false, imsi, GSM_RESERVED_TMSI);
else
pcu_l1if_tx_pch(bts, paging_request, plen, imsi);
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index 654063ed..f92f08ea 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -300,7 +300,8 @@ 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_pch2(struct gprs_rlcmac_bts *bts, struct bitvec *block, int plen, const char *imsi, uint32_t msg_id)
+void pcu_l1if_tx_pch2(struct gprs_rlcmac_bts *bts, struct bitvec *block, int plen, bool confirm,
+ const char *imsi, uint32_t msg_id)
{
struct gsm_pcu_if_pch pch = { 0 };
@@ -312,6 +313,7 @@ void pcu_l1if_tx_pch2(struct gprs_rlcmac_bts *bts, struct bitvec *block, int ple
* (TS 45.002 6.5.3, 6.5.6).
*/
+ pch.confirm = confirm;
pch.data[0] = (plen << 2) | 0x01;
bitvec_pack(block, pch.data + 1);
diff --git a/src/pcu_l1_if.h b/src/pcu_l1_if.h
index 19ec60aa..138636d3 100644
--- a/src/pcu_l1_if.h
+++ b/src/pcu_l1_if.h
@@ -156,8 +156,8 @@ 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_pch2(struct gprs_rlcmac_bts *bts, struct bitvec *block, int plen, const char *imsi, uint32_t msg_id);
-
+void pcu_l1if_tx_pch2(struct gprs_rlcmac_bts *bts, struct bitvec *block, int plen, bool confirm,
+ 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);
void pcu_l1if_close(void);