laforge submitted this change.
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(-)
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,
To view, visit change 30447. To unsubscribe, or for help writing mail filters, visit settings.