aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/include/openbsc/gsm_data_shared.h1
-rw-r--r--openbsc/include/openbsc/rest_octets.h1
-rw-r--r--openbsc/src/libbsc/bsc_vty.c24
-rw-r--r--openbsc/src/libbsc/rest_octets.c7
-rw-r--r--openbsc/src/libbsc/system_information.c2
-rw-r--r--openbsc/src/libcommon/gsm_data.c1
6 files changed, 33 insertions, 3 deletions
diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h
index c19b1255f..30feedcab 100644
--- a/openbsc/include/openbsc/gsm_data_shared.h
+++ b/openbsc/include/openbsc/gsm_data_shared.h
@@ -877,6 +877,7 @@ struct gsm_bts {
} data;
} si_common;
bool early_classmark_allowed;
+ bool early_classmark_allowed_3g;
/* for testing only: Have an infinitely long radio link timeout */
bool infinite_radio_link_timeout;
diff --git a/openbsc/include/openbsc/rest_octets.h b/openbsc/include/openbsc/rest_octets.h
index a2750c154..0ae65f352 100644
--- a/openbsc/include/openbsc/rest_octets.h
+++ b/openbsc/include/openbsc/rest_octets.h
@@ -48,6 +48,7 @@ struct gsm48_si_ro_info {
} scheduling;
struct gsm48_si3_gprs_ind gprs_ind;
/* SI 3 specific */
+ bool early_cm_restrict_3g;
bool si2quater_indicator;
/* SI 4 specific */
struct gsm48_lsa_params lsa_params;
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index 60bea4f0c..3daa262c4 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -283,8 +283,11 @@ static void bts_dump_vty(struct vty *vty, struct gsm_bts *bts)
bts->si_common.chan_desc.bs_ag_blks_res, VTY_NEWLINE);
vty_out(vty, "System Information present: 0x%08x, static: 0x%08x%s",
bts->si_valid, bts->si_mode_static, VTY_NEWLINE);
- vty_out(vty, "Early Classmark Sending: %s%s",
+ vty_out(vty, "Early Classmark Sending: 2G %s, 3G %s%s%s",
bts->early_classmark_allowed ? "allowed" : "forbidden",
+ bts->early_classmark_allowed_3g ? "allowed" : "forbidden",
+ bts->early_classmark_allowed_3g && !bts->early_classmark_allowed ?
+ " (forbidden by 2G bit)" : "",
VTY_NEWLINE);
if (bts->pcu_sock_path)
vty_out(vty, "PCU Socket Path: %s%s", bts->pcu_sock_path, VTY_NEWLINE);
@@ -672,6 +675,8 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
}
vty_out(vty, " early-classmark-sending %s%s",
bts->early_classmark_allowed ? "allowed" : "forbidden", VTY_NEWLINE);
+ vty_out(vty, " early-classmark-sending-3g %s%s",
+ bts->early_classmark_allowed_3g ? "allowed" : "forbidden", VTY_NEWLINE);
switch (bts->type) {
case GSM_BTS_TYPE_NANOBTS:
case GSM_BTS_TYPE_OSMOBTS:
@@ -2770,6 +2775,22 @@ DEFUN(cfg_bts_early_cm, cfg_bts_early_cm_cmd,
return CMD_SUCCESS;
}
+DEFUN(cfg_bts_early_cm_3g, cfg_bts_early_cm_3g_cmd,
+ "early-classmark-sending-3g (allowed|forbidden)",
+ "3G Early Classmark Sending\n"
+ "3G Early Classmark Sending is allowed\n"
+ "3G Early Classmark Sending is forbidden\n")
+{
+ struct gsm_bts *bts = vty->index;
+
+ if (!strcmp(argv[0], "allowed"))
+ bts->early_classmark_allowed_3g = true;
+ else
+ bts->early_classmark_allowed_3g = false;
+
+ return CMD_SUCCESS;
+}
+
DEFUN(cfg_bts_neigh_mode, cfg_bts_neigh_mode_cmd,
"neighbor-list mode (automatic|manual|manual-si5)",
"Neighbor List\n" "Mode of Neighbor List generation\n"
@@ -4291,6 +4312,7 @@ int bsc_vty_init(struct gsm_network *network)
install_element(BTS_NODE, &cfg_bts_si_mode_cmd);
install_element(BTS_NODE, &cfg_bts_si_static_cmd);
install_element(BTS_NODE, &cfg_bts_early_cm_cmd);
+ install_element(BTS_NODE, &cfg_bts_early_cm_3g_cmd);
install_element(BTS_NODE, &cfg_bts_neigh_mode_cmd);
install_element(BTS_NODE, &cfg_bts_neigh_cmd);
install_element(BTS_NODE, &cfg_bts_si5_neigh_cmd);
diff --git a/openbsc/src/libbsc/rest_octets.c b/openbsc/src/libbsc/rest_octets.c
index 7b77ce217..49c38b524 100644
--- a/openbsc/src/libbsc/rest_octets.c
+++ b/openbsc/src/libbsc/rest_octets.c
@@ -495,9 +495,12 @@ int rest_octets_si3(uint8_t *data, const struct gsm48_si_ro_info *si3)
/* GPRS Indicator */
append_gprs_ind(&bv, &si3->gprs_ind);
- /* 3G Early Classmark Sending Restriction controlled by
+ /* 3G Early Classmark Sending Restriction. If H, then controlled by
* early_cm_ctrl above */
- bitvec_set_bit(&bv, H);
+ if (si3->early_cm_restrict_3g)
+ bitvec_set_bit(&bv, L);
+ else
+ bitvec_set_bit(&bv, H);
if (si3->si2quater_indicator) {
bitvec_set_bit(&bv, H); /* indicator struct present */
diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c
index b27465e77..a878b52ef 100644
--- a/openbsc/src/libbsc/system_information.c
+++ b/openbsc/src/libbsc/system_information.c
@@ -812,6 +812,7 @@ static struct gsm48_si_ro_info si_info = {
.ra_colour = 0,
.present = 1,
},
+ .early_cm_restrict_3g = false,
.si2quater_indicator = false,
.lsa_params = {
.present = 0,
@@ -858,6 +859,7 @@ static int generate_si3(enum osmo_sysinfo_type t, struct gsm_bts *bts)
si_info.si2quater_indicator = false;
}
si_info.early_cm_ctrl = bts->early_classmark_allowed;
+ si_info.early_cm_restrict_3g = !bts->early_classmark_allowed_3g;
/* SI3 Rest Octets (10.5.2.34), containing
CBQ, CELL_RESELECT_OFFSET, TEMPORARY_OFFSET, PENALTY_TIME
diff --git a/openbsc/src/libcommon/gsm_data.c b/openbsc/src/libcommon/gsm_data.c
index f1049e92b..55d6fce5b 100644
--- a/openbsc/src/libcommon/gsm_data.c
+++ b/openbsc/src/libcommon/gsm_data.c
@@ -300,6 +300,7 @@ struct gsm_bts *gsm_bts_alloc_register(struct gsm_network *net, enum gsm_bts_typ
bts->dtxd = false;
bts->gprs.ctrl_ack_type_use_block = true; /* use RLC/MAC control block */
bts->neigh_list_manual_mode = 0;
+ bts->early_classmark_allowed_3g = true; /* 3g Early Classmark Sending controlled by bts->early_classmark_allowed param */
bts->si_common.cell_sel_par.cell_resel_hyst = 2; /* 4 dB */
bts->si_common.cell_sel_par.rxlev_acc_min = 0;
bts->si_common.si2quater_neigh_list.arfcn = bts->si_common.data.earfcn_list;