aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc/arfcn_range_encode.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-12-12 17:00:57 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-12-12 17:00:57 +0100
commit27a788ddb95b6bf4e2f343eed1070f6116515e99 (patch)
treed713195306611a4fc591d2d6af455580e60ed0a8 /openbsc/src/libbsc/arfcn_range_encode.c
parente18209c975a3f5efcf40178845d1865f0afc67fe (diff)
si: Make sure to not overwrite orig_arfcn_hi in the range encoding
Andreas highlighted that the doubel assignment is not needed and wrong. Change the code to assign chan_list[0] before writing the base frequency to the header. Update the testcase to make the highest bit set and update the test result.
Diffstat (limited to 'openbsc/src/libbsc/arfcn_range_encode.c')
-rw-r--r--openbsc/src/libbsc/arfcn_range_encode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/libbsc/arfcn_range_encode.c b/openbsc/src/libbsc/arfcn_range_encode.c
index 02a75a53c..c52743e0d 100644
--- a/openbsc/src/libbsc/arfcn_range_encode.c
+++ b/openbsc/src/libbsc/arfcn_range_encode.c
@@ -210,10 +210,10 @@ int range_enc_range256(uint8_t *chan_list, int f0, int *w)
int range_enc_range512(uint8_t *chan_list, int f0, int *w)
{
struct gsm48_range_512 *range512;
+ chan_list[0] = 0x88;
write_orig_arfcn(chan_list, f0);
range512 = (struct gsm48_range_512 *) &chan_list[0];
- range512->form_id = chan_list[0] = 0x44;
/* W(1) */
range512->w1_hi = HIGH_BITS(w, 1, 9, 7);