llc: gprs_llc_fcs(): make the input data pointer const
Change-Id: If95210fe69f915ab1010fe5916cb6bee3faeb7b9
This commit is contained in:
parent
d32852664d
commit
13ccbc1e61
|
@ -5,6 +5,6 @@
|
|||
|
||||
#define INIT_CRC24 0xffffff
|
||||
|
||||
uint32_t crc24_calc(uint32_t fcs, uint8_t *cp, unsigned int len);
|
||||
uint32_t crc24_calc(uint32_t fcs, const uint8_t *cp, unsigned int len);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -277,7 +277,7 @@ void gprs_llme_copy_key(struct sgsn_mm_ctx *mm, struct gprs_llc_llme *llme);
|
|||
int gprs_llc_hdr_parse(struct gprs_llc_hdr_parsed *ghp,
|
||||
uint8_t *llc_hdr, int len);
|
||||
void gprs_llc_hdr_dump(struct gprs_llc_hdr_parsed *gph, struct gprs_llc_lle *lle);
|
||||
int gprs_llc_fcs(uint8_t *data, unsigned int len);
|
||||
int gprs_llc_fcs(const uint8_t *data, unsigned int len);
|
||||
|
||||
|
||||
/* LLME handling routines */
|
||||
|
|
|
@ -59,7 +59,7 @@ static const uint32_t tbl_crc24[256] = {
|
|||
|
||||
#define INIT_CRC24 0xffffff
|
||||
|
||||
uint32_t crc24_calc(uint32_t fcs, uint8_t *cp, unsigned int len)
|
||||
uint32_t crc24_calc(uint32_t fcs, const uint8_t *cp, unsigned int len)
|
||||
{
|
||||
while (len--)
|
||||
fcs = (fcs >> 8) ^ tbl_crc24[(fcs ^ *cp++) & 0xff];
|
||||
|
|
|
@ -55,7 +55,7 @@ static const struct value_string llc_cmd_strs[] = {
|
|||
#define N202 4
|
||||
#define CRC24_LENGTH 3
|
||||
|
||||
int gprs_llc_fcs(uint8_t *data, unsigned int len)
|
||||
int gprs_llc_fcs(const uint8_t *data, unsigned int len)
|
||||
{
|
||||
uint32_t fcs_calc;
|
||||
|
||||
|
|
Loading…
Reference in New Issue