fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/30254 )


Change subject: trxcon: make burst pointer in trxcon_phyif_burst_ind const
......................................................................

trxcon: make burst pointer in trxcon_phyif_burst_ind const

Change-Id: I68773d247725a6dc2cbbc58b63c0fd19ffdb1a16
Related: OS#5599
---
M src/host/trxcon/include/osmocom/bb/trxcon/phyif.h
M src/host/trxcon/src/trx_if.c
2 files changed, 5 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/54/30254/1

diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h 
b/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h
index 15a1b70..ac23ac6 100644
--- a/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h
+++ b/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h
@@ -90,7 +90,7 @@
        uint8_t tn;
        int16_t toa256;
        int8_t rssi;
-       sbit_t *burst;
+       const sbit_t *burst;
        unsigned int burst_len;
 };

diff --git a/src/host/trxcon/src/trx_if.c b/src/host/trxcon/src/trx_if.c
index 388d82b..e58a8eb 100644
--- a/src/host/trxcon/src/trx_if.c
+++ b/src/host/trxcon/src/trx_if.c
@@ -649,16 +649,17 @@
                .fn = osmo_load32be(buf + 1),
                .rssi = -(int8_t) buf[5],
                .toa256 = (int16_t) (buf[6] << 8) | buf[7],
-               .burst = (sbit_t *)&buf[8],
+               .burst = (const sbit_t *)&buf[8],
                .burst_len = 148,
        };

        /* Copy and convert bits {254..0} to sbits {-127..127} */
        for (unsigned int i = 0; i < bi.burst_len; i++) {
+               sbit_t *burst = (sbit_t *)&buf[8];
                if (buf[8 + i] == 255)
-                       bi.burst[i] = -127;
+                       burst[i] = -127;
                else
-                       bi.burst[i] = 127 - buf[8 + i];
+                       burst[i] = 127 - buf[8 + i];
        }

        if (bi.tn >= 8) {

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I68773d247725a6dc2cbbc58b63c0fd19ffdb1a16
Gerrit-Change-Number: 30254
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>
Gerrit-MessageType: newchange

Reply via email to