diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2018-03-22 04:54:57 +0100 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2018-07-28 12:18:23 +0200 |
commit | 431e085736ba958c5b69c87e401c67f0b322189d (patch) | |
tree | b2c583e4085d2e50cb5080cc2a635aeb869930f2 /src/osmo-bsc/neighbor_ident_vty.c | |
parent | 19bed23065e19caac62b4a6cfe565e609046da7d (diff) |
inter-BSC HO: neighbor_ident API: drop 9bit BSIC
9-bit BSIC exist in the 3GPP specs, but we don't use them anywhere. Rather
remove that choice from the API and UI.
Change-Id: I29b92f47da2636d3a19f073755f9382fa98f9010
Diffstat (limited to 'src/osmo-bsc/neighbor_ident_vty.c')
-rw-r--r-- | src/osmo-bsc/neighbor_ident_vty.c | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/src/osmo-bsc/neighbor_ident_vty.c b/src/osmo-bsc/neighbor_ident_vty.c index 44830abfe..a38d12311 100644 --- a/src/osmo-bsc/neighbor_ident_vty.c +++ b/src/osmo-bsc/neighbor_ident_vty.c @@ -52,8 +52,7 @@ bool neighbor_ident_bts_parse_key_params(struct vty *vty, struct gsm_bts *bts, c struct neighbor_ident_key *key) { const char *arfcn_str = argv[0]; - const char *bsic_kind = argv[1]; - const char *bsic_str = argv[2]; + const char *bsic_str = argv[1]; OSMO_ASSERT(bts); @@ -63,16 +62,9 @@ bool neighbor_ident_bts_parse_key_params(struct vty *vty, struct gsm_bts *bts, c }; if (!strcmp(bsic_str, "any")) - key->bsic_kind = BSIC_NONE; - else { - key->bsic_kind = (!strcmp(bsic_kind, "bsic9")) ? BSIC_9BIT : BSIC_6BIT; + key->bsic = BSIC_ANY; + else key->bsic = atoi(bsic_str); - if (key->bsic_kind == BSIC_6BIT && key->bsic > 0x3f) { - vty_out(vty, "%% Error: BSIC value surpasses 6-bit range: %u, use 'bsic9' instead%s", - key->bsic, VTY_NEWLINE); - return false; - } - } return true; } @@ -239,7 +231,7 @@ bool neighbor_ident_key_matches_bts(const struct neighbor_ident_key *key, struct if (!bts || !key) return false; return key->arfcn == bts->c0->arfcn - && (key->bsic_kind == BSIC_NONE || key->bsic == bts->bsic); + && (key->bsic == BSIC_ANY || key->bsic == bts->bsic); } static int add_remote_or_local_bts(struct vty *vty, const struct gsm0808_cell_id *cell_id, @@ -431,18 +423,10 @@ static bool write_neighbor_ident_list(const struct neighbor_ident_key *key, #define NEIGH_BSS_WRITE(fmt, args...) do { \ vty_out(vty, "%sneighbor add " fmt " arfcn %u ", d->indent, ## args, key->arfcn); \ - switch (key->bsic_kind) { \ - default: \ - case BSIC_NONE: \ + if (key->bsic == BSIC_ANY) \ vty_out(vty, "bsic any"); \ - break; \ - case BSIC_6BIT: \ + else \ vty_out(vty, "bsic %u", key->bsic & 0x3f); \ - break; \ - case BSIC_9BIT: \ - vty_out(vty, "bsic9 %u", key->bsic & 0x1ff); \ - break; \ - } \ vty_out(vty, "%s", VTY_NEWLINE); \ } while(0) |