aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/osmo-bts/bts.h1
-rw-r--r--include/osmo-bts/bts_model.h3
-rw-r--r--src/common/bts.c30
-rw-r--r--src/common/rsl.c1
-rw-r--r--src/common/vty.c2
-rw-r--r--src/osmo-bts-sysmo/Makefile.am2
-rw-r--r--src/osmo-bts-sysmo/bts_model.c55
-rw-r--r--src/osmo-bts-sysmo/femtobts.h2
-rw-r--r--src/osmo-bts-sysmo/l1_if.h1
-rw-r--r--src/osmo-bts-sysmo/main.c3
-rw-r--r--src/osmo-bts-sysmo/oml.c49
-rw-r--r--src/osmo-bts-sysmo/sysmobts_vty.c3
12 files changed, 59 insertions, 93 deletions
diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h
index 92be011c..c9abb9e5 100644
--- a/include/osmo-bts/bts.h
+++ b/include/osmo-bts/bts.h
@@ -25,6 +25,7 @@ struct msgb *bts_agch_dequeue(struct gsm_bts *bts);
uint8_t *bts_sysinfo_get(struct gsm_bts *bts, struct gsm_time *g_time);
uint8_t *lchan_sacch_get(struct gsm_lchan *lchan, struct gsm_time *g_time);
+int lchan_init_lapdm(struct gsm_lchan *lchan);
#endif /* _BTS_H */
diff --git a/include/osmo-bts/bts_model.h b/include/osmo-bts/bts_model.h
index 4e0b3e3f..d5fc470d 100644
--- a/include/osmo-bts/bts_model.h
+++ b/include/osmo-bts/bts_model.h
@@ -30,10 +30,13 @@ int bts_model_chg_adm_state(struct gsm_bts *bts, struct gsm_abis_mo *mo,
int bts_model_rsl_chan_act(struct gsm_lchan *lchan, struct tlv_parsed *tp);
int bts_model_rsl_chan_rel(struct gsm_lchan *lchan);
int bts_model_rsl_deact_sacch(struct gsm_lchan *lchan);
+int bts_model_rsl_mode_modify(struct gsm_lchan *lchan);
int bts_model_trx_deact_rf(struct gsm_bts_trx *trx);
void bts_model_rtp_rx_cb(struct osmo_rtp_socket *rs, uint8_t *rtp_pl,
unsigned int rtp_pl_len);
+int bts_model_vty_init(struct gsm_bts *bts);
+
#endif
diff --git a/src/common/bts.c b/src/common/bts.c
index 88b118f6..b228341d 100644
--- a/src/common/bts.c
+++ b/src/common/bts.c
@@ -389,36 +389,6 @@ int trx_link_estab(struct gsm_bts_trx *trx)
return 0;
}
-void bts_new_si(void *arg)
-{
- struct osmobts_trx *trx = arg;
-
-#if 0
- if (osmo_timer_pending(&trx->si.timer))
- return;
-
- i = 0;
- while(i < BTS_SI_NUM) {
- if ((trx->si.flags[i] & BTS_SI_NEW))
- break;
- i++;
- }
- if (i == BTS_SI_NUM)
- return;
- if ((trx->si.flags[i] & BTS_SI_USE))
- LOGP(DSUM, LOGL_INFO, "Setting SYSTEM INFORMATION %s.\n", bts_si_name[i]);
- else
- LOGP(DSUM, LOGL_INFO, "Removing SYSTEM INFORMATION %s.\n", bts_si_name[i]);
- trx->si.flags[i] &= ~BTS_SI_NEW;
- /* distribute */
- printf("TODO: send SI update to L1\n");
- /* delay until next SI */
- trx->si.timer.cb = bts_new_si;
- trx->si.timer.data = trx;
- osmo_timer_schedule(&trx->si.timer, 0, 200000);
-#endif
-}
-
int lchan_init_lapdm(struct gsm_lchan *lchan)
{
struct lapdm_channel *lc = &lchan->lapdm_ch;
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 9dee4f75..6c334497 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1280,7 +1280,6 @@ static int rsl_rx_ipac_XXcx(struct msgb *msg)
static int rsl_rx_ipac_dlcx(struct msgb *msg)
{
- struct abis_rsl_dchan_hdr *dch = msgb_l2(msg);
struct tlv_parsed tp;
struct gsm_lchan *lchan = msg->lchan;
int rc, inc_conn_id = 0;
diff --git a/src/common/vty.c b/src/common/vty.c
index b8fea042..741899c5 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -419,4 +419,6 @@ int bts_vty_init(const struct log_info *cat)
install_element(BTS_NODE, &cfg_no_description_cmd);
install_element(ENABLE_NODE, &bts_t_t_l_jitter_buf_cmd);
+
+ return 0;
}
diff --git a/src/osmo-bts-sysmo/Makefile.am b/src/osmo-bts-sysmo/Makefile.am
index 81433b77..0ae85f8b 100644
--- a/src/osmo-bts-sysmo/Makefile.am
+++ b/src/osmo-bts-sysmo/Makefile.am
@@ -4,7 +4,7 @@ LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) $(LIBOSMOTRAU_
bin_PROGRAMS = sysmobts sysmobts-remote l1fwd-proxy
-COMMON_SOURCES = main.c femtobts.c l1_if.c oml.c bts_model.c sysmobts_vty.c tch.c
+COMMON_SOURCES = main.c femtobts.c l1_if.c oml.c sysmobts_vty.c tch.c
sysmobts_SOURCES = $(COMMON_SOURCES) l1_transp_hw.c
sysmobts_LDADD = $(top_builddir)/src/common/libbts.a $(LDADD)
diff --git a/src/osmo-bts-sysmo/bts_model.c b/src/osmo-bts-sysmo/bts_model.c
deleted file mode 100644
index a1040217..00000000
--- a/src/osmo-bts-sysmo/bts_model.c
+++ /dev/null
@@ -1,55 +0,0 @@
-
-/* (C) 2011 by Harald Welte <laforge@gnumonks.org>
- *
- * All Rights Reserved
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include <osmo-bts/gsm_data.h>
-#include <osmo-bts/rsl.h>
-#include <osmo-bts/oml.h>
-#include <osmo-bts/bts_model.h>
-
-#include "l1_if.h"
-
-int bts_model_rsl_chan_act(struct gsm_lchan *lchan, struct tlv_parsed *tp)
-{
- //uint8_t mode = *TLVP_VAL(tp, RSL_IE_CHAN_MODE);
- //uint8_t type = *TLVP_VAL(tp, RSL_IE_ACT_TYPE);
-
- lchan_activate(lchan);
- /* FIXME: only do this in case of success */
-
- return rsl_tx_chan_act_ack(lchan, bts_model_get_time(lchan->ts->trx->bts));
-}
-
-int bts_model_rsl_chan_rel(struct gsm_lchan *lchan)
-{
- lchan_deactivate(lchan);
- return rsl_tx_rf_rel_ack(lchan);
-}
-
-int bts_model_rsl_deact_sacch(struct gsm_lchan *lchan)
-{
- return lchan_deactivate_sacch(lchan);
-}
-
-int bts_model_trx_deact_rf(struct gsm_bts_trx *trx)
-{
- struct femtol1_hdl *fl1 = trx_femtol1_hdl(trx);
-
- return l1if_activate_rf(fl1, 0);
-}
diff --git a/src/osmo-bts-sysmo/femtobts.h b/src/osmo-bts-sysmo/femtobts.h
index 604a0593..76028ab5 100644
--- a/src/osmo-bts-sysmo/femtobts.h
+++ b/src/osmo-bts-sysmo/femtobts.h
@@ -27,6 +27,6 @@ const struct value_string femtobts_l1status_names[GSML1_STATUS_NUM+1];
const struct value_string femtobts_tracef_names[29];
-const struct value_string femtobts_tch_pl_names[];
+const struct value_string femtobts_tch_pl_names[14];
#endif /* FEMTOBTS_H */
diff --git a/src/osmo-bts-sysmo/l1_if.h b/src/osmo-bts-sysmo/l1_if.h
index 705abc3e..09f84ef0 100644
--- a/src/osmo-bts-sysmo/l1_if.h
+++ b/src/osmo-bts-sysmo/l1_if.h
@@ -62,5 +62,6 @@ struct gsm_lchan *l1if_hLayer2_to_lchan(struct gsm_bts_trx *trx, uint32_t hLayer
/* tch.c */
int l1if_tch_rx(struct gsm_lchan *lchan, struct msgb *l1p_msg);
int l1if_tch_fill(struct gsm_lchan *lchan, uint8_t *l1_buffer);
+struct msgb *gen_empty_tch_msg(struct gsm_lchan *lchan);
#endif /* _FEMTO_L1_H */
diff --git a/src/osmo-bts-sysmo/main.c b/src/osmo-bts-sysmo/main.c
index 35ac9eeb..645cd24a 100644
--- a/src/osmo-bts-sysmo/main.c
+++ b/src/osmo-bts-sysmo/main.c
@@ -39,6 +39,7 @@
#include <osmo-bts/abis.h>
#include <osmo-bts/bts.h>
#include <osmo-bts/vty.h>
+#include <osmo-bts/bts_model.h>
#include "l1_if.h"
@@ -68,7 +69,7 @@ int bts_model_init(struct gsm_bts *bts)
l1if_reset(fl1h);
- femtol1_vty_init(bts);
+ bts_model_vty_init(bts);
return 0;
}
diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c
index 69d0147e..f88840e4 100644
--- a/src/osmo-bts-sysmo/oml.c
+++ b/src/osmo-bts-sysmo/oml.c
@@ -29,6 +29,7 @@
#include <osmo-bts/gsm_data.h>
#include <osmo-bts/logging.h>
#include <osmo-bts/oml.h>
+#include <osmo-bts/rsl.h>
#include <osmo-bts/amr.h>
#include "l1_if.h"
@@ -227,7 +228,7 @@ static int trx_init_compl_cb(struct msgb *l1_msg, void *data)
return opstart_compl_cb(l1_msg, &trx->mo);
}
-int gsm_abis_mo_check_attr(const struct gsm_abis_mo *mo, uint8_t *attr_ids,
+int gsm_abis_mo_check_attr(const struct gsm_abis_mo *mo, const uint8_t *attr_ids,
unsigned int num_attr_ids)
{
unsigned int i;
@@ -480,7 +481,6 @@ static void clear_amr_params(GsmL1_LogChParam_t *lch_par)
static void lchan2lch_par(GsmL1_LogChParam_t *lch_par, struct gsm_lchan *lchan)
{
int j;
- unsigned int osmo_amr_mode;
LOGP(DL1C, LOGL_INFO, "%s: %s tch_mode=0x%02x\n",
gsm_lchan_name(lchan), __FUNCTION__, lchan->tch_mode);
@@ -551,6 +551,13 @@ static void lchan2lch_par(GsmL1_LogChParam_t *lch_par, struct gsm_lchan *lchan)
if (lchan->mr_conf.m12_2)
lch_par->tch.amrActiveCodecSet[j++] = GsmL1_AmrCodec_12_2;
break;
+ case GSM48_CMODE_DATA_14k5:
+ case GSM48_CMODE_DATA_12k0:
+ case GSM48_CMODE_DATA_6k0:
+ case GSM48_CMODE_DATA_3k6:
+ LOGP(DL1C, LOGL_ERROR, "%s: CSD not supported!\n",
+ gsm_lchan_name(lchan));
+ break;
}
}
@@ -592,7 +599,7 @@ int lchan_activate(struct gsm_lchan *lchan)
/* Only if we use manual MS power control */
//act_req->logChPrm.sacch.u8MsPowerLevel = FIXME;
/* enable bad frame indication from >= -100dBm on SACCH */
- act_req->fBFILevel -100.0;
+ act_req->fBFILevel = -100.0;
break;
case GsmL1_Sapi_TchH:
case GsmL1_Sapi_TchF:
@@ -651,6 +658,8 @@ static void dump_lch_par(int logl, GsmL1_LogChParam_t *lch_par, GsmL1_Sapi_t sap
}
break;
/* FIXME: PRACH / PTCCH */
+ default:
+ break;
}
LOGPC(DL1C, logl, ")\n");
}
@@ -671,6 +680,12 @@ static int chmod_modif_compl_cb(struct msgb *l1_msg, void *data)
&cc->cfgParams.setLogChParams.logChParams,
cc->cfgParams.setLogChParams.sapi);
break;
+ case GsmL1_ConfigParamId_SetNbTsc:
+ case GsmL1_ConfigParamId_SetTxPowerLevel:
+ case GsmL1_ConfigParamId_SetCipheringParams:
+ default:
+ LOGPC(DL1C, LOGL_INFO, "\n");
+ break;
}
msgb_free(l1_msg);
@@ -875,3 +890,31 @@ int bts_model_chg_adm_state(struct gsm_bts *bts, struct gsm_abis_mo *mo,
mo->nm_state.administrative = adm_state;
return oml_mo_fom_ack_nack(mo, NM_MT_CHG_ADM_STATE, 0);
}
+int bts_model_rsl_chan_act(struct gsm_lchan *lchan, struct tlv_parsed *tp)
+{
+ //uint8_t mode = *TLVP_VAL(tp, RSL_IE_CHAN_MODE);
+ //uint8_t type = *TLVP_VAL(tp, RSL_IE_ACT_TYPE);
+
+ lchan_activate(lchan);
+ /* FIXME: only do this in case of success */
+
+ return rsl_tx_chan_act_ack(lchan, bts_model_get_time(lchan->ts->trx->bts));
+}
+
+int bts_model_rsl_chan_rel(struct gsm_lchan *lchan)
+{
+ lchan_deactivate(lchan);
+ return rsl_tx_rf_rel_ack(lchan);
+}
+
+int bts_model_rsl_deact_sacch(struct gsm_lchan *lchan)
+{
+ return lchan_deactivate_sacch(lchan);
+}
+
+int bts_model_trx_deact_rf(struct gsm_bts_trx *trx)
+{
+ struct femtol1_hdl *fl1 = trx_femtol1_hdl(trx);
+
+ return l1if_activate_rf(fl1, 0);
+}
diff --git a/src/osmo-bts-sysmo/sysmobts_vty.c b/src/osmo-bts-sysmo/sysmobts_vty.c
index 86f54be0..78ad6c93 100644
--- a/src/osmo-bts-sysmo/sysmobts_vty.c
+++ b/src/osmo-bts-sysmo/sysmobts_vty.c
@@ -23,6 +23,7 @@
#include <unistd.h>
#include <errno.h>
#include <stdint.h>
+#include <ctype.h>
#include <arpa/inet.h>
@@ -210,7 +211,7 @@ DEFUN(show_sys_info, show_sys_info_cmd,
}
-int femtol1_vty_init(struct gsm_bts *bts)
+int bts_model_vty_init(struct gsm_bts *bts)
{
vty_bts = bts;