diff options
author | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2016-05-20 22:22:39 +0300 |
---|---|---|
committer | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2016-05-20 22:22:39 +0300 |
commit | 0fd7b96578e1ce8aa78625b5eee820adb353fa09 (patch) | |
tree | a048a48bf069013c0070cafa7a0885d2f7e1c41b | |
parent | f3d02b85baf326e80221c5358bd5489b6ef389c8 (diff) |
trx: Add "maxdlynb" VTY command to control max TA for Normal Bursts.
-rw-r--r-- | src/osmo-bts-trx/l1_if.c | 6 | ||||
-rw-r--r-- | src/osmo-bts-trx/l1_if.h | 4 | ||||
-rw-r--r-- | src/osmo-bts-trx/trx_if.c | 5 | ||||
-rw-r--r-- | src/osmo-bts-trx/trx_if.h | 1 | ||||
-rw-r--r-- | src/osmo-bts-trx/trx_vty.c | 38 |
5 files changed, 54 insertions, 0 deletions
diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c index 24d21feb..99795080 100644 --- a/src/osmo-bts-trx/l1_if.c +++ b/src/osmo-bts-trx/l1_if.c @@ -188,6 +188,10 @@ int l1if_provision_transceiver_trx(struct trx_l1h *l1h) trx_if_cmd_setmaxdly(l1h, l1h->config.maxdly); l1h->config.maxdly_sent = 1; } + if (l1h->config.maxdlynb_valid && !l1h->config.maxdlynb_sent) { + trx_if_cmd_setmaxdlynb(l1h, l1h->config.maxdlynb); + l1h->config.maxdlynb_sent = 1; + } for (tn = 0; tn < 8; tn++) { if (l1h->config.slottype_valid[tn] && !l1h->config.slottype_sent[tn]) { @@ -205,6 +209,7 @@ int l1if_provision_transceiver_trx(struct trx_l1h *l1h) l1h->config.rxgain_sent = 0; l1h->config.power_sent = 0; l1h->config.maxdly_sent = 0; + l1h->config.maxdlynb_sent = 0; for (tn = 0; tn < 8; tn++) l1h->config.slottype_sent[tn] = 0; } @@ -227,6 +232,7 @@ int l1if_provision_transceiver(struct gsm_bts *bts) l1h->config.rxgain_sent = 0; l1h->config.power_sent = 0; l1h->config.maxdly_sent = 0; + l1h->config.maxdlynb_sent = 0; for (tn = 0; tn < 8; tn++) l1h->config.slottype_sent[tn] = 0; l1if_provision_transceiver_trx(l1h); diff --git a/src/osmo-bts-trx/l1_if.h b/src/osmo-bts-trx/l1_if.h index 278537e1..f254326f 100644 --- a/src/osmo-bts-trx/l1_if.h +++ b/src/osmo-bts-trx/l1_if.h @@ -134,6 +134,10 @@ struct trx_config { int maxdly; int maxdly_sent; + int maxdlynb_valid; + int maxdlynb; + int maxdlynb_sent; + uint8_t slotmask; int slottype_valid[8]; diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index 69ad8415..56c98fdf 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -278,6 +278,11 @@ int trx_if_cmd_setmaxdly(struct trx_l1h *l1h, int dly) return trx_ctrl_cmd(l1h, 0, "SETMAXDLY", "%d", dly); } +int trx_if_cmd_setmaxdlynb(struct trx_l1h *l1h, int dly) +{ + return trx_ctrl_cmd(l1h, 0, "SETMAXDLYNB", "%d", dly); +} + int trx_if_cmd_setslot(struct trx_l1h *l1h, uint8_t tn, uint8_t type) { return trx_ctrl_cmd(l1h, 1, "SETSLOT", "%d %d", tn, type); diff --git a/src/osmo-bts-trx/trx_if.h b/src/osmo-bts-trx/trx_if.h index ac0ee42c..1ea7fd8f 100644 --- a/src/osmo-bts-trx/trx_if.h +++ b/src/osmo-bts-trx/trx_if.h @@ -21,6 +21,7 @@ int trx_if_cmd_setbsic(struct trx_l1h *l1h, uint8_t bsic); int trx_if_cmd_setrxgain(struct trx_l1h *l1h, int db); int trx_if_cmd_setpower(struct trx_l1h *l1h, int db); int trx_if_cmd_setmaxdly(struct trx_l1h *l1h, int dly); +int trx_if_cmd_setmaxdlynb(struct trx_l1h *l1h, int dly); int trx_if_cmd_setslot(struct trx_l1h *l1h, uint8_t tn, uint8_t type); int trx_if_cmd_rxtune(struct trx_l1h *l1h, uint16_t arfcn); int trx_if_cmd_txtune(struct trx_l1h *l1h, uint16_t arfcn); diff --git a/src/osmo-bts-trx/trx_vty.c b/src/osmo-bts-trx/trx_vty.c index e3e9c364..fec4b1f2 100644 --- a/src/osmo-bts-trx/trx_vty.c +++ b/src/osmo-bts-trx/trx_vty.c @@ -100,6 +100,11 @@ DEFUN(show_transceiver, show_transceiver_cmd, "show transceiver", VTY_NEWLINE); else vty_out(vty, " maxdly : undefined%s", VTY_NEWLINE); + if (l1h->config.maxdlynb_valid) + vty_out(vty, " maxdlynb : %d%s", l1h->config.maxdlynb, + VTY_NEWLINE); + else + vty_out(vty, " maxdlynb : undefined%s", VTY_NEWLINE); for (tn = 0; tn < 8; tn++) { if (!((1 << tn) & l1h->config.slotmask)) vty_out(vty, " slot #%d: unsupported%s", tn, @@ -286,6 +291,22 @@ DEFUN(cfg_trx_maxdly, cfg_trx_maxdly_cmd, return CMD_SUCCESS; } +DEFUN(cfg_trx_maxdlynb, cfg_trx_maxdlynb_cmd, + "maxdlynb <0-31>", + "Set the maximum delay of GSM symbols\n" + "GSM symbols (approx. 1.1km per symbol)\n") +{ + struct gsm_bts_trx *trx = vty->index; + struct trx_l1h *l1h = trx_l1h_hdl(trx); + + l1h->config.maxdlynb = atoi(argv[0]); + l1h->config.maxdlynb_valid = 1; + l1h->config.maxdlynb_sent = 0; + l1if_provision_transceiver_trx(l1h); + + return CMD_SUCCESS; +} + DEFUN(cfg_trx_slotmask, cfg_trx_slotmask_cmd, "slotmask (1|0) (1|0) (1|0) (1|0) (1|0) (1|0) (1|0) (1|0)", "Set the supported slots\n" @@ -345,6 +366,19 @@ DEFUN(cfg_trx_no_maxdly, cfg_trx_no_maxdly_cmd, return CMD_SUCCESS; } +DEFUN(cfg_trx_no_maxdlynb, cfg_trx_no_maxdlynb_cmd, + "no maxdlynb <0-31>", + NO_STR "Unset the maximum delay of GSM symbols\n" + "GSM symbols (approx. 1.1km per symbol)\n") +{ + struct gsm_bts_trx *trx = vty->index; + struct trx_l1h *l1h = trx_l1h_hdl(trx); + + l1h->config.maxdlynb_valid = 0; + + return CMD_SUCCESS; +} + void bts_model_config_write_bts(struct vty *vty, struct gsm_bts *bts) { vty_out(vty, " fn-advance %d%s", trx_clock_advance, VTY_NEWLINE); @@ -378,6 +412,8 @@ void bts_model_config_write_trx(struct vty *vty, struct gsm_bts_trx *trx) } if (l1h->config.maxdly_valid) vty_out(vty, " maxdly %d%s", l1h->config.maxdly, VTY_NEWLINE); + if (l1h->config.maxdlynb_valid) + vty_out(vty, " maxdlynb %d%s", l1h->config.maxdlynb, VTY_NEWLINE); if (l1h->config.slotmask != 0xff) vty_out(vty, " slotmask %d %d %d %d %d %d %d %d%s", l1h->config.slotmask & 1, @@ -412,10 +448,12 @@ int bts_model_vty_init(struct gsm_bts *bts) install_element(TRX_NODE, &cfg_trx_power_cmd); install_element(TRX_NODE, &cfg_trx_power_oml_cmd); install_element(TRX_NODE, &cfg_trx_maxdly_cmd); + install_element(TRX_NODE, &cfg_trx_maxdlynb_cmd); install_element(TRX_NODE, &cfg_trx_slotmask_cmd); install_element(TRX_NODE, &cfg_trx_no_rxgain_cmd); install_element(TRX_NODE, &cfg_trx_no_power_cmd); install_element(TRX_NODE, &cfg_trx_no_maxdly_cmd); + install_element(TRX_NODE, &cfg_trx_no_maxdlynb_cmd); return 0; } |