Module: xenomai-3 Branch: next Commit: e442e8fd2862eb48100d3757c69fad45543b6007 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=e442e8fd2862eb48100d3757c69fad45543b6007
Author: Philippe Gerum <r...@xenomai.org> Date: Mon Dec 4 16:52:24 2017 +0100 net: wire up corectl interface A bug in some Makefile rule caused the corectl support to be wrongly omitted from the object list for building rtnet.ko. As a consequence of this, there is no way the smokey-based RTnet testsuite could have ever worked. Wire up the corectl handler to the Cobalt core as expected. --- kernel/drivers/net/stack/Makefile | 3 +-- kernel/drivers/net/stack/corectl.c | 9 ++++++--- kernel/drivers/net/stack/rtnet_module.c | 6 ++++++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/kernel/drivers/net/stack/Makefile b/kernel/drivers/net/stack/Makefile index 508d487..d055dc2 100644 --- a/kernel/drivers/net/stack/Makefile +++ b/kernel/drivers/net/stack/Makefile @@ -1,7 +1,5 @@ ccflags-y += -Idrivers/xenomai/net/stack/include -Ikernel/ -obj-y += corectl.o - obj-$(CONFIG_XENO_DRIVERS_NET_RTIPV4) += ipv4/ obj-$(CONFIG_XENO_DRIVERS_NET_RTPACKET) += packet/ @@ -13,6 +11,7 @@ obj-$(CONFIG_XENO_DRIVERS_NET_RTCFG) += rtcfg/ obj-$(CONFIG_XENO_DRIVERS_NET) += rtnet.o rtnet-y := \ + corectl.o \ iovec.o \ rtdev.o \ rtdev_mgr.o \ diff --git a/kernel/drivers/net/stack/corectl.c b/kernel/drivers/net/stack/corectl.c index 2f6f179..c8a9a12 100644 --- a/kernel/drivers/net/stack/corectl.c +++ b/kernel/drivers/net/stack/corectl.c @@ -66,9 +66,12 @@ static struct notifier_block rtnet_corectl_notifier = { .notifier_call = rtnet_corectl_call, }; -static int rtnet_corectl_register(void) +void rtnet_corectl_register(void) { cobalt_add_config_chain(&rtnet_corectl_notifier); - return 0; } -device_initcall(rtnet_corectl_register); + +void rtnet_corectl_unregister(void) +{ + cobalt_remove_config_chain(&rtnet_corectl_notifier); +} diff --git a/kernel/drivers/net/stack/rtnet_module.c b/kernel/drivers/net/stack/rtnet_module.c index 1e42558..63ad558 100644 --- a/kernel/drivers/net/stack/rtnet_module.c +++ b/kernel/drivers/net/stack/rtnet_module.c @@ -50,6 +50,8 @@ const char rtnet_rtdm_provider_name[] = EXPORT_SYMBOL_GPL(rtnet_rtdm_provider_name); +void rtnet_corectl_register(void); +void rtnet_corectl_unregister(void); #ifdef CONFIG_XENO_OPT_VFILE /*** @@ -345,6 +347,8 @@ int __init rtnet_init(void) if ((err = rtpc_init()) != 0) goto err_out6; + rtnet_corectl_register(); + return 0; @@ -376,6 +380,8 @@ err_out1: */ void __exit rtnet_release(void) { + rtnet_corectl_unregister(); + rtpc_cleanup(); rtwlan_exit(); _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git