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/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/19789 )
Change subject: pcuif_proto: version 10: add frequency hopping parameters
......................................................................
pcuif_proto: version 10: add frequency hopping parameters
Change-Id: I6863830883d90954006a7126c22d348aa2a83271
Related: SYS#4868, OS#4547
---
M include/osmocom/pcu/pcuif_proto.h
M src/pcu_l1_if.cpp
2 files changed, 33 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/89/19789/1
diff --git a/include/osmocom/pcu/pcuif_proto.h b/include/osmocom/pcu/pcuif_proto.h
index e88607e..ad6fa9a 100644
--- a/include/osmocom/pcu/pcuif_proto.h
+++ b/include/osmocom/pcu/pcuif_proto.h
@@ -5,7 +5,7 @@
#define PCU_SOCK_DEFAULT "/tmp/pcu_bts"
-#define PCU_IF_VERSION 0x09
+#define PCU_IF_VERSION 0x0a
#define TXT_MAX_LEN 128
/* msg_type */
@@ -112,12 +112,20 @@
uint8_t ts_nr;
} __attribute__ ((packed));
+struct gsm_pcu_if_info_ts {
+ uint8_t tsc;
+ uint8_t h;
+ uint8_t hsn;
+ uint8_t maio;
+ uint8_t ma[8];
+} __attribute__ ((packed));
+
struct gsm_pcu_if_info_trx {
uint16_t arfcn;
- uint8_t pdch_mask; /* PDCH channels per TS */
+ uint8_t pdch_mask; /* PDCH slot-mask */
uint8_t spare;
- uint8_t tsc[8]; /* TSC per channel */
uint32_t hlayer1;
+ struct gsm_pcu_if_info_ts ts[8]; /* timeslots per TRX */
} __attribute__ ((packed));
struct gsm_pcu_if_info_ind {
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index f92fe4e..3c348a4 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -630,6 +630,7 @@
}
for (ts_nr = 0; ts_nr < ARRAY_SIZE(bts->trx[0].pdch); ts_nr++) {
+ const struct gsm_pcu_if_info_ts *its = &info_ind->trx[trx_nr].ts[ts_nr];
struct gprs_rlcmac_pdch *pdch = &bts->trx[trx_nr].pdch[ts_nr];
if ((info_ind->trx[trx_nr].pdch_mask & (1 << ts_nr))) {
/* FIXME: activate dynamically at RLCMAC */
@@ -643,9 +644,27 @@
pcu_tx_act_req(trx_nr, ts_nr, 1);
pdch->enable();
}
- pdch->tsc = info_ind->trx[trx_nr].tsc[ts_nr];
- LOGP(DL1IF, LOGL_INFO, "PDCH: trx=%d ts=%d\n",
- trx_nr, ts_nr);
+
+ pdch->tsc = its->tsc;
+
+ /* (Optional) frequency hopping parameters */
+ if (its->h) {
+ pdch->fh.enabled = true;
+ pdch->fh.maio = its->maio;
+ pdch->fh.hsn = its->hsn;
+ pdch->fh.ma_len = 0;
+
+ /* Mobile Allocation (byte/bit order as on the wire) */
+ for (unsigned int i = 0; i < ARRAY_SIZE(pdch->fh.ma); i++) {
+ /* Skip redundant octets (basically padding) */
+ if (!pdch->fh.ma_len && its->ma[i] == 0x00)
+ continue;
+ pdch->fh.ma[pdch->fh.ma_len++] = its->ma[i];
+ }
+ }
+
+ LOGP(DL1IF, LOGL_INFO, "PDCH (trx=%u, ts=%u): tsc=%u, hopping=%s\n",
+ trx_nr, ts_nr, pdch->tsc, pdch->fh.enabled ? "yes" : "no");
} else {
if (pdch->is_enabled()) {
pcu_tx_act_req(trx_nr, ts_nr, 0);
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/19789
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I6863830883d90954006a7126c22d348aa2a83271
Gerrit-Change-Number: 19789
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200821/d986fd28/attachment.htm>