Move force_two_phase field from BTS to PCU

Change-Id: I68a6e032f725cde87992b99f039c5280e912faf7
This commit is contained in:
Pau Espin 2021-01-14 12:48:50 +01:00 committed by pespin
parent 924aaad4bc
commit 03de898d19
4 changed files with 5 additions and 11 deletions

View File

@ -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;

View File

@ -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];

View File

@ -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;

View File

@ -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;
}