l1sap: Transmit pdtch invalid MAC blocks to PCU

Similar to what we have been doing for TCH channels, we want to make
sure all MAC blocks get to the upper layers, even if containing invalid
data (flagging it with data_len=0) so that upper layers (osmo-pcu
through PCUIF in this case) can rely on FN clock without gaps due to
Rx errors.

Related: OS#5020
Change-Id: I0b04b013b7bad5ff53d6a969ff0128b37f7f62d5
This commit is contained in:
Pau Espin 2021-03-05 11:45:46 +01:00 committed by pespin
parent ffce0e45a5
commit 6a1a5f988b
2 changed files with 4 additions and 6 deletions

View File

@ -1530,12 +1530,9 @@ static int l1sap_ph_data_ind(struct gsm_bts_trx *trx,
return 1;
}
/* don't send bad frames to PCU */
if (len == 0)
return -EINVAL;
/* drop incomplete UL block */
/* Drop all data from incomplete UL block */
if (pr_info != PRES_INFO_BOTH)
return 0;
len = 0;
/* PDTCH / PACCH frame handling */
pcu_tx_data_ind(&trx->ts[tn], PCU_IF_SAPI_PDTCH, fn, trx->arfcn,

View File

@ -501,7 +501,8 @@ int pcu_tx_data_ind(struct gsm_bts_trx_ts *ts, uint8_t sapi, uint32_t fn,
data_ind->ber10k = ber10k;
data_ind->ta_offs_qbits = bto;
data_ind->lqual_cb = lqual;
memcpy(data_ind->data, data, len);
if (len)
memcpy(data_ind->data, data, len);
data_ind->len = len;
return pcu_sock_send(&bts_gsmnet, msg);