aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2014-01-13 14:21:23 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-01-13 15:15:11 +0100
commit85bc549ea5e279c08a4080a277894fe80f0e967e (patch)
treef1d555475796acd176bdbfaa56685735dc4f4532
parent26cbd459fcc7cd7bed8256a5ad078c177a7a7fe2 (diff)
gsm/gsm48ie: Fix range 256 W[i] decoding0.6.5
Currently w[14]/w[15] and w[18]/w[19] are swapped in range 256 format decoding in gsm48_decode_freq_list(). This patch fixes this. Sponsored-by: On-Waves ehf
-rw-r--r--src/gsm/gsm48_ie.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gsm/gsm48_ie.c b/src/gsm/gsm48_ie.c
index 78619b9..2cc0645 100644
--- a/src/gsm/gsm48_ie.c
+++ b/src/gsm/gsm48_ie.c
@@ -985,17 +985,17 @@ int gsm48_decode_freq_list(struct gsm_sysinfo_freq *f, uint8_t *cd,
if (len >= 12)
w[13] = r->w13;
if (len >= 13)
- w[14] = r->w15;
+ w[14] = (r->w14_hi << 2) | r->w14_lo;
if (len >= 13)
- w[15] = (r->w14_hi << 2) | r->w14_lo;
+ w[15] = r->w15;
if (len >= 14)
w[16] = (r->w16_hi << 3) | r->w16_lo;
if (len >= 14)
w[17] = r->w17;
if (len >= 15)
- w[18] = r->w19;
+ w[18] = (r->w18_hi << 3) | r->w18_lo;
if (len >= 15)
- w[19] = (r->w18_hi << 3) | r->w18_lo;
+ w[19] = r->w19;
if (len >= 16)
w[20] = (r->w20_hi << 3) | r->w20_lo;
if (len >= 16)