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
lizhongxiao
OpenXG-RAN
Commits
ce29d805
Commit
ce29d805
authored
Sep 20, 2018
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor modifications to support latest kernels
parent
b8b674f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
7 deletions
+36
-7
openair2/NETWORK_DRIVER/UE_IP/device.c
openair2/NETWORK_DRIVER/UE_IP/device.c
+35
-7
openair2/NETWORK_DRIVER/UE_IP/local.h
openair2/NETWORK_DRIVER/UE_IP/local.h
+1
-0
No files found.
openair2/NETWORK_DRIVER/UE_IP/device.c
View file @
ce29d805
...
...
@@ -99,21 +99,44 @@ void *ue_ip_interrupt(void)
}
#endif //NETLINK
//---------------------------------------------------------------------------
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
void
ue_ip_timer
(
struct
timer_list
*
t
)
#else
void
ue_ip_timer
(
unsigned
long
dataP
)
#endif
{
//---------------------------------------------------------------------------
ue_ip_priv_t
*
priv_p
=
(
ue_ip_priv_t
*
)
dataP
;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
ue_ip_priv_t
*
priv_p
=
from_timer
(
priv_p
,
t
,
timer
);
#else
ue_ip_priv_t
*
priv_p
=
(
ue_ip_priv_t
*
)
dataP
;
#endif
spin_lock
(
&
priv_p
->
lock
);
(
priv_p
->
timer
).
function
=
ue_ip_timer
;
(
priv_p
->
timer
).
expires
=
jiffies
+
UE_IP_TIMER_TICK
;
(
priv_p
->
timer
).
data
=
dataP
;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
mod_timer
(
&
priv_p
->
timer
,
jiffies
+
UE_IP_TIMER_TICK
);
#else
(
priv_p
->
timer
).
function
=
ue_ip_timer
;
(
priv_p
->
timer
).
expires
=
jiffies
+
UE_IP_TIMER_TICK
;
(
priv_p
->
timer
).
data
=
dataP
;
add_timer
(
&
priv_p
->
timer
);
#endif
spin_unlock
(
&
priv_p
->
lock
);
return
;
// add_timer(&gpriv->timer);
// spin_unlock(&gpriv->lock);
}
//---------------------------------------------------------------------------
// Called by ifconfig when the device is activated by ifconfig
int
ue_ip_open
(
struct
net_device
*
dev_pP
)
...
...
@@ -137,15 +160,21 @@ int ue_ip_open(struct net_device *dev_pP)
netif_wake_queue
(
dev_pP
);
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
timer_setup
(
&
(
priv_p
->
timer
),
ue_ip_timer
,
0
);
(
priv_p
->
timer
).
expires
=
jiffies
+
UE_IP_TIMER_TICK
;
#else
init_timer
(
&
priv_p
->
timer
);
(
priv_p
->
timer
).
expires
=
jiffies
+
UE_IP_TIMER_TICK
;
(
priv_p
->
timer
).
data
=
(
unsigned
long
)
priv_p
;
(
priv_p
->
timer
).
function
=
ue_ip_timer
;
#endif
//add_timer(&priv_p->timer);
printk
(
"[UE_IP_DRV][%s] name = %s
\n
"
,
__FUNCTION__
,
dev_pP
->
name
);
return
0
;
}
//---------------------------------------------------------------------------
// Called by ifconfig when the device is desactivated
...
...
@@ -236,7 +265,7 @@ int ue_ip_hard_start_xmit(struct sk_buff *skb_pP, struct net_device *dev_pP)
// End debug information
netif_stop_queue
(
dev_pP
);
#if
LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) || RHEL_RELEASE_CODE >= 1796
#if
(LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) || defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= 1796)
netif_trans_update
(
dev_pP
);
#else
dev_pP
->
trans_start
=
jiffies
;
...
...
@@ -312,7 +341,7 @@ void ue_ip_tx_timeout(struct net_device *dev_pP)
printk
(
"[UE_IP_DRV][%s] begin
\n
"
,
__FUNCTION__
);
// (ue_ip_priv_t *)(dev_pP->priv_p)->stats.tx_errors++;
(
priv_p
->
stats
).
tx_errors
++
;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) ||
RHEL_RELEASE_CODE >= 1796
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) ||
(defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= 1796)
netif_trans_update
(
dev_pP
);
#else
dev_pP
->
trans_start
=
jiffies
;
...
...
@@ -365,7 +394,6 @@ int init_module (void)
int
err
,
inst
;
char
devicename
[
100
];
// Initialize parameters shared with RRC
printk
(
"[UE_IP_DRV][%s] Starting OAI IP driver"
,
__FUNCTION__
);
...
...
openair2/NETWORK_DRIVER/UE_IP/local.h
View file @
ce29d805
...
...
@@ -56,6 +56,7 @@
#include "constant.h"
#include "platform_types.h"
#include "sap.h"
#define MAKE_VERSION(a,b,c) ((a)*256+(b)*16+(c))
typedef
struct
ue_ip_priv_s
{
...
...
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