diff options
Diffstat (limited to 'src/common/pcu_sock.c')
-rw-r--r-- | src/common/pcu_sock.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index 27550480..a4ddc052 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -29,6 +29,7 @@ #include <assert.h> #include <sys/socket.h> #include <sys/un.h> +#include <inttypes.h> #include <osmocom/core/talloc.h> #include <osmocom/core/select.h> @@ -329,11 +330,18 @@ int pcu_tx_data_ind(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn, struct gsm_pcu_if *pcu_prim; struct gsm_pcu_if_data *data_ind; struct gsm_bts *bts = ts->trx->bts; + struct gsm_bts_role_bts *btsb = bts_role_bts(bts); LOGP(DPCU, LOGL_DEBUG, "Sending data indication: is_ptcch=%d arfcn=%d " "block=%d data=%s\n", is_ptcch, arfcn, block_nr, osmo_hexdump(data, len)); + if (lqual / 10 < btsb->min_qual_norm) { + LOGP(DPCU, LOGL_DEBUG, "Link quality %"PRId16" is below threshold %f, dropping packet\n", + lqual, btsb->min_qual_norm); + return 0; + } + msg = pcu_msgb_alloc(PCU_IF_MSG_DATA_IND, bts->nr); if (!msg) return -ENOMEM; |