Move lapv5 to src/

This commit is contained in:
Andreas Eversberg 2022-12-16 18:17:25 +01:00
parent 0876200431
commit 7f47013981
2 changed files with 9 additions and 9 deletions

View File

@ -22,11 +22,6 @@
*
*/
#include "v5x_internal.h"
#include "v5x_protocol.h"
#include "logging.h"
#include "lapv5.h"
#include <stdio.h>
#include <string.h>
#include <errno.h>
@ -38,6 +33,11 @@
#include <osmocom/abis/lapd.h>
#include <osmocom/abis/lapd_pcap.h>
#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);