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
canghaiwuhen
OpenXG-RAN
Commits
20b420bb
Commit
20b420bb
authored
Mar 16, 2017
by
Cedric Roux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix compilation for ubuntu 16
This work was done by Laurent Thomas.
parent
bd3394f5
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
87 additions
and
50 deletions
+87
-50
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+7
-2
openair2/NAS/DRIVER/CELLULAR/NASMT/nasmt_device.c
openair2/NAS/DRIVER/CELLULAR/NASMT/nasmt_device.c
+8
-1
openair2/NAS/DRIVER/CELLULAR/NASRG/nasrg_device.c
openair2/NAS/DRIVER/CELLULAR/NASRG/nasrg_device.c
+8
-0
openair2/NETWORK_DRIVER/LITE/device.c
openair2/NETWORK_DRIVER/LITE/device.c
+8
-0
openair2/NETWORK_DRIVER/MESH/classifier.c
openair2/NETWORK_DRIVER/MESH/classifier.c
+2
-2
openair2/NETWORK_DRIVER/MESH/common.c
openair2/NETWORK_DRIVER/MESH/common.c
+2
-3
openair2/NETWORK_DRIVER/MESH/device.c
openair2/NETWORK_DRIVER/MESH/device.c
+12
-7
openair2/NETWORK_DRIVER/MESH/ioctl.c
openair2/NETWORK_DRIVER/MESH/ioctl.c
+1
-1
openair2/NETWORK_DRIVER/MESH/local.h
openair2/NETWORK_DRIVER/MESH/local.h
+21
-23
openair2/NETWORK_DRIVER/MESH/mesh.c
openair2/NETWORK_DRIVER/MESH/mesh.c
+4
-2
openair2/NETWORK_DRIVER/MESH/proto_extern.h
openair2/NETWORK_DRIVER/MESH/proto_extern.h
+5
-6
openair2/NETWORK_DRIVER/UE_IP/common.c
openair2/NETWORK_DRIVER/UE_IP/common.c
+1
-3
openair2/NETWORK_DRIVER/UE_IP/device.c
openair2/NETWORK_DRIVER/UE_IP/device.c
+8
-0
No files found.
cmake_targets/CMakeLists.txt
View file @
20b420bb
...
@@ -2099,11 +2099,16 @@ endforeach()
...
@@ -2099,11 +2099,16 @@ endforeach()
# force castxml and clang compilation with gnu89 standard
# force castxml and clang compilation with gnu89 standard
# we can't use cXX standard as pthread_rwlock_t is gnu standard
# we can't use cXX standard as pthread_rwlock_t is gnu standard
list
(
APPEND itti_compiler_options
"-std=gnu89"
)
list
(
APPEND itti_compiler_options
"-std=gnu89"
)
set
(
ITTI_H
${
ITTI_DIR
}
/intertask_interface_types.h
)
set
(
ITTI_H
${
ITTI_DIR
}
/intertask_interface_types.h
)
if
(
EXISTS /usr/bin/gccxml
)
set
(
xml_command gccxml
${
itti_compiler_options
}
-fxml=
${
OPENAIR_BIN_DIR
}
/messages.xml
${
ITTI_H
}
)
else
()
set
(
xml_command castxml --castxml-gccxml
${
itti_compiler_options
}
${
ITTI_H
}
-o
${
OPENAIR_BIN_DIR
}
/messages.xml
)
endif
()
add_custom_command
(
add_custom_command
(
OUTPUT
${
OPENAIR_BIN_DIR
}
/messages.xml
OUTPUT
${
OPENAIR_BIN_DIR
}
/messages.xml
COMMAND
gccxml
${
itti_compiler_options
}
-fxml=
${
OPENAIR_BIN_DIR
}
/messages.xml
${
ITTI_H
}
COMMAND
${
xml_command
}
DEPENDS
${
S1AP_OAI_generated
}
${
RRC_FULL_DIR
}
/asn1_constants.h
DEPENDS
${
S1AP_OAI_generated
}
${
RRC_FULL_DIR
}
/asn1_constants.h
)
)
...
...
openair2/NAS/DRIVER/CELLULAR/NASMT/nasmt_device.c
View file @
20b420bb
...
@@ -233,9 +233,12 @@ int nasmt_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
...
@@ -233,9 +233,12 @@ int nasmt_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
}
}
// End debug information
// End debug information
netif_stop_queue
(
dev
);
netif_stop_queue
(
dev
);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
netif_trans_update
(
dev
);
#else
dev
->
trans_start
=
jiffies
;
dev
->
trans_start
=
jiffies
;
#endif
#ifdef NAS_DEBUG_SEND_DETAIL
#ifdef NAS_DEBUG_SEND_DETAIL
printk
(
"nasmt_hard_start_xmit: step 1
\n
"
);
printk
(
"nasmt_hard_start_xmit: step 1
\n
"
);
#endif
#endif
...
@@ -307,7 +310,11 @@ void nasmt_tx_timeout(struct net_device *dev)
...
@@ -307,7 +310,11 @@ void nasmt_tx_timeout(struct net_device *dev)
printk
(
"nasmt_tx_timeout: begin
\n
"
);
printk
(
"nasmt_tx_timeout: begin
\n
"
);
//((struct nas_priv *)(dev->priv))->stats.tx_errors++;
//((struct nas_priv *)(dev->priv))->stats.tx_errors++;
(
gpriv
->
stats
).
tx_errors
++
;
(
gpriv
->
stats
).
tx_errors
++
;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
netif_trans_update
(
dev
);
#else
dev
->
trans_start
=
jiffies
;
dev
->
trans_start
=
jiffies
;
#endif
netif_wake_queue
(
dev
);
netif_wake_queue
(
dev
);
printk
(
"nasmt_tx_timeout: transmit timed out %s
\n
"
,
dev
->
name
);
printk
(
"nasmt_tx_timeout: transmit timed out %s
\n
"
,
dev
->
name
);
}
}
...
...
openair2/NAS/DRIVER/CELLULAR/NASRG/nasrg_device.c
View file @
20b420bb
...
@@ -226,7 +226,11 @@ int nasrg_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
...
@@ -226,7 +226,11 @@ int nasrg_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
// End debug information
// End debug information
netif_stop_queue
(
dev
);
netif_stop_queue
(
dev
);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
netif_trans_update
(
dev
);
#else
dev
->
trans_start
=
jiffies
;
dev
->
trans_start
=
jiffies
;
#endif
#ifdef NAS_DEBUG_SEND_DETAIL
#ifdef NAS_DEBUG_SEND_DETAIL
printk
(
"nasrg_hard_start_xmit: step 1
\n
"
);
printk
(
"nasrg_hard_start_xmit: step 1
\n
"
);
#endif
#endif
...
@@ -296,7 +300,11 @@ void nasrg_tx_timeout(struct net_device *dev)
...
@@ -296,7 +300,11 @@ void nasrg_tx_timeout(struct net_device *dev)
printk
(
"nasrg_tx_timeout: begin
\n
"
);
printk
(
"nasrg_tx_timeout: begin
\n
"
);
// ((struct nas_priv *)(dev->priv))->stats.tx_errors++;
// ((struct nas_priv *)(dev->priv))->stats.tx_errors++;
(
gpriv
->
stats
).
tx_errors
++
;
(
gpriv
->
stats
).
tx_errors
++
;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
netif_trans_update
(
dev
);
#else
dev
->
trans_start
=
jiffies
;
dev
->
trans_start
=
jiffies
;
#endif
netif_wake_queue
(
dev
);
netif_wake_queue
(
dev
);
printk
(
"nasrg_tx_timeout: transmit timed out %s
\n
"
,
dev
->
name
);
printk
(
"nasrg_tx_timeout: transmit timed out %s
\n
"
,
dev
->
name
);
}
}
...
...
openair2/NETWORK_DRIVER/LITE/device.c
View file @
20b420bb
...
@@ -255,7 +255,11 @@ int oai_nw_drv_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
...
@@ -255,7 +255,11 @@ int oai_nw_drv_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
// End debug information
// End debug information
netif_stop_queue
(
dev
);
netif_stop_queue
(
dev
);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
netif_trans_update
(
dev
);
#else
dev
->
trans_start
=
jiffies
;
dev
->
trans_start
=
jiffies
;
#endif
#ifdef OAI_DRV_DEBUG_DEVICE
#ifdef OAI_DRV_DEBUG_DEVICE
printk
(
"[OAI_IP_DRV][%s] step 1
\n
"
,
__FUNCTION__
);
printk
(
"[OAI_IP_DRV][%s] step 1
\n
"
,
__FUNCTION__
);
#endif
#endif
...
@@ -328,7 +332,11 @@ void oai_nw_drv_tx_timeout(struct net_device *dev)
...
@@ -328,7 +332,11 @@ void oai_nw_drv_tx_timeout(struct net_device *dev)
printk
(
"[OAI_IP_DRV][%s] begin
\n
"
,
__FUNCTION__
);
printk
(
"[OAI_IP_DRV][%s] begin
\n
"
,
__FUNCTION__
);
// (struct oai_nw_drv_priv *)(dev->priv)->stats.tx_errors++;
// (struct oai_nw_drv_priv *)(dev->priv)->stats.tx_errors++;
(
priv
->
stats
).
tx_errors
++
;
(
priv
->
stats
).
tx_errors
++
;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
netif_trans_update
(
dev
);
#else
dev
->
trans_start
=
jiffies
;
dev
->
trans_start
=
jiffies
;
#endif
netif_wake_queue
(
dev
);
netif_wake_queue
(
dev
);
printk
(
"[OAI_IP_DRV][%s] transmit timed out %s
\n
"
,
__FUNCTION__
,
dev
->
name
);
printk
(
"[OAI_IP_DRV][%s] transmit timed out %s
\n
"
,
__FUNCTION__
,
dev
->
name
);
}
}
...
...
openair2/NETWORK_DRIVER/MESH/classifier.c
View file @
20b420bb
...
@@ -790,7 +790,7 @@ void nas_CLASS_send(struct sk_buff *skb,int inst)
...
@@ -790,7 +790,7 @@ void nas_CLASS_send(struct sk_buff *skb,int inst)
dscp
,
sprotocol
,
sp
->
classref
,
sfct
,
sp
->
rab_id
);
dscp
,
sprotocol
,
sp
->
classref
,
sfct
,
sp
->
rab_id
);
#endif
#endif
sp
->
fct
(
skb
,
cx
,
sp
,
inst
);
sp
->
fct
(
skb
,
cx
,
sp
,
inst
,
NULL
);
}
// if classifier entry match found
}
// if classifier entry match found
...
@@ -808,7 +808,7 @@ void nas_CLASS_send(struct sk_buff *skb,int inst)
...
@@ -808,7 +808,7 @@ void nas_CLASS_send(struct sk_buff *skb,int inst)
if
(
no_connection
==
1
)
if
(
no_connection
==
1
)
printk
(
"NAS_CLASS_SEND: no corresponding connection, so the message is dropped
\n
"
);
printk
(
"NAS_CLASS_SEND: no corresponding connection, so the message is dropped
\n
"
);
#endif
NAS_DEBUG_CLASS
#endif
/* NAS_DEBUG_CLASS */
// } // while loop over connections
// } // while loop over connections
...
...
openair2/NETWORK_DRIVER/MESH/common.c
View file @
20b420bb
...
@@ -321,10 +321,9 @@ void nas_COMMON_receive(uint16_t dlen,
...
@@ -321,10 +321,9 @@ void nas_COMMON_receive(uint16_t dlen,
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// Delete the data
// Delete the data
void
nas_COMMON_del_send
(
struct
sk_buff
*
skb
,
struct
cx_entity
*
cx
,
struct
classifier_entity
*
sp
,
int
inst
)
void
nas_COMMON_del_send
(
struct
sk_buff
*
skb
,
struct
cx_entity
*
cx
,
struct
classifier_entity
*
sp
,
int
inst
,
struct
nas_priv
*
gpriv
)
{
{
struct
nas_priv
*
priv
=
netdev_priv
(
nasdev
[
inst
]);
struct
nas_priv
*
priv
=
netdev_priv
(
nasdev
[
inst
]);
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
++
priv
->
stats
.
tx_dropped
;
++
priv
->
stats
.
tx_dropped
;
}
}
...
@@ -332,7 +331,7 @@ void nas_COMMON_del_send(struct sk_buff *skb, struct cx_entity *cx, struct class
...
@@ -332,7 +331,7 @@ void nas_COMMON_del_send(struct sk_buff *skb, struct cx_entity *cx, struct class
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// Request the transfer of data (QoS SAP)
// Request the transfer of data (QoS SAP)
void
nas_COMMON_QOS_send
(
struct
sk_buff
*
skb
,
struct
cx_entity
*
cx
,
struct
classifier_entity
*
gc
,
int
inst
)
void
nas_COMMON_QOS_send
(
struct
sk_buff
*
skb
,
struct
cx_entity
*
cx
,
struct
classifier_entity
*
gc
,
int
inst
,
struct
nas_priv
*
gpriv
)
{
{
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
struct
pdcp_data_req_header_s
pdcph
;
struct
pdcp_data_req_header_s
pdcph
;
...
...
openair2/NETWORK_DRIVER/MESH/device.c
View file @
20b420bb
...
@@ -124,11 +124,8 @@ void *nas_interrupt(void)
...
@@ -124,11 +124,8 @@ void *nas_interrupt(void)
int
nas_open
(
struct
net_device
*
dev
)
int
nas_open
(
struct
net_device
*
dev
)
{
{
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
struct
nas_priv
*
priv
=
netdev_priv
(
dev
);
printk
(
"OPEN: begin
\n
"
);
printk
(
"OPEN: begin
\n
"
);
// MOD_INC_USE_COUNT;
// MOD_INC_USE_COUNT;
// Address has already been set at init
// Address has already been set at init
#ifndef PDCP_USE_NETLINK
#ifndef PDCP_USE_NETLINK
...
@@ -250,7 +247,11 @@ int nas_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
...
@@ -250,7 +247,11 @@ int nas_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
// End debug information
// End debug information
netif_stop_queue
(
dev
);
netif_stop_queue
(
dev
);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
netif_trans_update
(
dev
);
#else
dev
->
trans_start
=
jiffies
;
dev
->
trans_start
=
jiffies
;
#endif
#ifdef DEBUG_DEVICE
#ifdef DEBUG_DEVICE
printk
(
"HARD_START_XMIT: step 1
\n
"
);
printk
(
"HARD_START_XMIT: step 1
\n
"
);
#endif
#endif
...
@@ -311,7 +312,11 @@ void nas_tx_timeout(struct net_device *dev)
...
@@ -311,7 +312,11 @@ void nas_tx_timeout(struct net_device *dev)
printk
(
"TX_TIMEOUT: begin
\n
"
);
printk
(
"TX_TIMEOUT: begin
\n
"
);
// (struct nas_priv *)(dev->priv)->stats.tx_errors++;
// (struct nas_priv *)(dev->priv)->stats.tx_errors++;
(
priv
->
stats
).
tx_errors
++
;
(
priv
->
stats
).
tx_errors
++
;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
netif_trans_update
(
dev
);
#else
dev
->
trans_start
=
jiffies
;
dev
->
trans_start
=
jiffies
;
#endif
netif_wake_queue
(
dev
);
netif_wake_queue
(
dev
);
printk
(
"TX_TIMEOUT: transmit timed out %s
\n
"
,
dev
->
name
);
printk
(
"TX_TIMEOUT: transmit timed out %s
\n
"
,
dev
->
name
);
}
}
...
@@ -406,8 +411,8 @@ void nas_init(struct net_device *dev)
...
@@ -406,8 +411,8 @@ void nas_init(struct net_device *dev)
nas_TOOL_imei2iid
(
IMEI
,
dev
->
dev_addr
);
// IMEI to device address (for stateless autoconfiguration address)
nas_TOOL_imei2iid
(
IMEI
,
dev
->
dev_addr
);
// IMEI to device address (for stateless autoconfiguration address)
nas_TOOL_imei2iid
(
IMEI
,
(
uint8_t
*
)
priv
->
cx
[
0
].
iid6
);
nas_TOOL_imei2iid
(
IMEI
,
(
uint8_t
*
)
priv
->
cx
[
0
].
iid6
);
#else
#else
nas_TOOL_imei2iid
(
nas_IMEI
,
dev
->
dev_addr
);
// IMEI to device address (for stateless autoconfiguration address)
nas_TOOL_imei2iid
(
(
uint8_t
*
)
nas_IMEI
,
dev
->
dev_addr
);
// IMEI to device address (for stateless autoconfiguration address)
nas_TOOL_imei2iid
(
nas_IMEI
,
(
uint8_t
*
)
priv
->
cx
[
0
].
iid6
);
nas_TOOL_imei2iid
(
(
uint8_t
*
)
nas_IMEI
,
(
uint8_t
*
)
priv
->
cx
[
0
].
iid6
);
#endif
#endif
// this is more appropriate for user space soft realtime emulation
// this is more appropriate for user space soft realtime emulation
#else
#else
...
@@ -478,8 +483,8 @@ int init_module (void)
...
@@ -478,8 +483,8 @@ int init_module (void)
if
(
nasdev
[
inst
])
{
if
(
nasdev
[
inst
])
{
nas_mesh_init
(
inst
);
nas_mesh_init
(
inst
);
//memcpy(nasdev[inst]->dev_addr,&nas_IMEI[0],8);
//memcpy(nasdev[inst]->dev_addr,&nas_IMEI[0],8);
nas_TOOL_imei2iid
(
nas_IMEI
,
nasdev
[
inst
]
->
dev_addr
);
// IMEI to device address (for stateless autoconfiguration address)
nas_TOOL_imei2iid
(
(
uint8_t
*
)
nas_IMEI
,
nasdev
[
inst
]
->
dev_addr
);
// IMEI to device address (for stateless autoconfiguration address)
nas_TOOL_imei2iid
(
nas_IMEI
,
(
uint8_t
*
)
priv
->
cx
[
0
].
iid6
);
nas_TOOL_imei2iid
(
(
uint8_t
*
)
nas_IMEI
,
(
uint8_t
*
)
priv
->
cx
[
0
].
iid6
);
// TO HAVE DIFFERENT HW @
// TO HAVE DIFFERENT HW @
((
unsigned
char
*
)
nasdev
[
inst
]
->
dev_addr
)[
7
]
=
((
unsigned
char
*
)
nasdev
[
inst
]
->
dev_addr
)[
7
]
+
(
unsigned
char
)
inst
+
1
;
((
unsigned
char
*
)
nasdev
[
inst
]
->
dev_addr
)[
7
]
=
((
unsigned
char
*
)
nasdev
[
inst
]
->
dev_addr
)[
7
]
+
(
unsigned
char
)
inst
+
1
;
printk
(
"Setting HW addr for INST %d to : %X%X
\n
"
,
inst
,
*
((
unsigned
int
*
)
&
nasdev
[
inst
]
->
dev_addr
[
0
]),
*
((
unsigned
int
*
)
&
nasdev
[
inst
]
->
dev_addr
[
4
]));
printk
(
"Setting HW addr for INST %d to : %X%X
\n
"
,
inst
,
*
((
unsigned
int
*
)
&
nasdev
[
inst
]
->
dev_addr
[
0
]),
*
((
unsigned
int
*
)
&
nasdev
[
inst
]
->
dev_addr
[
4
]));
...
...
openair2/NETWORK_DRIVER/MESH/ioctl.c
View file @
20b420bb
...
@@ -853,7 +853,7 @@ int nas_CTL_ioctl(struct net_device *dev,
...
@@ -853,7 +853,7 @@ int nas_CTL_ioctl(struct net_device *dev,
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
void
nas_CTL_send
(
struct
sk_buff
*
skb
,
void
nas_CTL_send
(
struct
sk_buff
*
skb
,
struct
cx_entity
*
cx
,
struct
cx_entity
*
cx
,
struct
classifier_entity
*
gc
)
struct
classifier_entity
*
gc
,
int
inst
,
struct
nas_priv
*
gpriv
)
{
{
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
printk
(
"NAS_CTL_SEND - void
\n
"
);
printk
(
"NAS_CTL_SEND - void
\n
"
);
...
...
openair2/NETWORK_DRIVER/MESH/local.h
View file @
20b420bb
...
@@ -98,6 +98,26 @@ struct cx_entity {
...
@@ -98,6 +98,26 @@ struct cx_entity {
int
provider_id
[
MAX_MEASURE_NB
];
int
provider_id
[
MAX_MEASURE_NB
];
};
};
//#define NAS_RETRY_LIMIT_DEFAULT 5
struct
nas_priv
{
int
irq
;
struct
timer_list
timer
;
spinlock_t
lock
;
struct
net_device_stats
stats
;
uint8_t
retry_limit
;
uint32_t
timer_establishment
;
uint32_t
timer_release
;
struct
cx_entity
cx
[
NAS_CX_MAX
];
struct
classifier_entity
*
rclassifier
[
NAS_DSCP_MAX
];
// receive classifier
uint16_t
nrclassifier
;
int
sap
[
NAS_SAPI_MAX
];
struct
sock
*
nl_sk
;
uint8_t
nlmsg
[
NAS_MAX_LENGTH
+
sizeof
(
struct
nlmsghdr
)];
uint8_t
xbuffer
[
NAS_MAX_LENGTH
];
// transmition buffer
uint8_t
rbuffer
[
NAS_MAX_LENGTH
];
// reception buffer
};
struct
classifier_entity
{
struct
classifier_entity
{
uint32_t
classref
;
uint32_t
classref
;
...
@@ -122,29 +142,7 @@ struct classifier_entity {
...
@@ -122,29 +142,7 @@ struct classifier_entity {
struct
rb_entity
*
rb_rx
;
//pointer to rb_entity for receiving (in case of forwarding rule)
struct
rb_entity
*
rb_rx
;
//pointer to rb_entity for receiving (in case of forwarding rule)
nasRadioBearerId_t
rab_id
;
// RAB identification for sending
nasRadioBearerId_t
rab_id
;
// RAB identification for sending
nasRadioBearerId_t
rab_id_rx
;
// RAB identification for receiving (in case of forwarding rule)
nasRadioBearerId_t
rab_id_rx
;
// RAB identification for receiving (in case of forwarding rule)
void
(
*
fct
)(
struct
sk_buff
*
skb
,
struct
cx_entity
*
cx
,
struct
classifier_entity
*
gc
,
int
inst
);
void
(
*
fct
)(
struct
sk_buff
*
skb
,
struct
cx_entity
*
cx
,
struct
classifier_entity
*
gc
,
int
inst
,
struct
nas_priv
*
gpriv
);
};
//#define NAS_RETRY_LIMIT_DEFAULT 5
struct
nas_priv
{
int
irq
;
struct
timer_list
timer
;
spinlock_t
lock
;
struct
net_device_stats
stats
;
uint8_t
retry_limit
;
uint32_t
timer_establishment
;
uint32_t
timer_release
;
struct
cx_entity
cx
[
NAS_CX_MAX
];
struct
classifier_entity
*
rclassifier
[
NAS_DSCP_MAX
];
// receive classifier
uint16_t
nrclassifier
;
int
sap
[
NAS_SAPI_MAX
];
struct
sock
*
nl_sk
;
uint8_t
nlmsg
[
NAS_MAX_LENGTH
+
sizeof
(
struct
nlmsghdr
)];
uint8_t
xbuffer
[
NAS_MAX_LENGTH
];
// transmition buffer
uint8_t
rbuffer
[
NAS_MAX_LENGTH
];
// reception buffer
};
};
struct
ipversion
{
struct
ipversion
{
...
...
openair2/NETWORK_DRIVER/MESH/mesh.c
View file @
20b420bb
...
@@ -155,9 +155,10 @@ void nas_mesh_start_default_sclassifier(struct cx_entity *cx,struct rb_entity *r
...
@@ -155,9 +155,10 @@ void nas_mesh_start_default_sclassifier(struct cx_entity *cx,struct rb_entity *r
}
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
void
nas_mesh_timer
(
unsigned
long
data
,
struct
nas_priv
*
gpriv
)
void
nas_mesh_timer
(
unsigned
long
data
)
{
{
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
struct
nas_priv
*
gpriv
=
(
struct
nas_priv
*
)
data
;
uint8_t
cxi
;
uint8_t
cxi
;
struct
cx_entity
*
cx
;
struct
cx_entity
*
cx
;
struct
rb_entity
*
rb
;
struct
rb_entity
*
rb
;
...
@@ -168,7 +169,7 @@ void nas_mesh_timer(unsigned long data,struct nas_priv *gpriv)
...
@@ -168,7 +169,7 @@ void nas_mesh_timer(unsigned long data,struct nas_priv *gpriv)
(
gpriv
->
timer
).
function
=
nas_mesh_timer
;
(
gpriv
->
timer
).
function
=
nas_mesh_timer
;
(
gpriv
->
timer
).
expires
=
jiffies
+
NAS_TIMER_TICK
;
(
gpriv
->
timer
).
expires
=
jiffies
+
NAS_TIMER_TICK
;
(
gpriv
->
timer
).
data
=
0L
;
(
gpriv
->
timer
).
data
=
data
;
return
;
return
;
...
@@ -381,6 +382,7 @@ int nas_mesh_DC_send_cx_release_request(struct cx_entity *cx,
...
@@ -381,6 +382,7 @@ int nas_mesh_DC_send_cx_release_request(struct cx_entity *cx,
void
nas_mesh_DC_send_sig_data_request
(
struct
sk_buff
*
skb
,
void
nas_mesh_DC_send_sig_data_request
(
struct
sk_buff
*
skb
,
struct
cx_entity
*
cx
,
struct
cx_entity
*
cx
,
struct
classifier_entity
*
gc
,
struct
classifier_entity
*
gc
,
int
inst
,
struct
nas_priv
*
gpriv
)
struct
nas_priv
*
gpriv
)
{
{
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
...
...
openair2/NETWORK_DRIVER/MESH/proto_extern.h
View file @
20b420bb
...
@@ -96,7 +96,7 @@ void nas_COMMON_receive(unsigned short dlen,
...
@@ -96,7 +96,7 @@ void nas_COMMON_receive(unsigned short dlen,
*/
*/
void
nas_COMMON_QOS_send
(
struct
sk_buff
*
skb
,
void
nas_COMMON_QOS_send
(
struct
sk_buff
*
skb
,
struct
cx_entity
*
cx
,
struct
cx_entity
*
cx
,
struct
classifier_entity
*
gc
,
int
inst
);
struct
classifier_entity
*
gc
,
int
inst
,
struct
nas_priv
*
gpriv
);
/**
/**
\fn void nas_COMMON_del_send(struct sk_buff *skb, struct cx_entity *cx, struct classifier_entity *gc,int inst)
\fn void nas_COMMON_del_send(struct sk_buff *skb, struct cx_entity *cx, struct classifier_entity *gc,int inst)
...
@@ -108,7 +108,7 @@ void nas_COMMON_QOS_send(struct sk_buff *skb,
...
@@ -108,7 +108,7 @@ void nas_COMMON_QOS_send(struct sk_buff *skb,
*/
*/
void
nas_COMMON_del_send
(
struct
sk_buff
*
skb
,
void
nas_COMMON_del_send
(
struct
sk_buff
*
skb
,
struct
cx_entity
*
cx
,
struct
cx_entity
*
cx
,
struct
classifier_entity
*
gc
,
int
inst
);
struct
classifier_entity
*
gc
,
int
inst
,
struct
nas_priv
*
gpriv
);
#ifndef PDCP_USE_NETLINK
#ifndef PDCP_USE_NETLINK
/**
/**
...
@@ -195,19 +195,18 @@ void nas_mesh_init(int inst //!< Instance ID
...
@@ -195,19 +195,18 @@ void nas_mesh_init(int inst //!< Instance ID
);
);
void
nas_mesh_timer
(
unsigned
long
data
,
void
nas_mesh_timer
(
unsigned
long
data
);
struct
nas_priv
*
gpriv
);
int
nas_mesh_DC_receive
(
struct
cx_entity
*
cx
,
struct
nas_priv
*
gpriv
);
int
nas_mesh_DC_receive
(
struct
cx_entity
*
cx
,
struct
nas_priv
*
gpriv
);
int
nas_mesh_GC_receive
(
struct
nas_priv
*
gpriv
);
int
nas_mesh_GC_receive
(
struct
nas_priv
*
gpriv
);
int
nas_mesh_DC_send_cx_establish_request
(
struct
cx_entity
*
cx
,
struct
nas_priv
*
gpriv
);
int
nas_mesh_DC_send_cx_establish_request
(
struct
cx_entity
*
cx
,
struct
nas_priv
*
gpriv
);
int
nas_mesh_DC_send_cx_release_request
(
struct
cx_entity
*
cx
,
struct
nas_priv
*
gpriv
);
int
nas_mesh_DC_send_cx_release_request
(
struct
cx_entity
*
cx
,
struct
nas_priv
*
gpriv
);
void
nas_mesh_DC_send_sig_data_request
(
struct
sk_buff
*
skb
,
struct
cx_entity
*
cx
,
struct
classifier_entity
*
gc
,
struct
nas_priv
*
gpriv
);
void
nas_mesh_DC_send_sig_data_request
(
struct
sk_buff
*
skb
,
struct
cx_entity
*
cx
,
struct
classifier_entity
*
gc
,
int
inst
,
struct
nas_priv
*
gpriv
);
// iocontrol.c
// iocontrol.c
void
nas_CTL_send
(
struct
sk_buff
*
skb
,
void
nas_CTL_send
(
struct
sk_buff
*
skb
,
struct
cx_entity
*
cx
,
struct
cx_entity
*
cx
,
struct
classifier_entity
*
gc
);
struct
classifier_entity
*
gc
,
int
inst
,
struct
nas_priv
*
gpriv
);
//int nas_CTL_receive_authentication(struct ipv6hdr *iph, struct cx-entity *cx, unsigned char sapi);
//int nas_CTL_receive_authentication(struct ipv6hdr *iph, struct cx-entity *cx, unsigned char sapi);
int
nas_CTL_ioctl
(
struct
net_device
*
dev
,
int
nas_CTL_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
ifr
,
int
cmd
);
struct
ifreq
*
ifr
,
int
cmd
);
...
...
openair2/NETWORK_DRIVER/UE_IP/common.c
View file @
20b420bb
...
@@ -123,9 +123,7 @@ skb_p->mark = rb_idP;
...
@@ -123,9 +123,7 @@ skb_p->mark = rb_idP;
// LG TEST skb_p->ip_summed = CHECKSUM_NONE;
// LG TEST skb_p->ip_summed = CHECKSUM_NONE;
skb_p
->
ip_summed
=
CHECKSUM_UNNECESSARY
;
skb_p
->
ip_summed
=
CHECKSUM_UNNECESSARY
;
ipv_p
=
(
ipversion_t
*
)((
void
*
)
&
(
skb_p
->
data
[
hard_header_len
]));
ipv_p
=
(
struct
ipversion
*
)((
void
*
)
&
(
skb_p
->
data
[
hard_header_len
]));
switch
(
ipv_p
->
version
)
{
switch
(
ipv_p
->
version
)
{
...
...
openair2/NETWORK_DRIVER/UE_IP/device.c
View file @
20b420bb
...
@@ -243,7 +243,11 @@ int ue_ip_hard_start_xmit(struct sk_buff *skb_pP, struct net_device *dev_pP)
...
@@ -243,7 +243,11 @@ int ue_ip_hard_start_xmit(struct sk_buff *skb_pP, struct net_device *dev_pP)
// End debug information
// End debug information
netif_stop_queue
(
dev_pP
);
netif_stop_queue
(
dev_pP
);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
netif_trans_update
(
dev_pP
);
#else
dev_pP
->
trans_start
=
jiffies
;
dev_pP
->
trans_start
=
jiffies
;
#endif
#ifdef OAI_DRV_DEBUG_DEVICE
#ifdef OAI_DRV_DEBUG_DEVICE
printk
(
"[UE_IP_DRV][%s] step 1
\n
"
,
__FUNCTION__
);
printk
(
"[UE_IP_DRV][%s] step 1
\n
"
,
__FUNCTION__
);
#endif
#endif
...
@@ -315,7 +319,11 @@ void ue_ip_tx_timeout(struct net_device *dev_pP)
...
@@ -315,7 +319,11 @@ void ue_ip_tx_timeout(struct net_device *dev_pP)
printk
(
"[UE_IP_DRV][%s] begin
\n
"
,
__FUNCTION__
);
printk
(
"[UE_IP_DRV][%s] begin
\n
"
,
__FUNCTION__
);
// (ue_ip_priv_t *)(dev_pP->priv_p)->stats.tx_errors++;
// (ue_ip_priv_t *)(dev_pP->priv_p)->stats.tx_errors++;
(
priv_p
->
stats
).
tx_errors
++
;
(
priv_p
->
stats
).
tx_errors
++
;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
netif_trans_update
(
dev_pP
);
#else
dev_pP
->
trans_start
=
jiffies
;
dev_pP
->
trans_start
=
jiffies
;
#endif
netif_wake_queue
(
dev_pP
);
netif_wake_queue
(
dev_pP
);
printk
(
"[UE_IP_DRV][%s] transmit timed out %s
\n
"
,
__FUNCTION__
,
dev_pP
->
name
);
printk
(
"[UE_IP_DRV][%s] transmit timed out %s
\n
"
,
__FUNCTION__
,
dev_pP
->
name
);
}
}
...
...
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