fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/35580?usp=email )
Change subject: mobile: rename tch_send_voice_{msg,frame}() functions ......................................................................
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(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/80/35580/1
diff --git a/src/host/layer23/include/osmocom/bb/mobile/tch.h b/src/host/layer23/include/osmocom/bb/mobile/tch.h index 0a523c0..d2cb4bc 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 0c7c2e2..db232e6 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 485426b..a09c9fa 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 67195c1..7276153 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: @@ -126,14 +126,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; @@ -162,7 +162,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)