--- fwsync/driver/fwsync_mod.c 2022/07/11 21:18:07 1.4 +++ fwsync/driver/fwsync_mod.c 2022/08/04 00:24:39 1.5 @@ -25,6 +25,7 @@ struct cfg_sync fws_cfg; struct task fws_sndpkt_task; struct taskqueue *fws_tq; +struct callout fws_co; struct mtx fws_mtx_c, fws_mtx_e; fwsync_sndpkt_t fwsync_sndpkt; @@ -60,6 +61,8 @@ fws_fini(void *arg) } mtx_unlock(&fws_mtx_c); + callout_drain(&fws_co); + mtx_destroy(&fws_mtx_c); mtx_destroy(&fws_mtx_e); @@ -110,6 +113,10 @@ fws_init(void *arg) return ENOMEM; } else taskqueue_start_threads(&fws_tq, 1, PI_NET, "fwsync tq"); + + /* callout */ + + callout_init_mtx(&fws_co, &fws_mtx_e, 0); /* sysctl context */ sysctl_ctx_init(&fwsync_sysctl_ctx);