summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-09-30 00:36:07 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2018-10-03 18:44:10 +0700
commite0fd31628480af13b3254d403ceb0e0309acbad3 (patch)
tree66f23de46dc4170a606b929c503f18ac3ed3a500
parentb3c78fa1f732f8158aa384b08138a35e3937d0dd (diff)
(WIP) mobile/gsm48_cc.c: ignore MNCC_FRAME_{RECV|DROP} messages
Using both MNCC_FRAME RECV/DROP messages, an external MNCC application could enable / disable forwarding of the traffic frames from L1 through MNCC-socket. Now it can be done by user from the VTY configuration (see 'io-target' of 'audio' section), so there is no need to control this from outside. Change-Id: I41a0c9bc44b3ca6784f4190931773637f9fab40c
-rw-r--r--src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h1
-rw-r--r--src/host/layer23/src/mobile/gsm48_cc.c12
-rw-r--r--src/host/layer23/src/mobile/gsm48_rr.c21
3 files changed, 4 insertions, 30 deletions
diff --git a/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h b/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h
index 6235bfd..b1fc41a 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h
+++ b/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h
@@ -210,6 +210,5 @@ int gsm48_rr_start_monitor(struct osmocom_ms *ms);
int gsm48_rr_stop_monitor(struct osmocom_ms *ms);
int gsm48_rr_alter_delay(struct osmocom_ms *ms);
int gsm48_rr_tx_voice(struct osmocom_ms *ms, struct msgb *msg);
-int gsm48_rr_audio_mode(struct osmocom_ms *ms, uint8_t mode);
#endif /* _GSM48_RR_H */
diff --git a/src/host/layer23/src/mobile/gsm48_cc.c b/src/host/layer23/src/mobile/gsm48_cc.c
index 29f1ba1..1d37ebe 100644
--- a/src/host/layer23/src/mobile/gsm48_cc.c
+++ b/src/host/layer23/src/mobile/gsm48_cc.c
@@ -1974,17 +1974,13 @@ int mncc_tx_to_cc(void *inst, int msg_type, void *arg)
case GSM_TCHH_FRAME:
case GSM_TCH_FRAME_AMR:
return gsm_send_voice_mncc(ms, arg);
+
+ /* Intentionally ignored messages */
case MNCC_LCHAN_MODIFY:
- return 0;
case MNCC_FRAME_RECV:
- ms->mncc_entity.ref = trans->callref;
- gsm48_rr_audio_mode(ms,
- AUDIO_TX_TRAFFIC_REQ | AUDIO_RX_TRAFFIC_IND);
- return 0;
case MNCC_FRAME_DROP:
- if (ms->mncc_entity.ref == trans->callref)
- ms->mncc_entity.ref = 0;
- gsm48_rr_audio_mode(ms, AUDIO_TX_MICROPHONE | AUDIO_RX_SPEAKER);
+ LOGP(DCC, LOGL_NOTICE, "Ignoring MNCC message %s\n",
+ get_mncc_name(msg_type));
return 0;
}
diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c
index bed1e47..18254c2 100644
--- a/src/host/layer23/src/mobile/gsm48_rr.c
+++ b/src/host/layer23/src/mobile/gsm48_rr.c
@@ -5683,24 +5683,3 @@ int gsm48_rr_tx_voice(struct osmocom_ms *ms, struct msgb *msg)
return l1ctl_tx_traffic_req(ms, msg, rr->cd_now.chan_nr, 0);
}
-
-int gsm48_rr_audio_mode(struct osmocom_ms *ms, uint8_t mode)
-{
- struct gsm48_rrlayer *rr = &ms->rrlayer;
- uint8_t ch_type, ch_subch, ch_ts;
-
- LOGP(DRR, LOGL_INFO, "setting audio mode to %d\n", mode);
-
- rr->audio_mode = mode;
-
- if (!rr->dm_est)
- return 0;
-
- rsl_dec_chan_nr(rr->cd_now.chan_nr, &ch_type, &ch_subch, &ch_ts);
- if (ch_type != RSL_CHAN_Bm_ACCHs
- && ch_type != RSL_CHAN_Lm_ACCHs)
- return 0;
-
- return l1ctl_tx_tch_mode_req(ms, rr->cd_now.mode, mode);
-}
-