mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
unfinished support for hopping channels
This commit is contained in:
@@ -337,6 +337,11 @@ struct gsm_bts_trx_ts {
|
|||||||
struct tlv_parsed nm_attr;
|
struct tlv_parsed nm_attr;
|
||||||
u_int8_t nm_chan_comb;
|
u_int8_t nm_chan_comb;
|
||||||
|
|
||||||
|
struct {
|
||||||
|
u_int8_t maio;
|
||||||
|
u_int8_t hsn;
|
||||||
|
} hopping;
|
||||||
|
|
||||||
/* To which E1 subslot are we connected */
|
/* To which E1 subslot are we connected */
|
||||||
struct gsm_e1_subslot e1_link;
|
struct gsm_e1_subslot e1_link;
|
||||||
|
|
||||||
|
@@ -1975,13 +1975,12 @@ int abis_nm_set_channel_attr(struct gsm_bts_trx_ts *ts, u_int8_t chan_comb)
|
|||||||
fill_om_fom_hdr(oh, len, NM_MT_SET_CHAN_ATTR,
|
fill_om_fom_hdr(oh, len, NM_MT_SET_CHAN_ATTR,
|
||||||
NM_OC_CHANNEL, bts->bts_nr,
|
NM_OC_CHANNEL, bts->bts_nr,
|
||||||
ts->trx->nr, ts->nr);
|
ts->trx->nr, ts->nr);
|
||||||
/* FIXME: don't send ARFCN list, hopping sequence, mAIO, ...*/
|
|
||||||
if (bts->type == GSM_BTS_TYPE_BS11)
|
|
||||||
msgb_tlv16_put(msg, NM_ATT_ARFCN_LIST, 1, &arfcn);
|
|
||||||
msgb_tv_put(msg, NM_ATT_CHAN_COMB, chan_comb);
|
msgb_tv_put(msg, NM_ATT_CHAN_COMB, chan_comb);
|
||||||
if (bts->type == GSM_BTS_TYPE_BS11) {
|
if (ts->hopping.hsn) {
|
||||||
msgb_tv_put(msg, NM_ATT_HSN, 0x00);
|
msgb_tv_put(msg, NM_ATT_HSN, ts->hopping.hsn);
|
||||||
msgb_tv_put(msg, NM_ATT_MAIO, 0x00);
|
msgb_tv_put(msg, NM_ATT_MAIO, ts->hopping.maio);
|
||||||
|
/* FIXME: compute ARFCN list */
|
||||||
|
msgb_tlv16_put(msg, NM_ATT_ARFCN_LIST, 1, &arfcn);
|
||||||
}
|
}
|
||||||
msgb_tv_put(msg, NM_ATT_TSC, bts->tsc); /* training sequence */
|
msgb_tv_put(msg, NM_ATT_TSC, bts->tsc); /* training sequence */
|
||||||
if (bts->type == GSM_BTS_TYPE_BS11)
|
if (bts->type == GSM_BTS_TYPE_BS11)
|
||||||
|
@@ -305,6 +305,13 @@ static void config_write_ts_single(struct vty *vty, struct gsm_bts_trx_ts *ts)
|
|||||||
if (ts->pchan != GSM_PCHAN_NONE)
|
if (ts->pchan != GSM_PCHAN_NONE)
|
||||||
vty_out(vty, " phys_chan_config %s%s",
|
vty_out(vty, " phys_chan_config %s%s",
|
||||||
gsm_pchan_name(ts->pchan), VTY_NEWLINE);
|
gsm_pchan_name(ts->pchan), VTY_NEWLINE);
|
||||||
|
if (ts->hopping.hsn) {
|
||||||
|
vty_out(vty, " hopping sequence number %u%s",
|
||||||
|
ts->hopping.hsn, VTY_NEWLINE);
|
||||||
|
vty_out(vty, " hopping maio %u%s",
|
||||||
|
ts->hopping.maio, VTY_NEWLINE);
|
||||||
|
/* FIXME: ARFCN list */
|
||||||
|
}
|
||||||
config_write_e1_link(vty, &ts->e1_link, " ");
|
config_write_e1_link(vty, &ts->e1_link, " ");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1977,6 +1984,54 @@ DEFUN(cfg_ts_pchan,
|
|||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEFUN(cfg_ts_hsn,
|
||||||
|
cfg_ts_hsn_cmd,
|
||||||
|
"hopping sequence number <0-63>",
|
||||||
|
"Which hopping sequence to use for this channel")
|
||||||
|
{
|
||||||
|
struct gsm_bts_trx_ts *ts = vty->index;
|
||||||
|
|
||||||
|
ts->hopping.hsn = atoi(argv[0]);
|
||||||
|
|
||||||
|
return CMD_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
DEFUN(cfg_ts_maio,
|
||||||
|
cfg_ts_maio_cmd,
|
||||||
|
"hopping maio <0-63>",
|
||||||
|
"Which hopping MAIO to use for this channel")
|
||||||
|
{
|
||||||
|
struct gsm_bts_trx_ts *ts = vty->index;
|
||||||
|
|
||||||
|
ts->hopping.maio = atoi(argv[0]);
|
||||||
|
|
||||||
|
return CMD_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
DEFUN(cfg_ts_arfcn_add,
|
||||||
|
cfg_ts_arfcn_add_cmd,
|
||||||
|
"hopping arfcn add <0-1023>",
|
||||||
|
"Add an entry to the hopping ARFCN list")
|
||||||
|
{
|
||||||
|
struct gsm_bts_trx_ts *ts = vty->index;
|
||||||
|
int arfcn = atoi(argv[0]);
|
||||||
|
|
||||||
|
/* FIXME */
|
||||||
|
return CMD_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
DEFUN(cfg_ts_arfcn_del,
|
||||||
|
cfg_ts_arfcn_del_cmd,
|
||||||
|
"hopping arfcn del <0-1023>",
|
||||||
|
"Delete an entry to the hopping ARFCN list")
|
||||||
|
{
|
||||||
|
struct gsm_bts_trx_ts *ts = vty->index;
|
||||||
|
int arfcn = atoi(argv[0]);
|
||||||
|
|
||||||
|
/* FIXME */
|
||||||
|
return CMD_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
DEFUN(cfg_ts_e1_subslot,
|
DEFUN(cfg_ts_e1_subslot,
|
||||||
cfg_ts_e1_subslot_cmd,
|
cfg_ts_e1_subslot_cmd,
|
||||||
"e1 line E1_LINE timeslot <1-31> sub-slot (0|1|2|3|full)",
|
"e1 line E1_LINE timeslot <1-31> sub-slot (0|1|2|3|full)",
|
||||||
@@ -2138,6 +2193,10 @@ int bsc_vty_init(void)
|
|||||||
install_element(TS_NODE, &ournode_exit_cmd);
|
install_element(TS_NODE, &ournode_exit_cmd);
|
||||||
install_element(TS_NODE, &ournode_end_cmd);
|
install_element(TS_NODE, &ournode_end_cmd);
|
||||||
install_element(TS_NODE, &cfg_ts_pchan_cmd);
|
install_element(TS_NODE, &cfg_ts_pchan_cmd);
|
||||||
|
install_element(TS_NODE, &cfg_ts_hsn_cmd);
|
||||||
|
install_element(TS_NODE, &cfg_ts_maio_cmd);
|
||||||
|
install_element(TS_NODE, &cfg_ts_arfcn_add_cmd);
|
||||||
|
install_element(TS_NODE, &cfg_ts_arfcn_del_cmd);
|
||||||
install_element(TS_NODE, &cfg_ts_e1_subslot_cmd);
|
install_element(TS_NODE, &cfg_ts_e1_subslot_cmd);
|
||||||
|
|
||||||
abis_nm_vty_init();
|
abis_nm_vty_init();
|
||||||
|
Reference in New Issue
Block a user