osmo_e1f: Allow to transmit AIS

AIS is an all-1 bit-pattern which is used by intermediate equipment
to indicate that the link somewhere upstream is lost.

Change-Id: Icc5a16ee44ecebe802c4cca0b6cc763a88b6cc05
This commit is contained in:
Harald Welte 2020-12-19 15:41:03 +01:00
parent e6b0fe8377
commit 9e7a21ae58
2 changed files with 6 additions and 0 deletions

View File

@ -292,6 +292,11 @@ int osmo_e1f_pull_tx_frame(struct osmo_e1f_instance *e1i, uint8_t *out_frame)
{
int i;
if (e1i->tx.ais) {
memset(out_frame, 0xff, 32);
return 0;
}
/* generate TS0 */
out_frame[0] = e1_pull_ts0(e1i);

View File

@ -10,6 +10,7 @@
struct osmo_e1f_tx_state {
bool remote_alarm;
bool crc4_error;
bool ais;
/* lower 5 bits: Sa4..Sa8 */
uint8_t sa4_sa8;
/* frame number 0..15 */