[network] Make T3101 configurable and use it in abis_rsl

This commit is contained in:
Holger Hans Peter Freyther 2009-11-21 21:18:38 +01:00
parent d61654cf54
commit c4d88ad971
7 changed files with 31 additions and 1 deletions

View File

@ -422,6 +422,9 @@ struct gsm_network {
unsigned int num_bts;
struct llist_head bts_list;
/* timer values */
int T3101;
};
#define SMS_HDR_SIZE 128

View File

@ -1186,7 +1186,7 @@ static int rsl_rx_chan_rqd(struct msgb *msg)
/* Start timer T3101 to wait for GSM48_MT_RR_PAG_RESP */
lchan->T3101.cb = t3101_expired;
lchan->T3101.data = lchan;
bsc_schedule_timer(&lchan->T3101, 10, 0);
bsc_schedule_timer(&lchan->T3101, bts->network->T3101, 0);
/* send IMMEDIATE ASSIGN CMD on RSL to BTS (to send on CCCH to MS) */
ret = rsl_imm_assign_cmd(bts, sizeof(ia), (u_int8_t *) &ia);

View File

@ -11,6 +11,7 @@ network
mobile network code 1
short name OpenBSC
long name OpenBSC
timer t3101 10
bts 0
type bs11
band GSM900

View File

@ -11,6 +11,7 @@ network
mobile network code 1
short name OpenBSC
long name OpenBSC
timer t3101 10
bts 0
type bs11
band GSM900

View File

@ -11,6 +11,7 @@ network
mobile network code 1
short name OpenBSC
long name OpenBSC
timer t3101 10
bts 0
type bs11
band GSM900

View File

@ -11,6 +11,7 @@ network
mobile network code 1
short name OpenBSC
long name OpenBSC
timer t3101 10
bts 0
type nanobts
ip.access unit_id 1801 0

View File

@ -275,6 +275,7 @@ static int config_write_net(struct vty *vty)
vty_out(vty, " auth policy %s%s", gsm_auth_policy_name(gsmnet->auth_policy), VTY_NEWLINE);
vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE);
vty_out(vty, " neci %u%s", gsmnet->neci, VTY_NEWLINE);
vty_out(vty, " timer t3101 %u%s", gsmnet->T3101, VTY_NEWLINE);
return CMD_SUCCESS;
}
@ -801,6 +802,27 @@ DEFUN(cfg_net_neci,
return CMD_SUCCESS;
}
#define DECLARE_TIMER(number) \
DEFUN(cfg_net_T##number, \
cfg_net_T##number##_cmd, \
"timer t" #number " <0-65535>", \
"Set the T" #number " value.") \
{ \
int value = atoi(argv[0]); \
\
if (value < 0 || value > 65535) { \
vty_out(vty, "Timer value %s out of range.%s", \
argv[0], VTY_NEWLINE); \
return CMD_WARNING; \
} \
\
gsmnet->T##number = value; \
return CMD_SUCCESS; \
}
DECLARE_TIMER(3101)
/* per-BTS configuration */
DEFUN(cfg_bts,
cfg_bts_cmd,
@ -1241,6 +1263,7 @@ int bsc_vty_init(struct gsm_network *net)
install_element(GSMNET_NODE, &cfg_net_auth_policy_cmd);
install_element(GSMNET_NODE, &cfg_net_encryption_cmd);
install_element(GSMNET_NODE, &cfg_net_neci_cmd);
install_element(GSMNET_NODE, &cfg_net_T3101_cmd);
install_element(GSMNET_NODE, &cfg_bts_cmd);
install_node(&bts_node, config_write_bts);