[PATCH] osmocom-bb[master]: host/trxcon/l1ctl.c: handle L1CTL_PARAM_REQ

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:33:10 UTC 2018


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

host/trxcon/l1ctl.c: handle L1CTL_PARAM_REQ

Change-Id: I5c23520dc0f19147b41ad2e13681bf0a62e9facd
---
M src/host/trxcon/l1ctl.c
M src/host/trxcon/trx_if.h
2 files changed, 22 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/43/6743/1

diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c
index cbe037a..2c82e11 100644
--- a/src/host/trxcon/l1ctl.c
+++ b/src/host/trxcon/l1ctl.c
@@ -633,6 +633,24 @@
 	return rc;
 }
 
+static int l1ctl_rx_param_req(struct l1ctl_link *l1l, struct msgb *msg)
+{
+	struct l1ctl_par_req *par_req;
+	struct l1ctl_info_ul *ul;
+
+	ul = (struct l1ctl_info_ul *) msg->l1h;
+	par_req = (struct l1ctl_par_req *) ul->payload;
+
+	LOGP(DL1C, LOGL_NOTICE, "Received L1CTL_PARAM_REQ "
+		"(ta=%d, tx_power=%u)\n", par_req->ta, par_req->tx_power);
+
+	l1l->trx->ta = par_req->ta;
+	l1l->trx->tx_power = par_req->tx_power;
+
+	msgb_free(msg);
+	return 0;
+}
+
 int l1ctl_rx_cb(struct l1ctl_link *l1l, struct msgb *msg)
 {
 	struct l1ctl_hdr *l1h;
@@ -659,6 +677,8 @@
 		return l1ctl_rx_dm_rel_req(l1l, msg);
 	case L1CTL_DATA_REQ:
 		return l1ctl_rx_data_req(l1l, msg);
+	case L1CTL_PARAM_REQ:
+		return l1ctl_rx_param_req(l1l, msg);
 	default:
 		LOGP(DL1C, LOGL_ERROR, "Unknown MSG: %u\n", l1h->msg_type);
 		msgb_free(msg);
diff --git a/src/host/trxcon/trx_if.h b/src/host/trxcon/trx_if.h
index 7278bc1..f09a256 100644
--- a/src/host/trxcon/trx_if.h
+++ b/src/host/trxcon/trx_if.h
@@ -31,8 +31,10 @@
 	uint16_t pm_arfcn_start;
 	uint16_t pm_arfcn_stop;
 	uint16_t band_arfcn;
+	uint8_t tx_power;
 	uint8_t bsic;
 	uint8_t tsc;
+	int8_t ta;
 
 	/* Scheduler stuff */
 	struct trx_sched sched;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c23520dc0f19147b41ad2e13681bf0a62e9facd
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