Commit 741c87c0 authored by Xu Bo's avatar Xu Bo Committed by jftt

fix Segmentation fault issue(pdu_index -1)

parent 3651852e
...@@ -1308,7 +1308,7 @@ typedef struct { ...@@ -1308,7 +1308,7 @@ typedef struct {
typedef struct { typedef struct {
nfapi_tl_t tl; nfapi_tl_t tl;
uint16_t length; uint16_t length;
uint16_t pdu_index; int16_t pdu_index;
uint16_t transmission_power; uint16_t transmission_power;
} nfapi_dl_config_bch_pdu_rel8_t; } nfapi_dl_config_bch_pdu_rel8_t;
#define NFAPI_DL_CONFIG_REQUEST_BCH_PDU_REL8_TAG 0x2004 #define NFAPI_DL_CONFIG_REQUEST_BCH_PDU_REL8_TAG 0x2004
...@@ -1320,7 +1320,7 @@ typedef struct { ...@@ -1320,7 +1320,7 @@ typedef struct {
typedef struct { typedef struct {
nfapi_tl_t tl; nfapi_tl_t tl;
uint16_t length; uint16_t length;
uint16_t pdu_index; int16_t pdu_index;
uint16_t rnti; uint16_t rnti;
uint8_t resource_allocation_type; uint8_t resource_allocation_type;
uint32_t resource_block_coding; uint32_t resource_block_coding;
...@@ -1344,7 +1344,7 @@ typedef struct { ...@@ -1344,7 +1344,7 @@ typedef struct {
typedef struct { typedef struct {
nfapi_tl_t tl; nfapi_tl_t tl;
uint16_t length; uint16_t length;
uint16_t pdu_index; int16_t pdu_index;
uint16_t rnti; uint16_t rnti;
uint8_t resource_allocation_type; uint8_t resource_allocation_type;
uint8_t virtual_resource_block_assignment_flag; uint8_t virtual_resource_block_assignment_flag;
...@@ -1429,7 +1429,7 @@ typedef struct { ...@@ -1429,7 +1429,7 @@ typedef struct {
typedef struct { typedef struct {
nfapi_tl_t tl; nfapi_tl_t tl;
uint16_t length; uint16_t length;
uint16_t pdu_index; int16_t pdu_index;
uint16_t p_rnti; uint16_t p_rnti;
uint8_t resource_allocation_type; uint8_t resource_allocation_type;
uint8_t virtual_resource_block_assignment_flag; uint8_t virtual_resource_block_assignment_flag;
...@@ -1595,7 +1595,7 @@ typedef struct { ...@@ -1595,7 +1595,7 @@ typedef struct {
typedef struct { typedef struct {
nfapi_tl_t tl; nfapi_tl_t tl;
uint16_t length; uint16_t length;
uint16_t pdu_index; int16_t pdu_index;
uint16_t transmission_power; uint16_t transmission_power;
uint16_t hyper_sfn_2_lsbs; uint16_t hyper_sfn_2_lsbs;
} nfapi_dl_config_nbch_pdu_rel13_t; } nfapi_dl_config_nbch_pdu_rel13_t;
...@@ -1609,7 +1609,7 @@ typedef struct { ...@@ -1609,7 +1609,7 @@ typedef struct {
typedef struct { typedef struct {
nfapi_tl_t tl; nfapi_tl_t tl;
uint16_t length; uint16_t length;
uint16_t pdu_index; int16_t pdu_index;
uint8_t ncce_index; uint8_t ncce_index;
uint8_t aggregation_level; uint8_t aggregation_level;
uint8_t start_symbol; uint8_t start_symbol;
...@@ -1642,7 +1642,7 @@ typedef struct { ...@@ -1642,7 +1642,7 @@ typedef struct {
typedef struct { typedef struct {
nfapi_tl_t tl; nfapi_tl_t tl;
uint16_t length; uint16_t length;
uint16_t pdu_index; int16_t pdu_index;
uint8_t start_symbol; uint8_t start_symbol;
uint8_t rnti_type; uint8_t rnti_type;
uint16_t rnti; uint16_t rnti;
...@@ -2361,7 +2361,7 @@ typedef struct { ...@@ -2361,7 +2361,7 @@ typedef struct {
#define NFAPI_TX_MAX_SEGMENTS 32 #define NFAPI_TX_MAX_SEGMENTS 32
typedef struct { typedef struct {
uint16_t pdu_length; uint16_t pdu_length;
uint16_t pdu_index; int16_t pdu_index;
uint8_t num_segments; uint8_t num_segments;
struct { struct {
uint32_t segment_length; uint32_t segment_length;
...@@ -2902,7 +2902,7 @@ typedef struct { ...@@ -2902,7 +2902,7 @@ typedef struct {
typedef struct { typedef struct {
uint8_t sub_error_code; uint8_t sub_error_code;
uint16_t pdu_index; int16_t pdu_index;
} nfapi_error_indication_msg_tx_err; } nfapi_error_indication_msg_tx_err;
// //
......
...@@ -1042,7 +1042,7 @@ typedef struct eNB_MAC_INST_s { ...@@ -1042,7 +1042,7 @@ typedef struct eNB_MAC_INST_s {
/// Common cell resources /// Common cell resources
COMMON_channels_t common_channels[MAX_NUM_CCs]; COMMON_channels_t common_channels[MAX_NUM_CCs];
/// current PDU index (BCH,MCH,DLSCH) /// current PDU index (BCH,MCH,DLSCH)
uint16_t pdu_index[MAX_NUM_CCs]; int16_t pdu_index[MAX_NUM_CCs];
/// NFAPI Config Request Structure /// NFAPI Config Request Structure
nfapi_config_request_t config[MAX_NUM_CCs]; nfapi_config_request_t config[MAX_NUM_CCs];
......
...@@ -1482,7 +1482,7 @@ void ...@@ -1482,7 +1482,7 @@ void
fill_nfapi_dlsch_config(eNB_MAC_INST * eNB, fill_nfapi_dlsch_config(eNB_MAC_INST * eNB,
nfapi_dl_config_request_body_t * dl_req, nfapi_dl_config_request_body_t * dl_req,
uint16_t length, uint16_t length,
uint16_t pdu_index, int16_t pdu_index,
uint16_t rnti, uint16_t rnti,
uint8_t resource_allocation_type, uint8_t resource_allocation_type,
uint8_t uint8_t
...@@ -1556,7 +1556,7 @@ fill_nfapi_dlsch_config(eNB_MAC_INST * eNB, ...@@ -1556,7 +1556,7 @@ fill_nfapi_dlsch_config(eNB_MAC_INST * eNB,
uint16_t uint16_t
fill_nfapi_tx_req(nfapi_tx_request_body_t * tx_req_body, fill_nfapi_tx_req(nfapi_tx_request_body_t * tx_req_body,
uint16_t absSF, uint16_t pdu_length, uint16_t absSF, uint16_t pdu_length,
uint16_t pdu_index, uint8_t * pdu) int16_t pdu_index, uint8_t * pdu)
{ {
nfapi_tx_request_pdu_t *TX_req = nfapi_tx_request_pdu_t *TX_req =
&tx_req_body->tx_pdu_list[tx_req_body->number_of_pdus]; &tx_req_body->tx_pdu_list[tx_req_body->number_of_pdus];
......
...@@ -1040,7 +1040,7 @@ void extract_pusch_csi(module_id_t mod_idP, int CC_idP, int UE_id, ...@@ -1040,7 +1040,7 @@ void extract_pusch_csi(module_id_t mod_idP, int CC_idP, int UE_id,
uint16_t fill_nfapi_tx_req(nfapi_tx_request_body_t * tx_req_body, uint16_t fill_nfapi_tx_req(nfapi_tx_request_body_t * tx_req_body,
uint16_t absSF, uint16_t pdu_length, uint16_t absSF, uint16_t pdu_length,
uint16_t pdu_index, uint8_t * pdu); int16_t pdu_index, uint8_t * pdu);
void fill_nfapi_ulsch_config_request_rel8(nfapi_ul_config_request_pdu_t * void fill_nfapi_ulsch_config_request_rel8(nfapi_ul_config_request_pdu_t *
ul_config_pdu, uint8_t cqi_req, ul_config_pdu, uint8_t cqi_req,
...@@ -1080,7 +1080,7 @@ void program_dlsch_acknak(module_id_t module_idP, int CC_idP, int UE_idP, ...@@ -1080,7 +1080,7 @@ void program_dlsch_acknak(module_id_t module_idP, int CC_idP, int UE_idP,
void fill_nfapi_dlsch_config(eNB_MAC_INST * eNB, void fill_nfapi_dlsch_config(eNB_MAC_INST * eNB,
nfapi_dl_config_request_body_t * dl_req, nfapi_dl_config_request_body_t * dl_req,
uint16_t length, uint16_t pdu_index, uint16_t length, int16_t pdu_index,
uint16_t rnti, uint16_t rnti,
uint8_t resource_allocation_type, uint8_t resource_allocation_type,
uint8_t uint8_t
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment