diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2018-10-02 02:26:53 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2018-11-21 11:03:10 +0700 |
commit | f8970b809cd03751c5444ec59d1bc2dd764fa985 (patch) | |
tree | 21f5e0ae14fc9b47ae967cdbc69fa840569445e1 /src/host | |
parent | 7f16bc070eb4649d536afb1de1c0594c91131709 (diff) |
layer23/ccch_scan: unwrap dump_bcch() as gsm48_rx_bcch()fixeria/l1ctl_sap
Change-Id: I382fbdb60513324164cd1147c36f3367bb6fb22c
Diffstat (limited to 'src/host')
-rw-r--r-- | src/host/layer23/src/misc/app_ccch_scan.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/src/host/layer23/src/misc/app_ccch_scan.c b/src/host/layer23/src/misc/app_ccch_scan.c index 88a2bef3..4c88ded0 100644 --- a/src/host/layer23/src/misc/app_ccch_scan.c +++ b/src/host/layer23/src/misc/app_ccch_scan.c @@ -130,11 +130,16 @@ static void handle_si3(struct osmocom_ms *ms, l1ctl_tx_ccch_mode_req(ms, app_state.ccch_mode); } -static void dump_bcch(struct osmocom_ms *ms, uint8_t tc, const uint8_t *data) +int gsm48_rx_bcch(struct msgb *msg, struct osmocom_ms *ms) { struct gsm48_system_information_type_header *si_hdr; - si_hdr = (struct gsm48_system_information_type_header *) data; - uint8_t si_type = si_hdr->system_information; + uint8_t si_type, tc = 0; + + /* FIXME: we have lost the gsm frame time until here, + * need to store it in some msgb context, so tc=0 */ + + si_hdr = (struct gsm48_system_information_type_header *) msg->l3h; + si_type = si_hdr->system_information; LOGP(DRR, LOGL_INFO, "BCCH message (type=0x%02x): %s\n", si_type, gsm48_rr_msg_name(si_type)); @@ -146,13 +151,15 @@ static void dump_bcch(struct osmocom_ms *ms, uint8_t tc, const uint8_t *data) switch (si_type) { case GSM48_MT_RR_SYSINFO_3: handle_si3(ms, - (struct gsm48_system_information_type_3 *) data); + (struct gsm48_system_information_type_3 *) si_hdr); break; default: /* We don't care about other types of SI */ break; /* thus there is nothing to do */ }; + + return 0; } @@ -446,16 +453,6 @@ int gsm48_rx_ccch(struct msgb *msg, struct osmocom_ms *ms) return rc; } -int gsm48_rx_bcch(struct msgb *msg, struct osmocom_ms *ms) -{ - /* FIXME: we have lost the gsm frame time until here, need to store it - * in some msgb context */ - //dump_bcch(dl->time.tc, ccch->data); - dump_bcch(ms, 0, msg->l3h); - - return 0; -} - void layer3_app_reset(void) { /* Reset state */ |