fixeria submitted this change.
mobile: rename tch_send_voice_{msg,frame}() functions
These functions can also be used for sending data frames (CSD).
Change-Id: Ib55b4405847f2efb583f3a379ff4b6929d6d6c5b
Related: OS#4396
---
M src/host/layer23/include/osmocom/bb/mobile/tch.h
M src/host/layer23/src/mobile/gapk_io.c
M src/host/layer23/src/mobile/gsm48_cc.c
M src/host/layer23/src/mobile/tch.c
4 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/src/host/layer23/include/osmocom/bb/mobile/tch.h b/src/host/layer23/include/osmocom/bb/mobile/tch.h
index e796ddb..b99b834 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/tch.h
+++ b/src/host/layer23/include/osmocom/bb/mobile/tch.h
@@ -19,5 +19,5 @@
int tch_init(struct osmocom_ms *ms);
int tch_serve_ms(struct osmocom_ms *ms);
-int tch_send_voice_msg(struct osmocom_ms *ms, struct msgb *msg);
-int tch_send_voice_frame(struct osmocom_ms *ms, const struct gsm_data_frame *frame);
+int tch_send_msg(struct osmocom_ms *ms, struct msgb *msg);
+int tch_send_mncc_frame(struct osmocom_ms *ms, const struct gsm_data_frame *frame);
diff --git a/src/host/layer23/src/mobile/gapk_io.c b/src/host/layer23/src/mobile/gapk_io.c
index 3dab46d..4699bae 100644
--- a/src/host/layer23/src/mobile/gapk_io.c
+++ b/src/host/layer23/src/mobile/gapk_io.c
@@ -550,7 +550,7 @@
&state->tch_ul_fb_len);
/* Push a voice frame to the lower layers */
- tch_send_voice_msg(ms, tch_msg);
+ tch_send_msg(ms, tch_msg);
work |= 1;
}
diff --git a/src/host/layer23/src/mobile/gsm48_cc.c b/src/host/layer23/src/mobile/gsm48_cc.c
index c253cb6..94b81cb 100644
--- a/src/host/layer23/src/mobile/gsm48_cc.c
+++ b/src/host/layer23/src/mobile/gsm48_cc.c
@@ -2045,7 +2045,7 @@
case GSM_TCHH_FRAME:
case GSM_TCH_FRAME_AMR:
case GSM_BAD_FRAME:
- return tch_send_voice_frame(ms, arg);
+ return tch_send_mncc_frame(ms, arg);
case MNCC_LCHAN_MODIFY:
return 0;
case MNCC_FRAME_RECV:
diff --git a/src/host/layer23/src/mobile/tch.c b/src/host/layer23/src/mobile/tch.c
index 0b9142e..adeaad5 100644
--- a/src/host/layer23/src/mobile/tch.c
+++ b/src/host/layer23/src/mobile/tch.c
@@ -86,7 +86,7 @@
/* Remove the DL info header */
msgb_pull_to_l2(msg);
/* Send voice frame back */
- return tch_send_voice_msg(ms, msg);
+ return tch_send_msg(ms, msg);
case TCH_VOICE_IOH_MNCC_SOCK:
return tch_forward_mncc(ms, msg);
case TCH_VOICE_IOH_GAPK:
@@ -127,14 +127,14 @@
}
/* Send an Uplink voice frame to the lower layers */
-int tch_send_voice_msg(struct osmocom_ms *ms, struct msgb *msg)
+int tch_send_msg(struct osmocom_ms *ms, struct msgb *msg)
{
/* Forward to RR */
return gsm48_rr_tx_traffic(ms, msg);
}
-/* tch_send_voice_msg() wrapper accepting an MNCC structure */
-int tch_send_voice_frame(struct osmocom_ms *ms, const struct gsm_data_frame *frame)
+/* tch_send_msg() wrapper accepting an MNCC structure */
+int tch_send_mncc_frame(struct osmocom_ms *ms, const struct gsm_data_frame *frame)
{
struct msgb *nmsg;
int len;
@@ -163,7 +163,7 @@
nmsg->l2h = msgb_put(nmsg, len);
memcpy(nmsg->l2h, frame->data, len);
- return tch_send_voice_msg(ms, nmsg);
+ return tch_send_msg(ms, nmsg);
}
int tch_serve_ms(struct osmocom_ms *ms)
To view, visit change 35580. To unsubscribe, or for help writing mail filters, visit settings.