From f33e1c13fa1b91d7c57b282043bbc58ab03cc0be Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Thu, 10 Sep 2020 21:32:53 +0200 Subject: gsm_a_rr: correct spare bits of Channel Description ETSI 44.018: 10.5.2.5: spare bits are 3+4 and not 5+6. The counting in the spec might be confusing, because bits start at 8 not at 1. --- epan/dissectors/packet-gsm_a_rr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epan/dissectors/packet-gsm_a_rr.c b/epan/dissectors/packet-gsm_a_rr.c index 4bef85e3e3..baacf548e5 100644 --- a/epan/dissectors/packet-gsm_a_rr.c +++ b/epan/dissectors/packet-gsm_a_rr.c @@ -2248,7 +2248,7 @@ de_rr_ch_dsc(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, guint32 /* single ARFCN */ arfcn = ((oct8 & 0x03) << 8) | tvb_get_guint8(tvb,curr_offset+1); - proto_tree_add_bits_item(subtree, hf_gsm_a_rr_spare, tvb, (curr_offset<<3)+2, 2, ENC_NA); + proto_tree_add_bits_item(subtree, hf_gsm_a_rr_spare, tvb, (curr_offset<<3)+4, 2, ENC_NA); proto_tree_add_uint(subtree, hf_gsm_a_rr_single_channel_arfcn, tvb, curr_offset, 2, arfcn); } @@ -2341,7 +2341,7 @@ de_rr_ch_dsc2(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, guint3 /* single ARFCN */ arfcn = ((oct8 & 0x03) << 8) | tvb_get_guint8(tvb,curr_offset+1); - proto_tree_add_bits_item(subtree, hf_gsm_a_rr_spare, tvb, (curr_offset<<3)+2, 2, ENC_NA); + proto_tree_add_bits_item(subtree, hf_gsm_a_rr_spare, tvb, (curr_offset<<3)+4, 2, ENC_NA); proto_tree_add_uint(subtree, hf_gsm_a_rr_single_channel_arfcn, tvb, curr_offset, 2, arfcn); } @@ -2381,7 +2381,7 @@ de_rr_ch_dsc3(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, guint3 /* single ARFCN */ arfcn = ((oct8 & 0x03) << 8) | tvb_get_guint8(tvb,curr_offset+1); - proto_tree_add_bits_item(subtree, hf_gsm_a_rr_spare, tvb, (curr_offset<<3)+2, 2, ENC_NA); + proto_tree_add_bits_item(subtree, hf_gsm_a_rr_spare, tvb, (curr_offset<<3)+4, 2, ENC_NA); proto_tree_add_uint(subtree, hf_gsm_a_rr_single_channel_arfcn, tvb, curr_offset, 2, arfcn); } -- cgit v1.2.3