laforge has submitted this change. (
https://gerrit.osmocom.org/c/libosmo-abis/+/30447 )
Change subject: Add missing functions to send HDLC/RAW data
......................................................................
Add missing functions to send HDLC/RAW data
Change-Id: Iebcb99f491b945d364b1044a59638524637dd8b2
---
M include/osmocom/abis/e1_input.h
M src/e1_input.c
2 files changed, 33 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h
index 2c8f4d8..8e7f20b 100644
--- a/include/osmocom/abis/e1_input.h
+++ b/include/osmocom/abis/e1_input.h
@@ -365,4 +365,7 @@
int abis_sendmsg(struct msgb *msg);
int abis_rsl_sendmsg(struct msgb *msg);
+int e1inp_ts_send_raw(struct e1inp_ts *ts, struct msgb *msg);
+int e1inp_ts_send_hdlc(struct e1inp_ts *ts, struct msgb *msg);
+
#endif /* _E1_INPUT_H */
diff --git a/src/e1_input.c b/src/e1_input.c
index 02f3b30..6c82d08 100644
--- a/src/e1_input.c
+++ b/src/e1_input.c
@@ -331,6 +331,36 @@
return abis_sendmsg(msg);
}
+int e1inp_ts_send_raw(struct e1inp_ts *ts, struct msgb *msg)
+{
+ struct e1inp_driver *driver;
+
+ OSMO_ASSERT(ts->type == E1INP_TS_TYPE_RAW);
+
+ /* notify the driver we have something to write */
+ driver = ts->line->driver;
+ driver->want_write(ts);
+
+ msgb_enqueue(&ts->raw.tx_queue, msg);
+
+ return 0;
+}
+
+int e1inp_ts_send_hdlc(struct e1inp_ts *ts, struct msgb *msg)
+{
+ struct e1inp_driver *driver;
+
+ OSMO_ASSERT(ts->type == E1INP_TS_TYPE_HDLC);
+
+ /* notify the driver we have something to write */
+ driver = ts->line->driver;
+ driver->want_write(ts);
+
+ msgb_enqueue(&ts->hdlc.tx_queue, msg);
+
+ return 0;
+}
+
/* Timeslot */
int e1inp_ts_config_trau(struct e1inp_ts *ts, struct e1inp_line *line,
int (*trau_rcv_cb)(struct subch_demux *dmx, int ch,
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-abis/+/30447
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Iebcb99f491b945d364b1044a59638524637dd8b2
Gerrit-Change-Number: 30447
Gerrit-PatchSet: 2
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged