dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/31145 )
Change subject: bts: add ericsson specific AGCH transmission ......................................................................
bts: add ericsson specific AGCH transmission
The Ericsson RBS requires a proprietary TLLI and paging group field when transmitting over the AGCH (via RSL).
Change-Id: I2a78651593323e8b9627c39918d949a33497b70f Related: OS#5198 --- M src/bts.cpp M src/pcu_l1_if.cpp M src/pcu_l1_if.h 3 files changed, 28 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/45/31145/1
diff --git a/src/bts.cpp b/src/bts.cpp index d06c9d0..5ec75cf 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -1077,7 +1077,6 @@
void bts_snd_dl_ass(struct gprs_rlcmac_bts *bts, const struct gprs_rlcmac_dl_tbf *tbf) { - uint16_t pgroup = ms_paging_group(tbf_ms(tbf)); int plen; const struct gprs_rlcmac_pdch *pdch;
@@ -1103,7 +1102,11 @@ GSM_L1_BURST_TYPE_ACCESS_0); if (plen >= 0) { bts_do_rate_ctr_inc(bts, CTR_IMMEDIATE_ASSIGN_DL_TBF); - pcu_l1if_tx_pch(bts, immediate_assignment, plen, pgroup); +#ifdef ENABLE_ERICSSON_RBS + pcu_l1if_tx_agch_ericsson(tbf->tlli(), ms_paging_group(tbf_ms(tbf)), bts, immediate_assignment, plen); +#else + pcu_l1if_tx_pch(bts, immediate_assignment, plen, ms_paging_group(tbf_ms(tbf))); +#endif }
bitvec_free(immediate_assignment); diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp index ad3b6a3..4b03ccc 100644 --- a/src/pcu_l1_if.cpp +++ b/src/pcu_l1_if.cpp @@ -302,6 +302,28 @@ pcu_tx_data_req(bts, 0, 0, PCU_IF_SAPI_PCH, 0, 0, 0, data, PAGING_GROUP_LEN + GSM_MACBLOCK_LEN); }
+void pcu_l1if_tx_agch_ericsson(uint32_t tlli, uint16_t pgroup, struct gprs_rlcmac_bts *bts, bitvec * block, int len) +{ + uint8_t data[sizeof(tlli) + PAGING_GROUP_LEN + GSM_MACBLOCK_LEN]; + int i; + + /* Prepend TLLI (4 byte) */ + memcpy(data, &tlli, sizeof(tlli)); + + /* Prepend last three imsi digits (paging group, 3 byte) */ + for (i = 0; i < PAGING_GROUP_LEN; i++) { + data[(PAGING_GROUP_LEN - 1 - i) + sizeof(tlli)] = '0' + (char)(pgroup % 10); + pgroup = pgroup / 10; + } + OSMO_ASSERT(pgroup == 0); + + data[7] = (len << 2) | 0x01; + bitvec_pack(block, data + 8); + + pcu_tx_data_req(bts, 0, 0, PCU_IF_SAPI_AGCH_DT, 0, 0, 0, data, + sizeof(tlli) + PAGING_GROUP_LEN + GSM_MACBLOCK_LEN); +} + int pcu_tx_neigh_addr_res_req(struct gprs_rlcmac_bts *bts, const struct neigh_cache_entry_key *neigh_key) { struct msgb *msg; diff --git a/src/pcu_l1_if.h b/src/pcu_l1_if.h index 1b13a92..dcd369c 100644 --- a/src/pcu_l1_if.h +++ b/src/pcu_l1_if.h @@ -147,6 +147,7 @@ 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_agch_ericsson(uint32_t tlli, uint16_t pgroup, struct gprs_rlcmac_bts *bts, bitvec *block, int len);
void pcu_l1if_tx_pch(struct gprs_rlcmac_bts *bts, bitvec * block, int plen, uint16_t pgroup); #endif