1*41059135SAdrian Chadd /*-
2*41059135SAdrian Chadd * Copyright (c) 2017 Adrian Chadd <adrian@FreeBSD.org>.
3*41059135SAdrian Chadd * All rights reserved.
4*41059135SAdrian Chadd *
5*41059135SAdrian Chadd * Redistribution and use in source and binary forms, with or without
6*41059135SAdrian Chadd * modification, are permitted provided that the following conditions
7*41059135SAdrian Chadd * are met:
8*41059135SAdrian Chadd * 1. Redistributions of source code must retain the above copyright
9*41059135SAdrian Chadd * notice, this list of conditions and the following disclaimer,
10*41059135SAdrian Chadd * without modification.
11*41059135SAdrian Chadd * 2. Redistributions in binary form must reproduce at minimum a disclaimer
12*41059135SAdrian Chadd * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
13*41059135SAdrian Chadd * redistribution must be conditioned upon including a substantially
14*41059135SAdrian Chadd * similar Disclaimer requirement for further binary redistribution.
15*41059135SAdrian Chadd *
16*41059135SAdrian Chadd * NO WARRANTY
17*41059135SAdrian Chadd * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18*41059135SAdrian Chadd * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19*41059135SAdrian Chadd * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
20*41059135SAdrian Chadd * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
21*41059135SAdrian Chadd * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
22*41059135SAdrian Chadd * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23*41059135SAdrian Chadd * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24*41059135SAdrian Chadd * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25*41059135SAdrian Chadd * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26*41059135SAdrian Chadd * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27*41059135SAdrian Chadd * THE POSSIBILITY OF SUCH DAMAGES.
28*41059135SAdrian Chadd */
29*41059135SAdrian Chadd #include "opt_ah.h"
30*41059135SAdrian Chadd
31*41059135SAdrian Chadd #include <sys/param.h>
32*41059135SAdrian Chadd #include <sys/systm.h>
33*41059135SAdrian Chadd #include <sys/kernel.h>
34*41059135SAdrian Chadd #include <sys/module.h>
35*41059135SAdrian Chadd #include <sys/sysctl.h>
36*41059135SAdrian Chadd #include <sys/bus.h>
37*41059135SAdrian Chadd #include <sys/malloc.h>
38*41059135SAdrian Chadd #include <sys/proc.h>
39*41059135SAdrian Chadd #include <sys/pcpu.h>
40*41059135SAdrian Chadd #include <sys/lock.h>
41*41059135SAdrian Chadd #include <sys/mutex.h>
42*41059135SAdrian Chadd #include <sys/conf.h>
43*41059135SAdrian Chadd
44*41059135SAdrian Chadd static int
ath_dfs_modevent(module_t mod __unused,int type,void * data __unused)45*41059135SAdrian Chadd ath_dfs_modevent(module_t mod __unused, int type, void *data __unused)
46*41059135SAdrian Chadd {
47*41059135SAdrian Chadd int error = 0;
48*41059135SAdrian Chadd
49*41059135SAdrian Chadd switch (type) {
50*41059135SAdrian Chadd case MOD_LOAD:
51*41059135SAdrian Chadd printf("[ath_dfs] loaded\n");
52*41059135SAdrian Chadd break;
53*41059135SAdrian Chadd
54*41059135SAdrian Chadd case MOD_UNLOAD:
55*41059135SAdrian Chadd printf("[ath_dfs] unloaded\n");
56*41059135SAdrian Chadd break;
57*41059135SAdrian Chadd
58*41059135SAdrian Chadd case MOD_SHUTDOWN:
59*41059135SAdrian Chadd break;
60*41059135SAdrian Chadd
61*41059135SAdrian Chadd default:
62*41059135SAdrian Chadd error = EOPNOTSUPP;
63*41059135SAdrian Chadd break;
64*41059135SAdrian Chadd }
65*41059135SAdrian Chadd return (error);
66*41059135SAdrian Chadd }
67*41059135SAdrian Chadd
68*41059135SAdrian Chadd DEV_MODULE(ath_dfs, ath_dfs_modevent, NULL);
69*41059135SAdrian Chadd MODULE_VERSION(ath_dfs, 1);
70*41059135SAdrian Chadd MODULE_DEPEND(ath_dfs, ath_hal, 1, 1, 1);
71*41059135SAdrian Chadd MODULE_DEPEND(ath_dfs, wlan, 1, 1, 1);
72