aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-01-14 12:48:50 +0100
committerpespin <pespin@sysmocom.de>2021-01-18 10:37:05 +0000
commit03de898d193e7e73c0cb700a2d00e2b6a913c458 (patch)
treeb1c2291c0bbb3f66917822a08f9843634ed0411c
parent924aaad4bcb014914eef579c9425bb819ad034ff (diff)
Move force_two_phase field from BTS to PCU
-rw-r--r--src/bts.cpp2
-rw-r--r--src/bts.h1
-rw-r--r--src/gprs_pcu.h1
-rw-r--r--src/pcu_vty.c12
4 files changed, 5 insertions, 11 deletions
diff --git a/src/bts.cpp b/src/bts.cpp
index ac58f48f..f9657144 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -903,7 +903,7 @@ int BTS::rcv_rach(const struct rach_ind_params *rip)
if (chan_req.single_block)
LOGP(DRLCMAC, LOGL_DEBUG, "MS requests single block allocation\n");
- else if (m_bts.force_two_phase) {
+ else if (pcu->vty.force_two_phase) {
LOGP(DRLCMAC, LOGL_DEBUG, "MS requests single block allocation, "
"but we force two phase access\n");
chan_req.single_block = true;
diff --git a/src/bts.h b/src/bts.h
index 4755d2e7..2097ccad 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -106,7 +106,6 @@ struct gprs_rlcmac_bts {
uint8_t n3105;
struct gprs_rlcmac_trx trx[8];
- uint8_t force_two_phase;
uint8_t alpha, gamma;
bool dl_tbf_preemptive_retransmission;
uint8_t si13[GSM_MACBLOCK_LEN];
diff --git a/src/gprs_pcu.h b/src/gprs_pcu.h
index 9696e962..4920966c 100644
--- a/src/gprs_pcu.h
+++ b/src/gprs_pcu.h
@@ -74,6 +74,7 @@ struct gprs_pcu {
bool force_initial_mcs; /* false=use from BTS true=use from VTY */
uint8_t max_cs_dl, max_cs_ul;
uint8_t max_mcs_dl, max_mcs_ul;
+ uint8_t force_two_phase;
} vty;
struct gsmtap_inst *gsmtap;
diff --git a/src/pcu_vty.c b/src/pcu_vty.c
index a2c58eb0..83fb166f 100644
--- a/src/pcu_vty.c
+++ b/src/pcu_vty.c
@@ -227,7 +227,7 @@ static int config_write_pcu(struct vty *vty)
vty_out(vty, " alloc-algorithm b%s", VTY_NEWLINE);
if (the_pcu->alloc_algorithm == alloc_algorithm_dynamic)
vty_out(vty, " alloc-algorithm dynamic%s", VTY_NEWLINE);
- if (bts->force_two_phase)
+ if (the_pcu->vty.force_two_phase)
vty_out(vty, " two-phase-access%s", VTY_NEWLINE);
vty_out(vty, " alpha %d%s", bts->alpha, VTY_NEWLINE);
vty_out(vty, " gamma %d%s", bts->gamma * 2, VTY_NEWLINE);
@@ -782,10 +782,7 @@ DEFUN_ATTR(cfg_pcu_two_phase,
"Force two phase access when MS requests single phase access\n",
CMD_ATTR_IMMEDIATE)
{
- struct gprs_rlcmac_bts *bts = bts_main_data();
-
- bts->force_two_phase = 1;
-
+ the_pcu->vty.force_two_phase = 1;
return CMD_SUCCESS;
}
@@ -795,10 +792,7 @@ DEFUN_ATTR(cfg_pcu_no_two_phase,
NO_STR "Only use two phase access when requested my MS\n",
CMD_ATTR_IMMEDIATE)
{
- struct gprs_rlcmac_bts *bts = bts_main_data();
-
- bts->force_two_phase = 0;
-
+ the_pcu->vty.force_two_phase = 0;
return CMD_SUCCESS;
}