bts chan_load: ignore unusable BTS

For unconnected BTS, the channel load would report a "bogus channel load
sample" every second (on RLL debug). Instead, skip unusable BTS.

This follows up on commit 6cee893a0f2c4e53155a2631aff12a5f615b973d /
I57e38f6d6ba3b23cc6e1f9520b90261dbb1f1cec
'Make "waiting indicator" of IMMEDIATE ASSIGN REJECT dynamic.'

Change-Id: I627fe10e1f5c1f2f23745c906320871024b5c8c3
diff --git a/src/libbsc/chan_alloc.c b/src/libbsc/chan_alloc.c
index 500ad59..42a9e73 100644
--- a/src/libbsc/chan_alloc.c
+++ b/src/libbsc/chan_alloc.c
@@ -606,6 +606,11 @@
 	static const uint8_t max_wait_ind = 128; /* max wait ~2 minutes */
 	int i;
 
+	/* Ignore BTS that are not in operation, in order to not flood the log with "bogus channel load"
+	 * messages */
+	if (!trx_is_usable(bts->c0))
+		return;
+
 	/* Sum up current load across all channels. */
 	memset(&pl, 0, sizeof(pl));
 	bts_chan_load(&pl, bts);