From 7f47013981e5d917b2e048ae593673f64b9cfe97 Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Fri, 16 Dec 2022 18:17:25 +0100 Subject: [PATCH] Move lapv5 to src/ --- lapv5.c => src/lapv5.c | 18 +++++++++--------- lapv5.h => src/lapv5.h | 0 2 files changed, 9 insertions(+), 9 deletions(-) rename lapv5.c => src/lapv5.c (99%) rename lapv5.h => src/lapv5.h (100%) diff --git a/lapv5.c b/src/lapv5.c similarity index 99% rename from lapv5.c rename to src/lapv5.c index 8925c9f..e95ff6b 100644 --- a/lapv5.c +++ b/src/lapv5.c @@ -22,11 +22,6 @@ * */ -#include "v5x_internal.h" -#include "v5x_protocol.h" -#include "logging.h" -#include "lapv5.h" - #include #include #include @@ -38,6 +33,11 @@ #include #include +#include "v5x_internal.h" +#include "v5x_protocol.h" +#include "lapv5.h" +#include "logging.h" + #define LAPD_ADDR1(sapi, cr) ((((sapi) & 0x3f) << 2) | (((cr) & 0x1) << 1)) #define LAPD_ADDR2(tei) ((((tei) & 0x7f) << 1) | 0x1) @@ -486,7 +486,7 @@ int lapv5ef_rx(struct v5x_link *link, struct msgb *msg) efaddr_enc = msg->l2h[0] << 8 | msg->l2h[1]; msg->l2h += 2; msgb_pull(msg, msg->l2h - msg->data); - efaddr = v51_l3_addr_dec(efaddr_enc, &is_isdn); + efaddr = v5x_l3_addr_dec(efaddr_enc, &is_isdn); if (!is_isdn) { @@ -496,12 +496,12 @@ int lapv5ef_rx(struct v5x_link *link, struct msgb *msg) } switch (efaddr) { - case V51_DLADDR_PSTN: + case V5X_DLADDR_PSTN: /* hand-over to LAPD-DL instance for PSTN */ li = link->interface->pstn.li; /* TODO */ break; - case V51_DLADDR_CTRL: + case V5X_DLADDR_CTRL: /* hand-over to LAPD-DL instance for CTRL */ /* TODO */ li = link->interface->control.li; @@ -559,7 +559,7 @@ int lapv5ef_tx(struct v5x_user_port *v5up, struct msgb *msg) /* relay function for LAPD of user ports */ LOGP(DV5EF, LOGL_DEBUG, "Sending frame for EFaddr %d: %s\n", efaddr, osmo_hexdump(msg->data, msg->len)); msg->l2h = msgb_push(msg, 2); - efaddr_enc = v51_l3_addr_enc(efaddr, 1); + efaddr_enc = v5x_l3_addr_enc(efaddr, 1); msg->l2h[0] = efaddr_enc >> 8; msg->l2h[1] = efaddr_enc; ph_data_req_hack(msg, NULL); diff --git a/lapv5.h b/src/lapv5.h similarity index 100% rename from lapv5.h rename to src/lapv5.h