aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-10-07 18:29:59 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-10-07 18:29:59 +0200
commit745492178d0036026b176d64327972152aeed148 (patch)
tree2f26d92baffa98dc9d5c2a55a18592c70d62c60d
parent2ccb6aef89deef7230f5019d3a4db98b7a95dc5a (diff)
pcu_l1_if.cpp: Imm Assign PCH: clarify size of different itemspespin/master
-rw-r--r--src/pcu_l1_if.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index 6a0d58e..70d76f7 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -209,7 +209,7 @@ void pcu_l1if_tx_agch(bitvec * block, int plen)
{
struct gprs_rlcmac_bts *bts = bts_main_data();
uint8_t data[23]; /* prefix PLEN */
-
+
/* FIXME: why does OpenBTS has no PLEN and no fill in message? */
bitvec_pack(block, data + 1);
data[0] = (plen << 2) | 0x01;
@@ -223,7 +223,7 @@ void pcu_l1if_tx_agch(bitvec * block, int plen)
void pcu_l1if_tx_pch(bitvec * block, int plen, const char *imsi)
{
struct gprs_rlcmac_bts *bts = bts_main_data();
- uint8_t data[3+1+23]; /* prefix PLEN */
+ uint8_t data[3 + 1 + 22]; /* paging group + PLEN + imm assign */
/* paging group */
if (!imsi || strlen(imsi) < 3)
@@ -233,14 +233,14 @@ void pcu_l1if_tx_pch(bitvec * block, int plen, const char *imsi)
data[1] = imsi[1];
data[2] = imsi[2];
- OSMO_ASSERT(block->data_len <= sizeof(data) - (3+1));
- bitvec_pack(block, data + 3+1);
+ OSMO_ASSERT(block->data_len <= sizeof(data) - (3 + 1));
+ bitvec_pack(block, data + 3 + 1);
data[3] = (plen << 2) | 0x01;
if (bts->gsmtap_categ_mask & (1 << PCU_GSMTAP_C_DL_PCH))
- gsmtap_send(bts->gsmtap, 0, 0, GSMTAP_CHANNEL_PCH, 0, 0, 0, 0, data + 3, 23);
+ gsmtap_send(bts->gsmtap, 0, 0, GSMTAP_CHANNEL_PCH, 0, 0, 0, 0, data + 3, 1 + 22);
- pcu_tx_data_req(0, 0, PCU_IF_SAPI_PCH, 0, 0, 0, data, 23+3);
+ pcu_tx_data_req(0, 0, PCU_IF_SAPI_PCH, 0, 0, 0, data, 3 + 1 + 22);
}
extern "C" void pcu_rx_block_time(uint16_t arfcn, uint32_t fn, uint8_t ts_no)