2 * Copyright 2017 Adrian Chadd <adrian@FreeBSD.org>.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
13 * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 #include <sys/cdefs.h>
33 #include <sys/types.h>
34 #include <sys/systm.h>
36 #include <sys/errno.h>
37 #include <sys/kernel.h>
38 #include <sys/module.h>
40 #include <dev/ath/ath_hal/ah.h>
41 #include <dev/ath/ath_hal/ah_internal.h>
43 extern struct ath_hal_chip AR5416_chip;
44 extern struct ath_hal_chip AR9130_chip;
45 extern struct ath_hal_chip AR9160_chip;
46 extern struct ath_hal_chip AR9280_chip;
47 extern struct ath_hal_chip AR9285_chip;
48 extern struct ath_hal_chip AR9287_chip;
50 extern struct ath_hal_rf RF2133_rf;
51 extern struct ath_hal_rf RF9280_rf;
52 extern struct ath_hal_rf RF9285_rf;
53 extern struct ath_hal_rf RF9287_rf;
56 ath_hal_ar5416_modevent(module_t mod __unused, int type, void *data __unused)
62 ath_hal_add_chip(&AR5416_chip);
63 ath_hal_add_chip(&AR9130_chip);
64 ath_hal_add_chip(&AR9160_chip);
65 ath_hal_add_chip(&AR9280_chip);
66 ath_hal_add_chip(&AR9285_chip);
67 ath_hal_add_chip(&AR9287_chip);
68 ath_hal_add_rf(&RF2133_rf);
69 ath_hal_add_rf(&RF9280_rf);
70 ath_hal_add_rf(&RF9285_rf);
71 ath_hal_add_rf(&RF9287_rf);
72 printf("[ar5416] loaded\n");
76 ath_hal_remove_chip(&AR5416_chip);
77 ath_hal_remove_chip(&AR9130_chip);
78 ath_hal_remove_chip(&AR9160_chip);
79 ath_hal_remove_chip(&AR9280_chip);
80 ath_hal_remove_chip(&AR9285_chip);
81 ath_hal_remove_chip(&AR9287_chip);
82 ath_hal_remove_rf(&RF2133_rf);
83 ath_hal_remove_rf(&RF9280_rf);
84 ath_hal_remove_rf(&RF9285_rf);
85 ath_hal_remove_rf(&RF9287_rf);
86 printf("[ar5416] unloaded\n");
100 DEV_MODULE(ath_hal_ar5416, ath_hal_ar5416_modevent, NULL);
101 MODULE_VERSION(ath_hal_ar5416, 1);
102 MODULE_DEPEND(ath_hal_ar5416, ath_hal, 1, 1, 1);
103 MODULE_DEPEND(ath_hal_ar5416, ath_hal_ar5212, 1, 1, 1);