Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zzha zzha
OpenXG-RAN
Commits
319ae6fb
Commit
319ae6fb
authored
Nov 18, 2016
by
calvin wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bsr report inaccurate value
parent
3bd591bf
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
109 additions
and
73 deletions
+109
-73
openair2/LAYER2/MAC/config.c
openair2/LAYER2/MAC/config.c
+31
-22
openair2/LAYER2/MAC/defs.h
openair2/LAYER2/MAC/defs.h
+6
-2
openair2/LAYER2/MAC/proto.h
openair2/LAYER2/MAC/proto.h
+3
-3
openair2/LAYER2/MAC/ue_procedures.c
openair2/LAYER2/MAC/ue_procedures.c
+69
-46
No files found.
openair2/LAYER2/MAC/config.c
View file @
319ae6fb
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*! \file config.c
* \brief UE and eNB configuration performed by RRC or as a consequence of RRC procedures
* \author Navid Nikaein and Raymond Knopp
...
...
@@ -73,6 +80,7 @@ void ue_mac_reset(module_id_t module_idP,uint8_t eNB_index)
UE_mac_inst
[
module_idP
].
BSR_reporting_active
[
PADDING_BSR
]
=
0
;
UE_mac_inst
[
module_idP
].
BSR_reporting_active
[
PERIODIC_BSR
]
=
0
;
UE_mac_inst
[
module_idP
].
retxBSRTimer_expires_flag
=
0
;
UE_mac_inst
[
module_idP
].
periodBSRTimer_expires_flag
=
0
;
// stop ongoing RACH procedure
// discard explicitly signaled ra_PreambleIndex and ra_RACH_MaskIndex, if any
...
...
@@ -247,12 +255,13 @@ rrc_mac_config_req(
UE_mac_inst
[
Mod_idP
].
scheduling_info
.
extendedPHR_r10
=
(
uint16_t
)
0
;
}
#endif
UE_mac_inst
[
Mod_idP
].
scheduling_info
.
periodicBSR_SF
=
0xFFFF
;
UE_mac_inst
[
Mod_idP
].
scheduling_info
.
retxBSR_SF
=
0xFFFF
;
UE_mac_inst
[
Mod_idP
].
scheduling_info
.
periodicBSR_SF
=
MAC_UE_BSR_TIMER_NOT_RUNNING
;
UE_mac_inst
[
Mod_idP
].
scheduling_info
.
retxBSR_SF
=
MAC_UE_BSR_TIMER_NOT_RUNNING
;
UE_mac_inst
[
Mod_idP
].
BSR_reporting_active
[
REGULAR_BSR
]
=
0
;
UE_mac_inst
[
Mod_idP
].
BSR_reporting_active
[
PADDING_BSR
]
=
0
;
UE_mac_inst
[
Mod_idP
].
BSR_reporting_active
[
PERIODIC_BSR
]
=
0
;
UE_mac_inst
[
Mod_idP
].
retxBSRTimer_expires_flag
=
0
;
UE_mac_inst
[
Mod_idP
].
periodBSRTimer_expires_flag
=
0
;
LOG_D
(
MAC
,
"[UE %d]: periodic BSR %d (SF), retx BSR %d (SF)
\n
"
,
Mod_idP
,
...
...
openair2/LAYER2/MAC/defs.h
View file @
319ae6fb
...
...
@@ -133,6 +133,8 @@
/*!\brief maximum value for channel quality indicator */
#define MAX_CQI_VALUE 15
//if value equal oxFFFF means counters are NOT active
#define MAC_UE_BSR_TIMER_NOT_RUNNING (0xFFFF)
#define LCID_EMPTY 0
#define LCID_NOT_EMPTY 1
...
...
@@ -226,7 +228,6 @@ typedef struct {
uint32_t
Buffer_size2
:
6
;
uint32_t
Buffer_size1
:
6
;
uint32_t
Buffer_size0
:
6
;
uint32_t
padding
:
8
;
}
__attribute__
((
__packed__
))
BSR_LONG
;
#define BSR_LONG_SIZE (sizeof(BSR_LONG))
...
...
@@ -345,6 +346,7 @@ typedef enum {
PERIODIC_BSR
}
UE_FIRST_LEVEL_BSR_TYPE
;
/*! \brief Downlink SCH PDU Structure */
typedef
struct
{
int8_t
payload
[
8
][
SCH_PAYLOAD_SIZE_MAX
];
...
...
@@ -1096,7 +1098,9 @@ typedef struct {
uint8_t
BSR_reporting_active
[
BSR_TYPE_FIRST_LEVEL
];
/// retxBSR-Timer expires flag
uint8_t
retxBSRTimer_expires_flag
;
/// periodBSR-Timer expires flag
uint8_t
periodBSRTimer_expires_flag
;
/// MBSFN_Subframe Configuration
struct
MBSFN_SubframeConfig
*
mbsfn_SubframeConfig
[
8
];
// FIXME replace 8 by MAX_MBSFN_AREA?
/// number of subframe allocation pattern available for MBSFN sync area
...
...
openair2/LAYER2/MAC/proto.h
View file @
319ae6fb
...
...
@@ -538,14 +538,14 @@ UE_L2_STATE_t ue_scheduler(
*/
int
cba_access
(
module_id_t
module_idP
,
frame_t
frameP
,
sub_frame_t
subframe
,
uint8_t
eNB_index
,
uint16_t
buflen
);
/*! \fn int get_bsr_lcgid (module_id_t module_idP);
/*! \fn int
update_bsr_and_
get_bsr_lcgid (module_id_t module_idP);
\brief determine the lcgid for the bsr
\param[in] Mod_id instance of the UE
\param[out] lcgid
*/
int
get_bsr_lcgid
(
module_id_t
module_idP
);
int
update_bsr_and_
get_bsr_lcgid
(
module_id_t
module_idP
);
/*! \fn int get_bsr_type (module_id_t module_idP,
uint16_t buf
flen);
/*! \fn int get_bsr_type (module_id_t module_idP,
uint8_t eNB_index,frame_t frameP,uint16_t bu
flen);
\brief determine whether the bsr is short or long assuming that the MAC pdu is built
\param[in] Mod_id instance of the UE
\param[in] bufflen size of phy transport block
...
...
openair2/LAYER2/MAC/ue_procedures.c
View file @
319ae6fb
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment