Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/11479


Change subject: layer23/ccch_scan: unwrap dump_bcch() as gsm48_rx_bcch()
......................................................................

layer23/ccch_scan: unwrap dump_bcch() as gsm48_rx_bcch()

Change-Id: I382fbdb60513324164cd1147c36f3367bb6fb22c
---
M src/host/layer23/src/misc/app_ccch_scan.c
1 file changed, 11 insertions(+), 14 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/79/11479/1

diff --git a/src/host/layer23/src/misc/app_ccch_scan.c 
b/src/host/layer23/src/misc/app_ccch_scan.c
index 88a2bef..4c88ded 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 @@
        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 @@
        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 @@
        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 */

--
To view, visit https://gerrit.osmocom.org/11479
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I382fbdb60513324164cd1147c36f3367bb6fb22c
Gerrit-Change-Number: 11479
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilira...@gmail.com>

Reply via email to