MAC-NR: Fix a couple of issues with configuring RLC bearers from RRC.
Need to make sure to read UM/AM direction before reading SN-length. Also fix a backward test while looking up stored SNLength. Change-Id: I4dbb701efe80c78fee5e1af9e405b2cf883f7401 Reviewed-on: https://code.wireshark.org/review/33129 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Pascal Quantin <pascal@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
This commit is contained in:
parent
348e0de9d3
commit
81e9417b76
|
@ -885,26 +885,24 @@ EUTRA-NS-PmaxValue/additionalPmax DISPLAY=BASE_DEC|BASE_UNIT_STRING STRINGS=&uni
|
|||
|
||||
|
||||
#.FN_BODY UL-UM-RLC
|
||||
%(DEFAULT_BODY)s
|
||||
nr_drb_mapping_t *mapping = &nr_rrc_get_private_data(actx)->drb_mapping;
|
||||
mapping->tempDirection = DIRECTION_UPLINK;
|
||||
%(DEFAULT_BODY)s
|
||||
|
||||
#.FN_BODY DL-UM-RLC
|
||||
%(DEFAULT_BODY)s
|
||||
nr_drb_mapping_t *mapping = &nr_rrc_get_private_data(actx)->drb_mapping;
|
||||
mapping->rlcMode_present = TRUE;
|
||||
mapping->rlcMode = RLC_UM_MODE;
|
||||
mapping->tempDirection = DIRECTION_DOWNLINK;
|
||||
%(DEFAULT_BODY)s
|
||||
|
||||
#.FN_BODY UL-AM-RLC
|
||||
%(DEFAULT_BODY)s
|
||||
nr_drb_mapping_t *mapping = &nr_rrc_get_private_data(actx)->drb_mapping;
|
||||
mapping->tempDirection = DIRECTION_UPLINK;
|
||||
%(DEFAULT_BODY)s
|
||||
|
||||
#.FN_BODY DL-AM-RLC
|
||||
%(DEFAULT_BODY)s
|
||||
nr_drb_mapping_t *mapping = &nr_rrc_get_private_data(actx)->drb_mapping;
|
||||
mapping->tempDirection = DIRECTION_DOWNLINK;
|
||||
%(DEFAULT_BODY)s
|
||||
|
||||
|
||||
#.FN_BODY SN-FieldLengthUM VAL_PTR=&value
|
||||
|
@ -921,6 +919,7 @@ EUTRA-NS-PmaxValue/additionalPmax DISPLAY=BASE_DEC|BASE_UNIT_STRING STRINGS=&uni
|
|||
}
|
||||
|
||||
|
||||
|
||||
#.FN_BODY SN-FieldLengthAM VAL_PTR=&value
|
||||
guint32 value;
|
||||
%(DEFAULT_BODY)s
|
||||
|
@ -932,7 +931,9 @@ EUTRA-NS-PmaxValue/additionalPmax DISPLAY=BASE_DEC|BASE_UNIT_STRING STRINGS=&uni
|
|||
else {
|
||||
mapping->rlcDlSnLength_present = TRUE;
|
||||
mapping->rlcDlSnLength = (value=0) ? 12 : 18;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#.FN_BODY DRB-ToAddMod
|
||||
|
|
|
@ -1470,7 +1470,7 @@ static gboolean lookup_rlc_bearer_from_lcid(guint16 ueid,
|
|||
}
|
||||
|
||||
/* Found, set out params */
|
||||
*rlc_bearer_type = (direction == DIRECTION_DOWNLINK) ?
|
||||
*rlc_bearer_type = (direction == DIRECTION_UPLINK) ?
|
||||
ue_mappings->mapping[lcid].bearer_type_ul :
|
||||
ue_mappings->mapping[lcid].bearer_type_dl;
|
||||
*seqnum_length = get_rlc_seqnum_length(*rlc_bearer_type);
|
||||
|
@ -2686,6 +2686,7 @@ static void* lcid_drb_mapping_copy_cb(void* dest, const void* orig, size_t len _
|
|||
|
||||
static void set_bearer_type(dynamic_lcid_drb_mapping_t *mapping, guint8 rlcMode, guint8 rlcSnLength, guint8 direction)
|
||||
{
|
||||
/* Point to field for appropriate direction */
|
||||
rlc_bearer_type_t *type_var = (direction == DIRECTION_UPLINK) ?
|
||||
&mapping->bearer_type_ul :
|
||||
&mapping->bearer_type_dl;
|
||||
|
|
|
@ -26456,7 +26456,9 @@ dissect_nr_rrc_SN_FieldLengthAM(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *a
|
|||
else {
|
||||
mapping->rlcDlSnLength_present = TRUE;
|
||||
mapping->rlcDlSnLength = (value=0) ? 12 : 18;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -26705,11 +26707,11 @@ static const per_sequence_t UL_AM_RLC_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_nr_rrc_UL_AM_RLC(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
nr_drb_mapping_t *mapping = &nr_rrc_get_private_data(actx)->drb_mapping;
|
||||
mapping->tempDirection = DIRECTION_UPLINK;
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_nr_rrc_UL_AM_RLC, UL_AM_RLC_sequence);
|
||||
|
||||
nr_drb_mapping_t *mapping = &nr_rrc_get_private_data(actx)->drb_mapping;
|
||||
mapping->tempDirection = DIRECTION_UPLINK;
|
||||
|
||||
|
||||
return offset;
|
||||
|
@ -26853,11 +26855,11 @@ static const per_sequence_t DL_AM_RLC_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_nr_rrc_DL_AM_RLC(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
nr_drb_mapping_t *mapping = &nr_rrc_get_private_data(actx)->drb_mapping;
|
||||
mapping->tempDirection = DIRECTION_DOWNLINK;
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_nr_rrc_DL_AM_RLC, DL_AM_RLC_sequence);
|
||||
|
||||
nr_drb_mapping_t *mapping = &nr_rrc_get_private_data(actx)->drb_mapping;
|
||||
mapping->tempDirection = DIRECTION_DOWNLINK;
|
||||
|
||||
|
||||
|
||||
|
@ -26905,6 +26907,7 @@ dissect_nr_rrc_SN_FieldLengthUM(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *a
|
|||
|
||||
|
||||
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
@ -26916,11 +26919,11 @@ static const per_sequence_t UL_UM_RLC_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_nr_rrc_UL_UM_RLC(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
nr_drb_mapping_t *mapping = &nr_rrc_get_private_data(actx)->drb_mapping;
|
||||
mapping->tempDirection = DIRECTION_UPLINK;
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_nr_rrc_UL_UM_RLC, UL_UM_RLC_sequence);
|
||||
|
||||
nr_drb_mapping_t *mapping = &nr_rrc_get_private_data(actx)->drb_mapping;
|
||||
mapping->tempDirection = DIRECTION_UPLINK;
|
||||
|
||||
|
||||
return offset;
|
||||
|
@ -26935,13 +26938,11 @@ static const per_sequence_t DL_UM_RLC_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_nr_rrc_DL_UM_RLC(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
nr_drb_mapping_t *mapping = &nr_rrc_get_private_data(actx)->drb_mapping;
|
||||
mapping->tempDirection = DIRECTION_DOWNLINK;
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_nr_rrc_DL_UM_RLC, DL_UM_RLC_sequence);
|
||||
|
||||
nr_drb_mapping_t *mapping = &nr_rrc_get_private_data(actx)->drb_mapping;
|
||||
mapping->rlcMode_present = TRUE;
|
||||
mapping->rlcMode = RLC_UM_MODE;
|
||||
mapping->tempDirection = DIRECTION_DOWNLINK;
|
||||
|
||||
|
||||
return offset;
|
||||
|
|
Loading…
Reference in New Issue