summaryrefslogtreecommitdiffstats
path: root/src/coding
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-06-12 15:05:21 +0200
committerHarald Welte <laforge@gnumonks.org>2017-06-12 15:35:27 +0200
commit2f984ea1943d3efa01c069b29b330f84f8a6a665 (patch)
treee0575bb516f6ddba8bcb1f15c863adf72c7d8695 /src/coding
parent0eb2c5dab2f9ed61c86cafe96363cee1936ae552 (diff)
gsm0503_coding: Mark gsm0503_mcs_{ul,dl}_codes as const
The table describing the various MCS convolutional codes are constant data and should be marked as such. Change-Id: I4918521ee4572a67cbee5f9b49257fc5bfcde511
Diffstat (limited to 'src/coding')
-rw-r--r--src/coding/gsm0503_coding.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c
index bf4df1c3..70398632 100644
--- a/src/coding/gsm0503_coding.c
+++ b/src/coding/gsm0503_coding.c
@@ -186,7 +186,7 @@ struct gsm0503_mcs_code {
/*
* EGPRS UL coding parameters
*/
-struct gsm0503_mcs_code gsm0503_mcs_ul_codes[EGPRS_NUM_MCS] = {
+const struct gsm0503_mcs_code gsm0503_mcs_ul_codes[EGPRS_NUM_MCS] = {
{
.mcs = EGPRS_MCS0,
},
@@ -357,7 +357,7 @@ struct gsm0503_mcs_code gsm0503_mcs_ul_codes[EGPRS_NUM_MCS] = {
/*
* EGPRS DL coding parameters
*/
-struct gsm0503_mcs_code gsm0503_mcs_dl_codes[EGPRS_NUM_MCS] = {
+const struct gsm0503_mcs_code gsm0503_mcs_dl_codes[EGPRS_NUM_MCS] = {
{
.mcs = EGPRS_MCS0,
},
@@ -743,7 +743,7 @@ static int _egprs_decode_hdr(const sbit_t *hc, int mcs,
sbit_t C[EGPRS_HDR_C_MAX];
ubit_t upp[EGPRS_HDR_UPP_MAX];
int i, j, rc;
- struct gsm0503_mcs_code *code;
+ const struct gsm0503_mcs_code *code;
code = &gsm0503_mcs_ul_codes[mcs];
@@ -858,7 +858,7 @@ static int egprs_decode_data(uint8_t *l2_data, const sbit_t *c,
sbit_t C[EGPRS_DATA_C_MAX];
int i, j, rc, data_len;
- struct gsm0503_mcs_code *code;
+ const struct gsm0503_mcs_code *code;
if (blk && mcs < EGPRS_MCS7) {
/* Invalid MCS-X block state */
@@ -1206,7 +1206,7 @@ static int egprs_encode_hdr(ubit_t *hc, const uint8_t *l2_data, int mcs)
{
int i, j;
ubit_t upp[EGPRS_HDR_UPP_MAX], C[EGPRS_HDR_C_MAX];
- struct gsm0503_mcs_code *code;
+ const struct gsm0503_mcs_code *code;
code = &gsm0503_mcs_dl_codes[mcs];
@@ -1241,7 +1241,7 @@ static int egprs_encode_data(ubit_t *c, const uint8_t *l2_data,
{
int i, j, data_len;
ubit_t u[EGPRS_DATA_U_MAX], C[EGPRS_DATA_C_MAX];
- struct gsm0503_mcs_code *code;
+ const struct gsm0503_mcs_code *code;
code = &gsm0503_mcs_dl_codes[mcs];