From 8e8889032e210f4cd4128cde023b3dc0768beff0 Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Thu, 5 Nov 2020 18:42:55 +0100 Subject: [PATCH] Changed CRC input vector to constant --- lib/include/srslte/phy/fec/crc.h | 2 +- lib/src/phy/fec/crc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/include/srslte/phy/fec/crc.h b/lib/include/srslte/phy/fec/crc.h index f79bbd2b2..4d117b942 100644 --- a/lib/include/srslte/phy/fec/crc.h +++ b/lib/include/srslte/phy/fec/crc.h @@ -69,7 +69,7 @@ static inline uint64_t srslte_crc_checksum_get(srslte_crc_t* h) return (h->crcinit & h->crcmask); } -SRSLTE_API uint32_t srslte_crc_checksum_byte(srslte_crc_t* h, uint8_t* data, int len); +SRSLTE_API uint32_t srslte_crc_checksum_byte(srslte_crc_t* h, const uint8_t* data, int len); SRSLTE_API uint32_t srslte_crc_checksum(srslte_crc_t* h, uint8_t* data, int len); diff --git a/lib/src/phy/fec/crc.c b/lib/src/phy/fec/crc.c index a6d0a6018..5c1e2a632 100644 --- a/lib/src/phy/fec/crc.c +++ b/lib/src/phy/fec/crc.c @@ -140,7 +140,7 @@ uint32_t srslte_crc_checksum(srslte_crc_t* h, uint8_t* data, int len) } // len is multiple of 8 -uint32_t srslte_crc_checksum_byte(srslte_crc_t* h, uint8_t* data, int len) +uint32_t srslte_crc_checksum_byte(srslte_crc_t* h, const uint8_t* data, int len) { int i; uint32_t crc = 0;