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/.
lynxis lazus gerrit-no-reply at lists.osmocom.orglynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/20293 )
Change subject: pcuif_proto: version 10: add frequency hopping parameters
......................................................................
pcuif_proto: version 10: add frequency hopping parameters
Related: SYS#4868, OS#4546, OS#4547
Change-Id: I5540fae66a116cbb25ec75b35145c36137146ffd
---
M include/osmocom/bsc/pcuif_proto.h
M src/osmo-bsc/pcu_sock.c
2 files changed, 41 insertions(+), 13 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/93/20293/1
diff --git a/include/osmocom/bsc/pcuif_proto.h b/include/osmocom/bsc/pcuif_proto.h
index e88607e..80d4f90 100644
--- a/include/osmocom/bsc/pcuif_proto.h
+++ b/include/osmocom/bsc/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,21 @@
uint8_t ts_nr;
} __attribute__ ((packed));
+struct gsm_pcu_if_info_trx_ts {
+ uint8_t tsc;
+ uint8_t hopping;
+ uint8_t hsn;
+ uint8_t maio;
+ uint8_t ma_bit_len;
+ 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 timeslot mask */
uint8_t spare;
- uint8_t tsc[8]; /* TSC per channel */
uint32_t hlayer1;
+ struct gsm_pcu_if_info_trx_ts ts[8];
} __attribute__ ((packed));
struct gsm_pcu_if_info_ind {
diff --git a/src/osmo-bsc/pcu_sock.c b/src/osmo-bsc/pcu_sock.c
index 35fe2d7..1a0f06a 100644
--- a/src/osmo-bsc/pcu_sock.c
+++ b/src/osmo-bsc/pcu_sock.c
@@ -96,6 +96,18 @@
return msg;
}
+/* Fill the frequency hopping parameter */
+static void info_ind_fill_fhp(struct gsm_pcu_if_info_trx_ts *ts_info,
+ const struct gsm_bts_trx_ts *ts)
+{
+ ts_info->maio = ts->hopping.maio;
+ ts_info->hsn = ts->hopping.hsn;
+ ts_info->hopping = 0x1;
+
+ memcpy(&ts_info->ma, ts->hopping.ma_data, ts->hopping.ma_len);
+ ts_info->ma_bit_len = ts->hopping.ma_len * 8 - ts->hopping.ma.cur_bit;
+}
+
/* Send BTS properties to the PCU */
static int pcu_tx_info_ind(struct gsm_bts *bts)
{
@@ -206,17 +218,24 @@
info_ind->trx[i].arfcn = trx->arfcn;
for (tn = 0; tn < ARRAY_SIZE(trx->ts); tn++) {
ts = &trx->ts[tn];
- if (ts->mo.nm_state.operational == NM_OPSTATE_ENABLED
- && ts->pchan_is == GSM_PCHAN_PDCH) {
- info_ind->trx[i].pdch_mask |= (1 << tn);
- info_ind->trx[i].tsc[tn] =
+ if (ts->mo.nm_state.operational != NM_OPSTATE_ENABLED ||
+ ts->pchan_is != GSM_PCHAN_PDCH)
+ continue;
+
+ info_ind->trx[i].pdch_mask |= (1 << tn);
+ info_ind->trx[i].ts[tn].tsc =
(ts->tsc >= 0) ? ts->tsc : bts->bsic & 7;
- LOGP(DPCU, LOGL_INFO, "trx=%d ts=%d: "
- "available (tsc=%d arfcn=%d)\n",
- trx->nr, ts->nr,
- info_ind->trx[i].tsc[tn],
- info_ind->trx[i].arfcn);
- }
+
+ if (ts->hopping.enabled)
+ info_ind_fill_fhp(&info_ind->trx[i].ts[tn], ts);
+
+ LOGP(DPCU, LOGL_INFO, "trx=%d ts=%d: PDCH is available "
+ "(tsc=%u ", trx->nr, ts->nr, info_ind->trx[i].ts[tn].tsc);
+ if (ts->hopping.enabled)
+ LOGPC(DPCU, LOGL_INFO, "hopping=yes hsn=%u maio=%u ma_bit_len=%u)\n",
+ ts->hopping.hsn, ts->hopping.maio, trx->ts[tn].hopping.ma.data_len - trx->ts[tn].hopping.ma.cur_bit);
+ else
+ LOGPC(DPCU, LOGL_INFO, "hopping=no arfcn=%u)\n", trx->arfcn);
}
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/20293
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I5540fae66a116cbb25ec75b35145c36137146ffd
Gerrit-Change-Number: 20293
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200926/92b155b8/attachment.htm>