Support receiving SI13 from BTS
* store SI13 in BTS struct * check and handle BCCH SAPI Change-Id: I610a93ce23725b182ec14e3507331295bd542f74 Related: OS#2400
This commit is contained in:
parent
b216c6b165
commit
84bf0faed9
|
@ -29,6 +29,7 @@ extern "C" {
|
|||
#include <osmocom/core/timer.h>
|
||||
#include <osmocom/core/gsmtap.h>
|
||||
#include <osmocom/gsm/l1sap.h>
|
||||
#include <osmocom/gsm/protocol/gsm_04_08.h>
|
||||
}
|
||||
|
||||
#include "poll_controller.h"
|
||||
|
@ -212,7 +213,8 @@ struct gprs_rlcmac_bts {
|
|||
uint8_t alpha, gamma;
|
||||
uint8_t egprs_enabled;
|
||||
uint32_t dl_tbf_idle_msec; /* hold time for idle DL TBFs */
|
||||
|
||||
uint8_t si13[GSM_MACBLOCK_LEN];
|
||||
bool si13_is_set;
|
||||
/* 0 to support resegmentation in DL, 1 for no reseg */
|
||||
uint8_t dl_arq_type;
|
||||
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
#include <osmocom/core/gsmtap.h>
|
||||
#include <osmocom/core/talloc.h>
|
||||
#include <osmocom/core/timer.h>
|
||||
#include <osmocom/gsm/protocol/gsm_04_08.h>
|
||||
|
||||
#include <lc15_l1_if.h>
|
||||
#include <gprs_debug.h>
|
||||
#include <pcu_l1_if.h>
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
#include <osmocom/core/gsmtap.h>
|
||||
#include <osmocom/core/talloc.h>
|
||||
#include <osmocom/core/timer.h>
|
||||
#include <osmocom/gsm/protocol/gsm_04_08.h>
|
||||
|
||||
#include <sysmo_l1_if.h>
|
||||
#include <gprs_debug.h>
|
||||
#include <pcu_l1_if.h>
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -183,6 +183,7 @@ int main(int argc, char *argv[])
|
|||
bts->n3103 = 4;
|
||||
bts->n3105 = 8;
|
||||
bts->alpha = 0; /* a = 0.0 */
|
||||
bts->si13_is_set = false;
|
||||
bts->ms_idle_sec = 60; /* slightly above T3314 (default 44s, 24.008, 11.2.2) */
|
||||
bts->cs_adj_enabled = 1;
|
||||
bts->cs_adj_upper_limit = 33; /* Decrease CS if the error rate is above */
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef _PCU_VTY_H
|
||||
#define _PCU_VTY_H
|
||||
|
||||
#include <osmocom/gsm/protocol/gsm_04_08.h>
|
||||
#include <osmocom/vty/command.h>
|
||||
#include <osmocom/vty/vty.h>
|
||||
|
||||
|
|
Loading…
Reference in New Issue