lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

February 2023

  • 1 participants
  • 2601 discussions
Change in osmo-bsc[master]: abis_rsl: add ericsson specific paging group IE to rsl_ericsson_imm_a...
by fixeria 01 Feb '23

01 Feb '23
Attention is currently required from: dexter. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31126 ) Change subject: abis_rsl: add ericsson specific paging group IE to rsl_ericsson_imm_assign_cmd ...................................................................... Patch Set 3: (2 comments) File src/osmo-bsc/abis_rsl.c: https://gerrit.osmocom.org/c/osmo-bsc/+/31126/comment/a735171a_1789fc09 PS3, Line 974: msgb_put_u8(msg, RSL_IE_ERIC_PAGING_GROUP); msgb_tv_put(msg, RSL_IE_ERIC_PAGING_GROUP, pag_grp) File src/osmo-bsc/pcu_sock.c: https://gerrit.osmocom.org/c/osmo-bsc/+/31126/comment/abdfab13_df8e3101 PS3, Line 484: extract_paging_group I am a bit puzzled here. Why do we need *paging* group when sending Immediate Assignment over AGCH? AGCH is used to assign Uplink TBFs on request from the MS, so the MS is expecting to receive an Immediate Assignment on AGCH regardless on its paging group. Paging group is needed when sending Immediate Assignment over PCH. In this case it's a Downlink TBF assignment, which needs to be sent in the correct time (determined by paging group), so that the MS does not miss it. This is already done above, see case PCU_IF_SAPI_PCH. I see you're saying in the commit message that it's required, but I am trying to understand why it's required and how can it be used internally by the BTS. Also, looks like PCU_IF_SAPI_AGCH_DT is defined but never used in osmo-pcu.git? -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31126 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I4452f4973d1ec69c96aad527b057226e8a6edf99 Gerrit-Change-Number: 31126 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Wed, 01 Feb 2023 13:37:14 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[master]: pcu_sock: transfer E1 connection information to PCU
by pespin 01 Feb '23

01 Feb '23
Attention is currently required from: dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31144 ) Change subject: pcu_sock: transfer E1 connection information to PCU ...................................................................... Patch Set 1: Code-Review+1 (1 comment) File src/osmo-bsc/pcu_sock.c: https://gerrit.osmocom.org/c/osmo-bsc/+/31144/comment/e5de93eb_61d5ecb8 PS1, Line 368: /* In cases where the CCU is connected via an E1 line, we Would be less invasive if you ncrease the comment line width and end up with less lines imho. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31144 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I6d44373336b41009ff4c6e459d32d0a81081676c Gerrit-Change-Number: 31144 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Wed, 01 Feb 2023 13:36:09 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[master]: pcu_sock: rework log output
by pespin 01 Feb '23

01 Feb '23
Attention is currently required from: dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31142 ) Change subject: pcu_sock: rework log output ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31142 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Idc673e0b15869c6966701524db1af7d7847c16ab Gerrit-Change-Number: 31142 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Wed, 01 Feb 2023 13:32:57 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[master]: pcu_sock: remove unecessary OSMO_ASSERT()s
by pespin 01 Feb '23

01 Feb '23
Attention is currently required from: dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31141 ) Change subject: pcu_sock: remove unecessary OSMO_ASSERT()s ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31141 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I8320cbc14361438d65642d15bc225e9960ce925b Gerrit-Change-Number: 31141 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Wed, 01 Feb 2023 13:32:39 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[master]: pcu_sock: Also fill in BSIC in gsm_pcu_if_info_ind
by pespin 01 Feb '23

01 Feb '23
Attention is currently required from: dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31140 ) Change subject: pcu_sock: Also fill in BSIC in gsm_pcu_if_info_ind ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31140 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I22158b18f50a7adf4ba1fed25bd7a880dc109e3d Gerrit-Change-Number: 31140 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Wed, 01 Feb 2023 13:32:15 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in libosmo-abis[master]: trau_pcu_ericsson: fix broken length check
by pespin 01 Feb '23

01 Feb '23
Attention is currently required from: dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/31120 ) Change subject: trau_pcu_ericsson: fix broken length check ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/31120 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I9e0cd5d36c517b9198e0dc1bec0477a2ee2fb869 Gerrit-Change-Number: 31120 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Wed, 01 Feb 2023 13:31:24 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[master]: abis_rsl: add ericsson specific paging group IE to rsl_ericsson_imm_a...
by pespin 01 Feb '23

01 Feb '23
Attention is currently required from: dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31126 ) Change subject: abis_rsl: add ericsson specific paging group IE to rsl_ericsson_imm_assign_cmd ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31126 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I4452f4973d1ec69c96aad527b057226e8a6edf99 Gerrit-Change-Number: 31126 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Wed, 01 Feb 2023 13:29:56 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-pcu[master]: bts: add ericsson specific AGCH transmission
by dexter 01 Feb '23

01 Feb '23
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 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/31145 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I2a78651593323e8b9627c39918d949a33497b70f Gerrit-Change-Number: 31145 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bsc[master]: pcu_sock: transfer E1 connection information to PCU
by dexter 01 Feb '23

01 Feb '23
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31144 ) Change subject: pcu_sock: transfer E1 connection information to PCU ...................................................................... pcu_sock: transfer E1 connection information to PCU The BSC has all information about the E1 line configuration of each timeslot/channel. The PCU is responsible for opening and managing the CCU connection. To enable the CCU to do that, we have to transfer the E1 connection information (which TS, SS, rate) to the PCU. Change-Id: I6d44373336b41009ff4c6e459d32d0a81081676c Related: OS#5198 --- M src/osmo-bsc/pcu_sock.c 1 file changed, 79 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/44/31144/1 diff --git a/src/osmo-bsc/pcu_sock.c b/src/osmo-bsc/pcu_sock.c index 28fd9a0..45e44ca 100644 --- a/src/osmo-bsc/pcu_sock.c +++ b/src/osmo-bsc/pcu_sock.c @@ -106,6 +106,19 @@ } } +/* Check if it is possible to use the TS as PDCH (not now, but maybe later) */ +static bool ts_usable_as_pdch(const struct gsm_bts_trx_ts *ts) +{ + switch (ts->pchan_from_config) { + case GSM_PCHAN_TCH_F_PDCH: + case GSM_PCHAN_OSMO_DYN: + case GSM_PCHAN_PDCH: + return true; + default: + return false; + } +} + /* Fill the frequency hopping parameter */ static void info_ind_fill_fhp(struct gsm_pcu_if_info_trx_ts *ts_info, const struct gsm_bts_trx_ts *ts) @@ -291,11 +304,76 @@ return pcu_sock_send(bts, msg); } +static int pcu_tx_e1_ccu_ind(struct gsm_bts *bts) +{ + struct msgb *msg; + struct gsm_pcu_if *pcu_prim; + struct gsm_pcu_if_e1_ccu_ind *e1_ccu_ind; + int i; + int k; + struct gsm_bts_trx *trx; + struct gsm_bts_trx_ts *ts; + int rc; + + OSMO_ASSERT(bts); + OSMO_ASSERT(bts->network); + OSMO_ASSERT(bts->site_mgr); + + for (i = 0; i < PCU_IF_NUM_TRX; i++) { + trx = gsm_bts_trx_num(bts, i); + if (!trx) + continue; + if (trx->nr >= PCU_IF_NUM_TRX) { + LOG_TRX(trx, DPCU, LOGL_NOTICE, "PCU interface (version %u) " + "cannot handle more than %u transceivers => skipped\n", + PCU_IF_VERSION, PCU_IF_NUM_TRX); + continue; + } + + for (k = 0; k < ARRAY_SIZE(trx->ts); k++) { + ts = &trx->ts[k]; + + if (ts->mo.nm_state.operational != NM_OPSTATE_ENABLED) + continue; + if (!ts_usable_as_pdch(ts)) + continue; + + msg = pcu_msgb_alloc(PCU_IF_MSG_E1_CCU_IND, bts->nr); + if (!msg) + return -ENOMEM; + pcu_prim = (struct gsm_pcu_if *)msg->data; + e1_ccu_ind = &pcu_prim->u.e1_ccu_ind; + e1_ccu_ind->ts_nr = ts->nr; + e1_ccu_ind->trx_nr = trx->nr; + e1_ccu_ind->e1_nr = ts->e1_link.e1_nr; + e1_ccu_ind->e1_ts = ts->e1_link.e1_ts; + e1_ccu_ind->e1_ts_ss = ts->e1_link.e1_ts_ss; + + LOGP(DPCU, LOGL_INFO, "Sending E1 CCU info for BTS %d, TRX %d, TS %d\n", bts->nr, + e1_ccu_ind->trx_nr, e1_ccu_ind->ts_nr); + + rc = pcu_sock_send(bts, msg); + if (rc < 0) + return -EINVAL; + } + } + + return 0; +} + /* Allow test to overwrite it */ __attribute__((weak)) void pcu_info_update(struct gsm_bts *bts) { - if (pcu_connected(bts)) + if (pcu_connected(bts)) { + /* In cases where the CCU is connected via an E1 line, we + * transmit the connection parameters for the PDCH before + * we announce the other BTS related parameters. At the + * moment Ericsson RBS is the only E1 BTS we support. */ + if (is_ericsson_bts(bts)) + pcu_tx_e1_ccu_ind(bts); + pcu_tx_info_ind(bts); + } } int pcu_tx_data_ind(struct gsm_bts_trx_ts *ts, uint8_t sapi, uint32_t fn, -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31144 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I6d44373336b41009ff4c6e459d32d0a81081676c Gerrit-Change-Number: 31144 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bsc[master]: pcu_sock: transfer sysinfo to PCU
by dexter 01 Feb '23

01 Feb '23
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31143 ) Change subject: pcu_sock: transfer sysinfo to PCU ...................................................................... pcu_sock: transfer sysinfo to PCU The PCU needs to be aware of the current system information in order to work properly. Change-Id: Ibbfbfaf588a4e406804c36570010aefdfc14328b Related: OS#5198 --- M src/osmo-bsc/pcu_sock.c 1 file changed, 123 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/43/31143/1 diff --git a/src/osmo-bsc/pcu_sock.c b/src/osmo-bsc/pcu_sock.c index 75b4f5d..28fd9a0 100644 --- a/src/osmo-bsc/pcu_sock.c +++ b/src/osmo-bsc/pcu_sock.c @@ -298,6 +298,41 @@ pcu_tx_info_ind(bts); } +int pcu_tx_data_ind(struct gsm_bts_trx_ts *ts, uint8_t sapi, uint32_t fn, + uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len, + int8_t rssi, uint16_t ber10k, int16_t bto, int16_t lqual) +{ + struct msgb *msg; + struct gsm_pcu_if *pcu_prim; + struct gsm_pcu_if_data *data_ind; + struct gsm_bts *bts = ts->trx->bts; + + LOGP(DPCU, LOGL_DEBUG, "Sending data indication: sapi=%s arfcn=%d block=%d data=%s\n", + sapi_string[sapi], arfcn, block_nr, osmo_hexdump(data, len)); + + msg = pcu_msgb_alloc(PCU_IF_MSG_DATA_IND, bts->nr); + if (!msg) + return -ENOMEM; + pcu_prim = (struct gsm_pcu_if *) msg->data; + data_ind = &pcu_prim->u.data_ind; + + data_ind->sapi = sapi; + data_ind->rssi = rssi; + data_ind->fn = fn; + data_ind->arfcn = arfcn; + data_ind->trx_nr = ts->trx->nr; + data_ind->ts_nr = ts->nr; + data_ind->block_nr = block_nr; + data_ind->ber10k = ber10k; + data_ind->ta_offs_qbits = bto; + data_ind->lqual_cb = lqual; + if (len) + memcpy(data_ind->data, data, len); + data_ind->len = len; + + return pcu_sock_send(bts, msg); +} + /* Forward rach indication to PCU */ int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint16_t ra, uint32_t fn, uint8_t is_11bit, enum ph_burst_type burst_type) @@ -518,6 +553,90 @@ return rc; } +int pcu_tx_si(const struct gsm_bts *bts, enum osmo_sysinfo_type si_type, + bool enable) +{ + /* the SI is per-BTS so it doesn't matter which TRX we use */ + struct gsm_bts_trx *trx = bts->c0; + + uint8_t si_buf[GSM_MACBLOCK_LEN]; + uint8_t len; + int rc; + + if (enable) { + memcpy(si_buf, GSM_BTS_SI(bts, si_type), GSM_MACBLOCK_LEN); + len = GSM_MACBLOCK_LEN; + LOGP(DPCU, LOGL_DEBUG, "Updating SI%s to PCU: %s\n", + get_value_string(osmo_sitype_strs, si_type), + osmo_hexdump_nospc(si_buf, GSM_MACBLOCK_LEN)); + } else { + si_buf[0] = si_type; + len = 1; + + /* Note: SI13 is the only system information type that is revked + * by just sending a completely empty message. This is due to + * historical reasons */ + if (si_type != SYSINFO_TYPE_13) + len = 0; + + LOGP(DPCU, LOGL_DEBUG, "Revoking SI%s from PCU\n", + get_value_string(osmo_sitype_strs, si_buf[0])); + } + + /* The low-level data like FN, ARFCN etc will be ignored but we have to + * set lqual high enough to bypass the check at lower levels */ + rc = pcu_tx_data_ind(&trx->ts[0], PCU_IF_SAPI_BCCH, 0, 0, 0, si_buf, len, + 0, 0, 0, INT16_MAX); + if (rc < 0) + LOGP(DPCU, LOGL_NOTICE, "Failed to send SI%s to PCU: rc=%d\n", + get_value_string(osmo_sitype_strs, si_type), rc); + + return rc; +} + +static int pcu_tx_si_all(struct gsm_bts *bts) +{ + const enum osmo_sysinfo_type si_types[] = { SYSINFO_TYPE_1, SYSINFO_TYPE_2, SYSINFO_TYPE_3, SYSINFO_TYPE_13 }; + unsigned int i; + int rc = 0; + + for (i = 0; i < ARRAY_SIZE(si_types); i++) { + if (GSM_BTS_HAS_SI(bts, si_types[i])) { + rc = pcu_tx_si(bts, si_types[i], true); + if (rc < 0) + return rc; + } else { + LOGP(DPCU, LOGL_INFO, + "SI%s is not available on PCU connection\n", + get_value_string(osmo_sitype_strs, si_types[i])); + } + } + + return 0; +} + +static int pcu_rx_txt_ind(struct gsm_bts *bts, + struct gsm_pcu_if_txt_ind *txt) +{ + int rc; + + switch (txt->type) { + case PCU_VERSION: + LOGP(DPCU, LOGL_INFO, "OsmoPCU version %s connected\n", + txt->text); + rc = pcu_tx_si_all(bts); + if (rc < 0) + return -EINVAL; + break; + default: + LOGP(DPCU, LOGL_ERROR, "Unknown TXT_IND type %u received\n", + txt->type); + return -EINVAL; + } + + return 0; +} + #define CHECK_IF_MSG_SIZE(prim_len, prim_msg) \ do { \ size_t _len = PCUIF_HDR_SIZE + sizeof(prim_msg); \ @@ -542,6 +661,10 @@ CHECK_IF_MSG_SIZE(prim_len, pcu_prim->u.data_req); rc = pcu_rx_data_req(bts, msg_type, &pcu_prim->u.data_req); break; + case PCU_IF_MSG_TXT_IND: + CHECK_IF_MSG_SIZE(prim_len, pcu_prim->u.txt_ind); + rc = pcu_rx_txt_ind(bts, &pcu_prim->u.txt_ind); + break; default: LOGP(DPCU, LOGL_ERROR, "Received unknown PCU msg type %d\n", msg_type); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31143 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ibbfbfaf588a4e406804c36570010aefdfc14328b Gerrit-Change-Number: 31143 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 251
  • 252
  • 253
  • 254
  • 255
  • 256
  • 257
  • ...
  • 261
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.