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
b54f1be9
Commit
b54f1be9
authored
Oct 23, 2018
by
matzakos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small modification to enable MAC only for the OIP interface dedicated to sidelink
parent
254fc13b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
2 deletions
+30
-2
openair2/NETWORK_DRIVER/UE_IP/device.c
openair2/NETWORK_DRIVER/UE_IP/device.c
+30
-2
No files found.
openair2/NETWORK_DRIVER/UE_IP/device.c
View file @
b54f1be9
...
@@ -372,6 +372,31 @@ void ue_ip_init(struct net_device *dev_pP)
...
@@ -372,6 +372,31 @@ void ue_ip_init(struct net_device *dev_pP)
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
ue_ip_priv_t
*
priv_p
=
NULL
;
ue_ip_priv_t
*
priv_p
=
NULL
;
if
(
dev_pP
)
{
priv_p
=
netdev_priv
(
dev_pP
);
memset
(
priv_p
,
0
,
sizeof
(
ue_ip_priv_t
));
spin_lock_init
(
&
priv_p
->
lock
);
dev_pP
->
netdev_ops
=
&
ue_ip_netdev_ops
;
dev_pP
->
hard_header_len
=
0
;
dev_pP
->
addr_len
=
ETH_ALEN
;
dev_pP
->
flags
=
IFF_BROADCAST
|
IFF_MULTICAST
|
IFF_NOARP
;
dev_pP
->
tx_queue_len
=
UE_IP_TX_QUEUE_LEN
;
dev_pP
->
mtu
=
UE_IP_MTU
;
//ether_setup(dev_pP);
}
else
{
printk
(
"[UE_IP_DRV][%s] ERROR, Device is NULL!!
\n
"
,
__FUNCTION__
);
return
;
}
}
//---------------------------------------------------------------------------
// Initialisation of the network device
void
ue_ip_init_sidelink
(
struct
net_device
*
dev_pP
)
{
//---------------------------------------------------------------------------
ue_ip_priv_t
*
priv_p
=
NULL
;
if
(
dev_pP
)
{
if
(
dev_pP
)
{
priv_p
=
netdev_priv
(
dev_pP
);
priv_p
=
netdev_priv
(
dev_pP
);
memset
(
priv_p
,
0
,
sizeof
(
ue_ip_priv_t
));
memset
(
priv_p
,
0
,
sizeof
(
ue_ip_priv_t
));
...
@@ -389,6 +414,7 @@ void ue_ip_init(struct net_device *dev_pP)
...
@@ -389,6 +414,7 @@ void ue_ip_init(struct net_device *dev_pP)
return
;
return
;
}
}
}
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
int
init_module
(
void
)
int
init_module
(
void
)
{
{
...
@@ -405,7 +431,10 @@ int init_module (void)
...
@@ -405,7 +431,10 @@ int init_module (void)
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0)
ue_ip_dev
[
inst
]
=
alloc_netdev
(
sizeof
(
ue_ip_priv_t
),
devicename
,
ue_ip_init
);
ue_ip_dev
[
inst
]
=
alloc_netdev
(
sizeof
(
ue_ip_priv_t
),
devicename
,
ue_ip_init
);
#else
#else
ue_ip_dev
[
inst
]
=
alloc_netdev
(
sizeof
(
ue_ip_priv_t
),
devicename
,
NET_NAME_PREDICTABLE
,
ue_ip_init
);
if
(
inst
==
0
)
ue_ip_dev
[
inst
]
=
alloc_netdev
(
sizeof
(
ue_ip_priv_t
),
devicename
,
NET_NAME_PREDICTABLE
,
ue_ip_init_sidelink
);
else
ue_ip_dev
[
inst
]
=
alloc_netdev
(
sizeof
(
ue_ip_priv_t
),
devicename
,
NET_NAME_PREDICTABLE
,
ue_ip_init
);
#endif
#endif
//netif_stop_queue(ue_ip_dev[inst]);
//netif_stop_queue(ue_ip_dev[inst]);
...
@@ -463,4 +492,3 @@ void cleanup_module(void)
...
@@ -463,4 +492,3 @@ void cleanup_module(void)
#define DRV_COPYRIGHT "-Copyright(c) GNU GPL Eurecom 2013"
#define DRV_COPYRIGHT "-Copyright(c) GNU GPL Eurecom 2013"
#define DRV_AUTHOR "Lionel GAUTHIER: <firstname.name@eurecom.fr>"DRV_COPYRIGHT
#define DRV_AUTHOR "Lionel GAUTHIER: <firstname.name@eurecom.fr>"DRV_COPYRIGHT
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