[PATCH] osmocom-bb[master]: host/trxcon: store arfcn and band in trx_instance

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu Feb 22 15:32:36 UTC 2018


Review at  https://gerrit.osmocom.org/6693

host/trxcon: store arfcn and band in trx_instance

Change-Id: I95414ff1033d77f11e231178b7721b70bc45e6df
---
M src/host/trxcon/trx_if.h
M src/host/trxcon/trxcon.c
2 files changed, 6 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/93/6693/1

diff --git a/src/host/trxcon/trx_if.h b/src/host/trxcon/trx_if.h
index 1241fd5..4d9e470 100644
--- a/src/host/trxcon/trx_if.h
+++ b/src/host/trxcon/trx_if.h
@@ -24,6 +24,7 @@
 	struct llist_head trx_ctrl_list;
 	struct osmo_fsm_inst *fsm;
 	uint32_t prev_state;
+	uint16_t band_arfcn;
 
 	/* Scheduler stuff */
 	struct trx_sched sched;
diff --git a/src/host/trxcon/trxcon.c b/src/host/trxcon/trxcon.c
index 791bd25..d88e990 100644
--- a/src/host/trxcon/trxcon.c
+++ b/src/host/trxcon/trxcon.c
@@ -36,6 +36,8 @@
 #include <osmocom/core/select.h>
 #include <osmocom/core/application.h>
 
+#include <osmocom/gsm/gsm_utils.h>
+
 #include "trxcon.h"
 #include "trx_if.h"
 #include "logging.h"
@@ -80,8 +82,6 @@
 static void trxcon_fsm_managed_action(struct osmo_fsm_inst *fi,
 	uint32_t event, void *data)
 {
-	uint16_t *band_arfcn;
-
 	switch (event) {
 	case L1CTL_EVENT_DISCONNECT:
 		osmo_fsm_inst_state_chg(trxcon_fsm, TRXCON_STATE_IDLE, 0, 0);
@@ -101,9 +101,9 @@
 		l1ctl_tx_reset_conf(app_data.l1l, L1CTL_RES_T_BOOT);
 		break;
 	case L1CTL_EVENT_FBSB_REQ:
-		band_arfcn = (uint16_t *) data;
-		trx_if_cmd_rxtune(app_data.trx, *band_arfcn);
-		trx_if_cmd_txtune(app_data.trx, *band_arfcn);
+		app_data.trx->band_arfcn = *((uint16_t *) data);
+		trx_if_cmd_rxtune(app_data.trx, app_data.trx->band_arfcn);
+		trx_if_cmd_txtune(app_data.trx, app_data.trx->band_arfcn);
 		trx_if_cmd_poweron(app_data.trx);
 		break;
 	case TRX_EVENT_RSP_ERROR:

-- 
To view, visit https://gerrit.osmocom.org/6693
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I95414ff1033d77f11e231178b7721b70bc45e6df
Gerrit-PatchSet: 1
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list