[PATCH] osmo-bts[master]: osmo-bts-trx: cosmetic fixes

Max gerrit-no-reply at lists.osmocom.org
Thu Feb 9 12:47:47 UTC 2017


Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/1776

to look at the new patch set (#3).

osmo-bts-trx: cosmetic fixes

* print actual value causing error and the check range
* fix log error message typo
* use preprocessor #if 0 to avoid compilation warning for disabled code
* do not attempt to send 0-length bursts to avoid flood of errors after
  bts startup
* don't set DTXu marker for broken frames

Change-Id: Icb536f951386b9abe34c0dacbb203f3db1e41bb3
---
M src/common/scheduler.c
M src/osmo-bts-trx/gsm0503_coding.c
M src/osmo-bts-trx/scheduler_trx.c
3 files changed, 18 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/76/1776/3

diff --git a/src/common/scheduler.c b/src/common/scheduler.c
index 724fb5a..27b7630 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -305,11 +305,11 @@
 			goto wrong_type;
 		}
 		if (prim_fn > 100) {
-			LOGP(DL1C, LOGL_NOTICE, "Prim for trx=%u ts=%u at fn=%u "
-			     "is out of range, or channel %s with type %s is "
-			     "already disabled. If this happens in conjunction "
-			     "with PCU, increase 'rts-advance' by 5. "
-			     "(current fn=%u)\n", l1t->trx->nr, tn,
+			LOGP(DL1C, LOGL_NOTICE, "Prim %u for trx=%u ts=%u at "
+			     "fn=%u is out of range (100), or channel %s with "
+			     "type %s is already disabled. If this happens in "
+			     "conjunction with PCU, increase 'rts-advance' by 5."
+			     " (current fn=%u)\n", prim_fn, l1t->trx->nr, tn,
 			     l1sap->u.data.fn,
 			     get_lchan_by_chan_nr(l1t->trx, chan_nr)->name,
 			     get_value_string(trx_chan_type_names, chan), fn);
@@ -1609,10 +1609,12 @@
 no_data:
 	/* in case of C0, we need a dummy burst to maintain RF power */
 	if (bits == NULL && l1t->trx == l1t->trx->bts->c0) {
-if (0)		if (chan != TRXC_IDLE) // hack
-		LOGP(DL1C, LOGL_DEBUG, "No burst data for %s fn=%u ts=%u "
-			"burst=%d on C0, so filling with dummy burst\n",
-			trx_chan_desc[chan].name, fn, tn, bid);
+#if 0
+		if (chan != TRXC_IDLE) // hack
+			LOGP(DL1C, LOGL_DEBUG, "No burst data for %s fn=%u ts=%u "
+			     "burst=%d on C0, so filling with dummy burst\n",
+			     trx_chan_desc[chan].name, fn, tn, bid);
+#endif
 		bits = (ubit_t *) dummy_burst;
 	}
 
diff --git a/src/osmo-bts-trx/gsm0503_coding.c b/src/osmo-bts-trx/gsm0503_coding.c
index 4c4f7f1..9e04452 100644
--- a/src/osmo-bts-trx/gsm0503_coding.c
+++ b/src/osmo-bts-trx/gsm0503_coding.c
@@ -1687,7 +1687,7 @@
 	if (steal > 0) {
 		rv = _xcch_decode_cB(tch_data, cB, n_errors, n_bits_total);
 		if (rv) {
-			LOGP(DL1C, LOGL_NOTICE, "tch_fr_decode(): error decoding  FACCH frame (%d/%d bits)\n", *n_errors, *n_bits_total);
+			LOGP(DL1C, LOGL_NOTICE, "tch_fr_decode(): error decoding  FACCH/F frame (%d/%d bits)\n", *n_errors, *n_bits_total);
 			return -1;
 		}
 
@@ -1823,7 +1823,7 @@
 
 		rv = _xcch_decode_cB(tch_data, cB, n_errors, n_bits_total);
 		if (rv) {
-			LOGP(DL1C, LOGL_NOTICE, "tch_hr_decode(): error decoding  FACCH frame (%d/%d bits)\n", *n_errors, *n_bits_total);
+			LOGP(DL1C, LOGL_NOTICE, "tch_hr_decode(): error decoding  FACCH/H frame (%d/%d bits)\n", *n_errors, *n_bits_total);
 			return -1;
 		}
 
@@ -1845,7 +1845,7 @@
 
 	rv = osmo_crc8gen_check_bits(&gsm0503_tch_fr_crc3, d + 73, 22, p);
 	if (rv) {
-		LOGP(DL1C, LOGL_NOTICE, "tch_fr_decode(): error checking CRC8 for an HR frame\n");
+		LOGP(DL1C, LOGL_NOTICE, "tch_hr_decode(): error checking CRC8 for an HR frame (%d/%d bits)\n", *n_errors, *n_bits_total);
 		return -1;
 	}
 
diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c
index d946ad5..da92d20 100644
--- a/src/osmo-bts-trx/scheduler_trx.c
+++ b/src/osmo-bts-trx/scheduler_trx.c
@@ -1236,7 +1236,8 @@
 		rc = tch_hr_decode(tch_data, *bursts_p,
 			(((fn + 26 - 10) % 26) >> 2) & 1,
 			&n_errors, &n_bits_total);
-		lchan_set_marker(osmo_hr_check_sid(tch_data, rc), lchan); /* DTXu */
+		if (rc) /* DTXu */
+			lchan_set_marker(osmo_hr_check_sid(tch_data, rc), lchan);
 		break;
 	case GSM48_CMODE_SPEECH_AMR: /* AMR */
 		/* the first FN 0,8,17 or 1,9,18 defines that CMI is included
@@ -1375,7 +1376,8 @@
 				continue;
 			} else
 				gain = 0;
-			trx_if_data(l1h, tn, fn, gain, bits, nbits);
+			if (nbits)
+				trx_if_data(l1h, tn, fn, gain, bits, nbits);
 		}
 	}
 

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Icb536f951386b9abe34c0dacbb203f3db1e41bb3
Gerrit-PatchSet: 3
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Tom Tsou <tom at tsou.cc>


More information about the gerrit-log mailing list