diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2023-11-29 12:03:00 +0100 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2023-11-29 12:03:00 +0100 |
commit | 9eda1139a5fdcdd59758911c96aeba017a9966d2 (patch) | |
tree | dcfbf0c569683af21afa5313ee5ff5d110a1ac72 | |
parent | 8997a8db259e086dcc8efca6e586213e351ecafc (diff) |
TBDjolly/lapd
Change-Id: I2a75c192bbc24e85bfc1656b2be21cea7a92814a
-rw-r--r-- | include/osmocom/gsm/lapdm.h | 1 | ||||
-rw-r--r-- | src/gsm/lapdm.c | 10 |
2 files changed, 6 insertions, 5 deletions
diff --git a/include/osmocom/gsm/lapdm.h b/include/osmocom/gsm/lapdm.h index 42ebbcec..6812102e 100644 --- a/include/osmocom/gsm/lapdm.h +++ b/include/osmocom/gsm/lapdm.h @@ -51,6 +51,7 @@ typedef int (*lapdm_cb_t)(struct msgb *msg, struct lapdm_entity *le, void *ctx); #define LAPDM_ENT_F_EMPTY_FRAME 0x0001 #define LAPDM_ENT_F_POLLING_ONLY 0x0002 #define LAPDM_ENT_F_DROP_2ND_REJ 0x0004 +#define LAPDM_ENT_F_RTS 0x0008 /*! a LAPDm Entity */ struct lapdm_entity { diff --git a/src/gsm/lapdm.c b/src/gsm/lapdm.c index fb892d2d..1fc986d6 100644 --- a/src/gsm/lapdm.c +++ b/src/gsm/lapdm.c @@ -363,8 +363,8 @@ static int tx_ph_data_enqueue(struct lapdm_datalink *dl, struct msgb *msg, if (le->tx_pending || le->flags & LAPDM_ENT_F_POLLING_ONLY) { struct msgb *old_msg; - /* In 'Polling only' mode there can be only one message. */ - if (le->flags & LAPDM_ENT_F_POLLING_ONLY) { + /* In 'RTS' mode there can be only one message. */ + if (le->flags & LAPDM_ENT_F_RTS) { /* Overwrite existing message by removing it first. */ if ((old_msg = msgb_dequeue(&dl->dl.tx_queue))) { msgb_free(old_msg); @@ -424,8 +424,8 @@ static struct msgb *tx_dequeue_msgb(struct lapdm_datalink *dl, uint32_t fn) { struct msgb *msg; - /* Call RTS function of LAPD, to poll next frame. */ - if (dl->entity->flags & LAPDM_ENT_F_POLLING_ONLY) { + /* Call RTS function of LAPD, to queue next frame. */ + if (dl->entity->flags & LAPDM_ENT_F_RTS) { struct lapd_msg_ctx lctx; int rc; @@ -1635,7 +1635,7 @@ void lapdm_entity_set_flags(struct lapdm_entity *le, unsigned int flags) le->flags = flags; /* Set flags at LAPD. */ - if (le->flags & LAPDM_ENT_F_POLLING_ONLY) + if (le->flags & LAPDM_ENT_F_RTS) dl_flags |= LAPD_F_RTS; if (le->flags & LAPDM_ENT_F_DROP_2ND_REJ) dl_flags |= LAPD_F_DROP_2ND_REJ; |