diff options
author | Harald Welte <laforge@gnumonks.org> | 2011-03-04 13:41:31 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-03-04 13:44:07 +0100 |
commit | fd355a3c6feccca5b774c0b3291a6066d0459067 (patch) | |
tree | c6840a0623d7bb863b2ba3ef2356bdbfa3fe9aa8 /openbsc/src/libbsc/bsc_vty.c | |
parent | 89579b4317a7f7ab6ee706399bee4b8f25a12c3a (diff) |
[HSL] initial support for the HSL 2.75G Femtocell
The HSL Femtocell seems to be a poor man implementation of the
ip.access Abis/IP protocol, but cutting corners wherever possible.
We try to workaround those corners wherever possible...
Diffstat (limited to 'openbsc/src/libbsc/bsc_vty.c')
-rw-r--r-- | openbsc/src/libbsc/bsc_vty.c | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index ed45afd4d..57a0c2005 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -253,6 +253,8 @@ static void bts_dump_vty(struct vty *vty, struct gsm_bts *bts) vty_out(vty, " Unit ID: %u/%u/0, OML Stream ID 0x%02x%s", bts->ip_access.site_id, bts->ip_access.bts_id, bts->oml_tei, VTY_NEWLINE); + else if (bts->type == GSM_BTS_TYPE_HSL_FEMTO) + vty_out(vty, " Serial Number: %lu%s", bts->hsl.serno, VTY_NEWLINE); vty_out(vty, " NM State: "); net_dump_nmstate(vty, &bts->nm_state); vty_out(vty, " Site Mgr NM State: "); @@ -497,13 +499,19 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts) VTY_NEWLINE); } } - if (is_ipaccess_bts(bts)) { + switch (bts->type) { + case GSM_BTS_TYPE_NANOBTS: vty_out(vty, " ip.access unit_id %u %u%s", bts->ip_access.site_id, bts->ip_access.bts_id, VTY_NEWLINE); vty_out(vty, " oml ip.access stream_id %u%s", bts->oml_tei, VTY_NEWLINE); - } else { + break; + case GSM_BTS_TYPE_HSL_FEMTO: + vty_out(vty, " hsl serial-number %lu%s", bts->hsl.serno, VTY_NEWLINE); + break; + default: config_write_e1_link(vty, &bts->oml_e1_link, " oml "); vty_out(vty, " oml e1 tei %u%s", bts->oml_tei, VTY_NEWLINE); + break; } /* if we have a limit, write it */ @@ -1584,6 +1592,23 @@ DEFUN(cfg_bts_unit_id, return CMD_SUCCESS; } +DEFUN(cfg_bts_serno, + cfg_bts_serno_cmd, + "hsl serial-number STRING", + "Set the HSL Serial Number of this BTS\n") +{ + struct gsm_bts *bts = vty->index; + + if (bts->type != GSM_BTS_TYPE_HSL_FEMTO) { + vty_out(vty, "%% BTS is not of HSL type%s", VTY_NEWLINE); + return CMD_WARNING; + } + + bts->hsl.serno = strtoul(argv[0], NULL, 10); + + return CMD_SUCCESS; +} + #define OML_STR "Organization & Maintenance Link\n" #define IPA_STR "ip.access Specific Options\n" @@ -2696,6 +2721,7 @@ int bsc_vty_init(void) install_element(BTS_NODE, &cfg_bts_tsc_cmd); install_element(BTS_NODE, &cfg_bts_bsic_cmd); install_element(BTS_NODE, &cfg_bts_unit_id_cmd); + install_element(BTS_NODE, &cfg_bts_serno_cmd); install_element(BTS_NODE, &cfg_bts_stream_id_cmd); install_element(BTS_NODE, &cfg_bts_oml_e1_cmd); install_element(BTS_NODE, &cfg_bts_oml_e1_tei_cmd); |