Change in osmo-pcu[master]: Move force_two_phase field from BTS to PCU

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Mon Jan 18 10:37:07 UTC 2021


pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/22180 )

Change subject: Move force_two_phase field from BTS to PCU
......................................................................

Move force_two_phase field from BTS to PCU

Change-Id: I68a6e032f725cde87992b99f039c5280e912faf7
---
M src/bts.cpp
M src/bts.h
M src/gprs_pcu.h
M src/pcu_vty.c
4 files changed, 5 insertions(+), 11 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  lynxis lazus: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/bts.cpp b/src/bts.cpp
index ac58f48..f965714 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -903,7 +903,7 @@
 
 	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 4755d2e..2097cca 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -106,7 +106,6 @@
 	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 9696e96..4920966 100644
--- a/src/gprs_pcu.h
+++ b/src/gprs_pcu.h
@@ -74,6 +74,7 @@
 		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 a2c58eb..83fb166 100644
--- a/src/pcu_vty.c
+++ b/src/pcu_vty.c
@@ -227,7 +227,7 @@
 		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 @@
 	   "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 @@
 	   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;
 }
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/22180
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I68a6e032f725cde87992b99f039c5280e912faf7
Gerrit-Change-Number: 22180
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210118/2ab4d2c9/attachment.htm>


More information about the gerrit-log mailing list