diff options
-rw-r--r-- | openbsc/include/openbsc/gsm_data_shared.h | 1 | ||||
-rw-r--r-- | openbsc/include/openbsc/rest_octets.h | 1 | ||||
-rw-r--r-- | openbsc/src/libbsc/bsc_vty.c | 30 | ||||
-rw-r--r-- | openbsc/src/libbsc/rest_octets.c | 9 | ||||
-rw-r--r-- | openbsc/src/libbsc/system_information.c | 3 |
5 files changed, 43 insertions, 1 deletions
diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index 7241ff0f8..70366199e 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -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; diff --git a/openbsc/include/openbsc/rest_octets.h b/openbsc/include/openbsc/rest_octets.h index 91413b5c7..b316228a1 100644 --- a/openbsc/include/openbsc/rest_octets.h +++ b/openbsc/include/openbsc/rest_octets.h @@ -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 { diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index b0e87648e..6584cf0d6 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -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); diff --git a/openbsc/src/libbsc/rest_octets.c b/openbsc/src/libbsc/rest_octets.c index 065fb7b35..cd7bfd552 100644 --- a/openbsc/src/libbsc/rest_octets.c +++ b/openbsc/src/libbsc/rest_octets.c @@ -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); } diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c index fd228e398..69d2f7c8e 100644 --- a/openbsc/src/libbsc/system_information.c +++ b/openbsc/src/libbsc/system_information.c @@ -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) |