diff options
author | Max <msuraev@sysmocom.de> | 2017-09-01 11:02:40 +0200 |
---|---|---|
committer | Max <msuraev@sysmocom.de> | 2017-09-01 11:08:06 +0200 |
commit | 84bf0faed9912ba2b31e56299f5a0441973076eb (patch) | |
tree | 33cfd68214575bb5379e33bb6f45c692f0460031 /src/pcu_l1_if.cpp | |
parent | b216c6b1652454d01f10c376a16bae864b717a1e (diff) |
Support receiving SI13 from BTS
* store SI13 in BTS struct
* check and handle BCCH SAPI
Change-Id: I610a93ce23725b182ec14e3507331295bd542f74
Related: OS#2400
Diffstat (limited to 'src/pcu_l1_if.cpp')
-rw-r--r-- | src/pcu_l1_if.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp index 97eee9b8..7112b044 100644 --- a/src/pcu_l1_if.cpp +++ b/src/pcu_l1_if.cpp @@ -245,6 +245,27 @@ extern "C" int pcu_rx_data_ind_pdtch(uint8_t trx_no, uint8_t ts_no, uint8_t *dat return pdch->rcv_block(data, len, fn, meas); } +static int pcu_rx_data_ind_bcch(uint8_t *data, uint8_t len) +{ + struct gprs_rlcmac_bts *bts = bts_main_data(); + + if (len == 0) { + bts->si13_is_set = false; + LOGP(DL1IF, LOGL_INFO, "Received PCU data indication with empty SI13: cache cleaned\n"); + return 0; + } + + if (len != GSM_MACBLOCK_LEN) { + LOGP(DL1IF, LOGL_ERROR, "Received PCU data indication with SI13 with unexpected length %u\n", len); + return -EINVAL; + } + + memcpy(bts->si13, data, GSM_MACBLOCK_LEN); + bts->si13_is_set = true; + + return 0; +} + static int pcu_rx_data_ind(struct gsm_pcu_if_data *data_ind) { struct gprs_rlcmac_bts *bts = bts_main_data(); @@ -271,6 +292,9 @@ static int pcu_rx_data_ind(struct gsm_pcu_if_data *data_ind) data_ind->data, data_ind->len, data_ind->fn, &meas); break; + case PCU_IF_SAPI_BCCH: + rc = pcu_rx_data_ind_bcch(data_ind->data, data_ind->len); + break; default: LOGP(DL1IF, LOGL_ERROR, "Received PCU data indication with " "unsupported sapi %d\n", data_ind->sapi); |