Modify SI 13 field to support 11 bit RACH

System Information 13 field EGPRS PACKET CHANNEL REQUEST is
modified to support 11 bit RACH. Further VTY configuration is added
to enable/disable 11 bit RACH support in EGPRS. By default 11 bit
RACH support is disabled.

Change-Id: I51357bec936c28a26ab9ff5d59e0e30ca3363297
This commit is contained in:
bhargava 2016-07-21 11:14:34 +05:30 committed by Harald Welte
parent e3dc498e01
commit 350533cc32
5 changed files with 43 additions and 1 deletions

View File

@ -696,6 +696,7 @@ struct gsm_bts {
/* Not entirely sure how ip.access specific this is */
struct {
uint8_t supports_egprs_11bit_rach;
enum bts_gprs_mode mode;
struct {
struct gsm_abis_mo mo;

View File

@ -88,6 +88,7 @@ struct gprs_cell_options {
uint32_t t3192; /* in milliseconds */
uint32_t drx_timer_max;/* in seconds */
uint32_t bs_cv_max;
uint8_t supports_egprs_11bit_rach;
uint8_t ext_info_present;
struct {

View File

@ -448,6 +448,9 @@ static void config_write_bts_gprs(struct vty *vty, struct gsm_bts *bts)
if (bts->gprs.mode == BTS_GPRS_NONE)
return;
vty_out(vty, " gprs 11bit_rach_support_for_egprs %u%s",
bts->gprs.supports_egprs_11bit_rach, VTY_NEWLINE);
vty_out(vty, " gprs routing area %u%s", bts->gprs.rac,
VTY_NEWLINE);
vty_out(vty, " gprs network-control-order nc%u%s",
@ -2724,6 +2727,32 @@ DEFUN(cfg_bts_gprs_mode, cfg_bts_gprs_mode_cmd,
return CMD_SUCCESS;
}
DEFUN(cfg_bts_gprs_11bit_rach_support_for_egprs,
cfg_bts_gprs_11bit_rach_support_for_egprs_cmd,
"gprs 11bit_rach_support_for_egprs (0|1)",
GPRS_TEXT "11 bit RACH options\n"
"Disable 11 bit RACH for EGPRS\n"
"Enable 11 bit RACH for EGPRS")
{
struct gsm_bts *bts = vty->index;
bts->gprs.supports_egprs_11bit_rach = atoi(argv[0]);
if (bts->gprs.supports_egprs_11bit_rach > 1) {
vty_out(vty, "Error in RACH type%s", VTY_NEWLINE);
return CMD_WARNING;
}
if ((bts->gprs.mode == BTS_GPRS_NONE) &&
(bts->gprs.supports_egprs_11bit_rach == 1)) {
vty_out(vty, "Error:gprs mode is none and 11bit rach is"
" enabled%s", VTY_NEWLINE);
return CMD_WARNING;
}
return CMD_SUCCESS;
}
#define SI_TEXT "System Information Messages\n"
#define SI_TYPE_TEXT "(1|2|3|4|5|6|7|8|9|10|13|16|17|18|19|20|2bis|2ter|2quater|5bis|5ter)"
#define SI_TYPE_HELP "System Information Type 1\n" \
@ -4085,6 +4114,7 @@ int bsc_vty_init(const struct log_info *cat)
install_element(BTS_NODE, &cfg_bts_penalty_time_rsvd_cmd);
install_element(BTS_NODE, &cfg_bts_radio_link_timeout_cmd);
install_element(BTS_NODE, &cfg_bts_gprs_mode_cmd);
install_element(BTS_NODE, &cfg_bts_gprs_11bit_rach_support_for_egprs_cmd);
install_element(BTS_NODE, &cfg_bts_gprs_ns_timer_cmd);
install_element(BTS_NODE, &cfg_bts_gprs_rac_cmd);
install_element(BTS_NODE, &cfg_bts_gprs_net_ctrl_ord_cmd);

View File

@ -649,8 +649,15 @@ static int append_gprs_cell_opt(struct bitvec *bv,
bitvec_set_uint(bv, (1 + 5 + 3)-1, 6);
/* EGPRS supported in the cell */
bitvec_set_bit(bv, 1);
/* 1bit EGPRS PACKET CHANNEL REQUEST */
bitvec_set_bit(bv, gco->ext_info.use_egprs_p_ch_req);
if (gco->supports_egprs_11bit_rach == 0) {
bitvec_set_bit(bv,
gco->ext_info.use_egprs_p_ch_req);
} else {
bitvec_set_bit(bv, 0);
}
/* 4bit BEP PERIOD */
bitvec_set_uint(bv, gco->ext_info.bep_period, 4);
}

View File

@ -957,6 +957,7 @@ static struct gsm48_si13_info si13_default = {
.drx_timer_max = 3,
.bs_cv_max = 15,
.ext_info_present = 0,
.supports_egprs_11bit_rach = 0,
.ext_info = {
/* The values below are just guesses ! */
.egprs_supported = 0,
@ -1004,6 +1005,8 @@ static int generate_si13(uint8_t *output, struct gsm_bts *bts)
/* Information about the other SIs */
si13_default.bcch_change_mark = bts->bcch_change_mark;
si13_default.cell_opts.supports_egprs_11bit_rach =
bts->gprs.supports_egprs_11bit_rach;
ret = rest_octets_si13(si13->rest_octets, &si13_default);
if (ret < 0)