aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2023-01-03 20:41:40 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2023-02-18 10:39:36 +0100
commitbbc4745799d980b34f523820d674ce55be719f6e (patch)
tree315d839c096202edc2c8e560ab4868c6f90578c9
parentAdd setting of Sa bits to misdn driver (diff)
downloadlibosmo-abis-bbc4745799d980b34f523820d674ce55be719f6e.tar.xz
libosmo-abis-bbc4745799d980b34f523820d674ce55be719f6e.zip
Use correct bit order of RAW channels at misdn driver
mISDN Kernel driver uses reversed bit order for RAW (transparent) channels. With this patch, the order is reversed. Now it uses the same bit order as RTP payload does. Also it uses same bit order as other drivers do, like dahdi and e1d. Change-Id: I77b899bceacdf5484ea9a841cad55775864b4c82
-rw-r--r--src/input/misdn.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/input/misdn.c b/src/input/misdn.c
index fc06857..9c3da98 100644
--- a/src/input/misdn.c
+++ b/src/input/misdn.c
@@ -514,6 +514,7 @@ static int handle_ts_raw_write(struct osmo_fd *bfd)
LOGPITS(e1i_ts, DLMIB, LOGL_DEBUG, "RAW CHAN TX: %s\n", osmo_hexdump(msg->data, msg->len));
+ osmo_revbytebits_buf(msg->data, msg->len);
hh = (struct mISDNhead *) msgb_push(msg, sizeof(*hh));
hh->prim = PH_DATA_REQ;
hh->id = 0;
@@ -560,6 +561,7 @@ static int handle_ts_raw_read(struct osmo_fd *bfd)
case PH_DATA_IND:
/* remove the Misdn Header */
msg->l2h = msgb_pull(msg, MISDN_HEADER_LEN);
+ osmo_revbytebits_buf(msg->data, msg->len);
LOGPITS(e1i_ts, DLMIB, LOGL_DEBUG, "RAW CHAN RX: %s\n",
osmo_hexdump(msgb_l2(msg), msgb_l2len(msg)));
return e1inp_rx_ts(e1i_ts, msg, 0, 0);