From e981f17200bf3a5d5114f46d9f7515fd10b96dbb Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Mon, 6 Apr 2020 18:09:55 +0700 Subject: vty: clarify EGPRS Packet Channel Request message support According to 3GPP TS 44.060, section 12.24, GPRS Cell Options IE contains two parameters related to 11 bit Access Burst support: - ACCESS_BURST_TYPE - whether the 8 or 11 bit format shall be used in the PACKET CHANNEL REQUEST message, the PTCCH/U block, PACKET CONTROL ACKNOWLEDGMENT and the PS HANDOVER ACCESS messages on the PRACH (if present). - EGPRS_PACKET_CHANNEL_REQUEST - whether EGPRS capable MSs shall use EGPRS PACKET CHANNEL REQUEST message for Uplink TBF establishment on the RACH or on the PRACH (if present). The VTY option 'gprs 11bit_rach_support_for_egprs' actually controls the second parameter - EGPRS_PACKET_CHANNEL_REQUEST, though it may be hard to understand this from its name and description. This patch is actually a group of tightly related changes: - deprecate 'gprs 11bit_rach_support_for_egprs (0|1)': - update its description to avoid any possible confusion, - print a warning if it's used in non-EGPRS mode, - print a warning if it's still used; - introduce '[no] gprs egprs-packet-channel-request': - ensure that it can only set / printed in the EGPRS mode; - take a chance to clean-up / rename the related struct members: - 'supports_egprs_11bit_rach' -> bool 'egprs_pkt_chan_request', - remove 'supports_egprs_11bit_rach' from 'gprs_cell_options' because we already have 'ext_info.use_egprs_p_ch_req' there. Change-Id: Ied5bd10a806aeeac65ef32339d4ab0e3700e5da9 --- doc/manuals/vty/bsc_vty_reference.xml | 13 ++++--- include/osmocom/bsc/gsm_data.h | 2 +- include/osmocom/bsc/rest_octets.h | 1 - src/osmo-bsc/bsc_vty.c | 66 ++++++++++++++++++++++++++++++----- src/osmo-bsc/rest_octets.c | 9 ++--- src/osmo-bsc/system_information.c | 11 +++--- 6 files changed, 76 insertions(+), 26 deletions(-) diff --git a/doc/manuals/vty/bsc_vty_reference.xml b/doc/manuals/vty/bsc_vty_reference.xml index f2266e4e7..dac4ec58b 100644 --- a/doc/manuals/vty/bsc_vty_reference.xml +++ b/doc/manuals/vty/bsc_vty_reference.xml @@ -3370,12 +3370,17 @@ - + + + + + + + + - - - + diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 259517485..9a1db07e5 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -1150,7 +1150,6 @@ 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; @@ -1167,6 +1166,7 @@ struct gsm_bts { uint8_t rac; uint8_t net_ctrl_ord; bool ctrl_ack_type_use_block; + bool egprs_pkt_chan_request; } gprs; /* threshold (in percent) when BTS shall send CCCH LOAD IND */ diff --git a/include/osmocom/bsc/rest_octets.h b/include/osmocom/bsc/rest_octets.h index 2c1b16221..7df66f732 100644 --- a/include/osmocom/bsc/rest_octets.h +++ b/include/osmocom/bsc/rest_octets.h @@ -82,7 +82,6 @@ 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; bool ctrl_ack_type_use_block; /* use PACKET CONTROL ACKNOWLEDGMENT */ uint8_t ext_info_present; diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index d3908be78..f8bcee9a7 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -736,9 +736,6 @@ 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", @@ -772,6 +769,12 @@ static void config_write_bts_gprs(struct vty *vty, struct gsm_bts *bts) vty_out(vty, " gprs nsvc %u remote ip %s%s", i, inet_ntoa(ia), VTY_NEWLINE); } + + /* EGPRS specific parameters */ + if (bts->gprs.mode == BTS_GPRS_EGPRS) { + if (bts->gprs.egprs_pkt_chan_request) + vty_out(vty, " gprs egprs-packet-channel-request%s", VTY_NEWLINE); + } } /* Write the model data if there is one */ @@ -3126,22 +3129,65 @@ DEFUN(cfg_bts_gprs_mode, cfg_bts_gprs_mode_cmd, return CMD_SUCCESS; } -DEFUN(cfg_bts_gprs_11bit_rach_support_for_egprs, +DEFUN_DEPRECATED(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\n") + GPRS_TEXT "EGPRS Packet Channel Request support\n" + "Disable EGPRS Packet Channel Request support\n" + "Enable EGPRS Packet Channel Request support\n") { struct gsm_bts *bts = vty->index; - bts->gprs.supports_egprs_11bit_rach = atoi(argv[0]); + vty_out(vty, "%% 'gprs 11bit_rach_support_for_egprs' is now deprecated: " + "use '[no] gprs egprs-packet-channel-request' instead%s", VTY_NEWLINE); - if (bts->gprs.mode == BTS_GPRS_NONE && bts->gprs.supports_egprs_11bit_rach) { + bts->gprs.egprs_pkt_chan_request = (argv[0][0] == '1'); + + if (bts->gprs.mode == BTS_GPRS_NONE && bts->gprs.egprs_pkt_chan_request) { vty_out(vty, "%% (E)GPRS is not enabled (see 'gprs mode')%s", VTY_NEWLINE); return CMD_WARNING; } + if (bts->gprs.mode != BTS_GPRS_EGPRS) { + vty_out(vty, "%% EGPRS Packet Channel Request support requires " + "EGPRS mode to be enabled (see 'gprs mode')%s", VTY_NEWLINE); + /* Do not return here, keep the old behaviour. */ + } + + return CMD_SUCCESS; +} + +DEFUN(cfg_bts_gprs_egprs_pkt_chan_req, + cfg_bts_gprs_egprs_pkt_chan_req_cmd, + "gprs egprs-packet-channel-request", + GPRS_TEXT "EGPRS Packet Channel Request support") +{ + struct gsm_bts *bts = vty->index; + + if (bts->gprs.mode != BTS_GPRS_EGPRS) { + vty_out(vty, "%% EGPRS Packet Channel Request support requires " + "EGPRS mode to be enabled (see 'gprs mode')%s", VTY_NEWLINE); + return CMD_WARNING; + } + + bts->gprs.egprs_pkt_chan_request = true; + return CMD_SUCCESS; +} + +DEFUN(cfg_bts_no_gprs_egprs_pkt_chan_req, + cfg_bts_no_gprs_egprs_pkt_chan_req_cmd, + "no gprs egprs-packet-channel-request", + NO_STR GPRS_TEXT "EGPRS Packet Channel Request support") +{ + struct gsm_bts *bts = vty->index; + + if (bts->gprs.mode != BTS_GPRS_EGPRS) { + vty_out(vty, "%% EGPRS Packet Channel Request support requires " + "EGPRS mode to be enabled (see 'gprs mode')%s", VTY_NEWLINE); + return CMD_WARNING; + } + + bts->gprs.egprs_pkt_chan_request = false; return CMD_SUCCESS; } @@ -5406,6 +5452,8 @@ int bsc_vty_init(struct gsm_network *network) install_element(BTS_NODE, &cfg_bts_radio_link_timeout_inf_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_no_gprs_egprs_pkt_chan_req_cmd); + install_element(BTS_NODE, &cfg_bts_gprs_egprs_pkt_chan_req_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/src/osmo-bsc/rest_octets.c b/src/osmo-bsc/rest_octets.c index 1d2279bf9..2238b088d 100644 --- a/src/osmo-bsc/rest_octets.c +++ b/src/osmo-bsc/rest_octets.c @@ -822,13 +822,8 @@ static int append_gprs_cell_opt(struct bitvec *bv, /* EGPRS supported in the cell */ bitvec_set_bit(bv, 1); - /* 1bit EGPRS PACKET CHANNEL REQUEST */ - 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); - } + /* 1bit EGPRS PACKET CHANNEL REQUEST (inverted logic) */ + bitvec_set_bit(bv, !gco->ext_info.use_egprs_p_ch_req); /* 4bit BEP PERIOD */ bitvec_set_uint(bv, gco->ext_info.bep_period, 4); diff --git a/src/osmo-bsc/system_information.c b/src/osmo-bsc/system_information.c index 6e5841966..d5be3f2d7 100644 --- a/src/osmo-bsc/system_information.c +++ b/src/osmo-bsc/system_information.c @@ -1151,11 +1151,10 @@ static struct gsm48_si13_info si13_default = { .bs_cv_max = 15, .ctrl_ack_type_use_block = true, .ext_info_present = 0, - .supports_egprs_11bit_rach = 0, .ext_info = { /* The values below are just guesses ! */ .egprs_supported = 0, - .use_egprs_p_ch_req = 1, + .use_egprs_p_ch_req = 0, .bep_period = 5, .pfc_supported = 0, .dtm_supported = 0, @@ -1197,8 +1196,12 @@ static int generate_si13(enum osmo_sysinfo_type t, 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; + + /* Whether EGPRS capable MSs shall use EGPRS PACKET CHANNEL REQUEST */ + if (bts->gprs.egprs_pkt_chan_request) + si13_default.cell_opts.ext_info.use_egprs_p_ch_req = 1; + else + si13_default.cell_opts.ext_info.use_egprs_p_ch_req = 0; ret = rest_octets_si13(si13->rest_octets, &si13_default); if (ret < 0) -- cgit v1.2.3