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.
diff --git a/openbsc/src/libbsc/arfcn_range_encode.c b/openbsc/src/libbsc/arfcn_range_encode.c
index 02a75a5..c52743e 100644
--- a/openbsc/src/libbsc/arfcn_range_encode.c
+++ b/openbsc/src/libbsc/arfcn_range_encode.c
@@ -210,10 +210,10 @@
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);