dexter has uploaded this change for review.
pcu_sock: rework check logic for ts
Befor filling in the TS in the info indication, it is checked that the
MO opstate is enabled. Also it is checked that the TS serves a PDCH.
Lets restructure this check and move the PDCH check into a helper
function as we need to check for PDCH from other location as well later.
Change-Id: Icaab52ab73c38889dfadb523b89bb54cafacc99a
Related: OS#5198
---
M src/osmo-bsc/pcu_sock.c
1 file changed, 9 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/76/30876/1
diff --git a/src/osmo-bsc/pcu_sock.c b/src/osmo-bsc/pcu_sock.c
index 1be8196..5964f9c 100644
--- a/src/osmo-bsc/pcu_sock.c
+++ b/src/osmo-bsc/pcu_sock.c
@@ -92,6 +92,12 @@
return msg;
}
+/* Check if the timeslot can be utilized as PDCH */
+static bool ts_is_pdch(const struct gsm_bts_trx_ts *ts)
+{
+ return (ts->pchan_is == GSM_PCHAN_PDCH);
+}
+
/* 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)
@@ -123,8 +129,9 @@
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)
+ if (ts->mo.nm_state.operational != NM_OPSTATE_ENABLED)
+ continue;
+ if (!ts_is_pdch(ts))
continue;
trx_info->pdch_mask |= (1 << tn);
To view, visit change 30876. To unsubscribe, or for help writing mail filters, visit settings.