Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
xcap
xcap-capability-linux
Commits
172940e4
Commit
172940e4
authored
Jan 23, 2017
by
Vikram Narayanan
Browse files
add dev_addr allocation
Signed-off-by:
Vikram Narayanan
<
vikram186@gmail.com
>
parent
1e3ad7a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
lcd-domains/test_mods/nullnet/dummy_lcd/dummy.c
View file @
172940e4
...
...
@@ -168,8 +168,12 @@ static void dummy_setup(struct net_device *dev)
dev
->
hw_features
|=
dev
->
features
;
dev
->
hw_enc_features
|=
dev
->
features
;
// eth_hw_addr_random(dev);
dummy_done
=
1
;
dev
->
dev_addr
=
kmalloc
(
MAX_ADDR_LEN
,
GFP_KERNEL
);
if
(
!
dev
->
dev_addr
)
LIBLCD_ERR
(
"kmalloc failed"
);
eth_hw_addr_random
(
dev
);
}
static
int
dummy_validate
(
struct
nlattr
*
tb
[],
struct
nlattr
*
data
[])
...
...
@@ -221,6 +225,7 @@ static int __init dummy_init_one(void)
return
-
ENOMEM
;
dev_dummy
->
rtnl_link_ops
=
&
dummy_link_ops_container
.
rtnl_link_ops
;
printk
(
"Dummy allocated
\n
"
);
/* err = register_netdevice(&dev_dummy->net_device);
if (err < 0)
goto err;*/
...
...
@@ -252,6 +257,8 @@ int dummy_init_module(void)
err
=
dummy_init_one
();
cond_resched
();
}
dummy_done
=
1
;
/* if (err < 0)
__rtnl_link_unregister(&dummy_link_ops_container.rtnl_link_ops);
...
...
Write
Preview
Supports
Markdown
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