Makefile revision 186094
1116744Ssam#
2185522Ssam# Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
3116744Ssam# All rights reserved.
4116744Ssam#
5116744Ssam# Redistribution and use in source and binary forms, with or without
6116744Ssam# modification, are permitted provided that the following conditions
7116744Ssam# are met:
8116744Ssam# 1. Redistributions of source code must retain the above copyright
9116744Ssam#    notice, this list of conditions and the following disclaimer,
10116744Ssam#    without modification.
11116744Ssam# 2. Redistributions in binary form must reproduce at minimum a disclaimer
12116744Ssam#    similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
13116744Ssam#    redistribution must be conditioned upon including a substantially
14116744Ssam#    similar Disclaimer requirement for further binary redistribution.
15116744Ssam#
16116744Ssam# NO WARRANTY
17116744Ssam# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18116744Ssam# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19116744Ssam# LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
20116744Ssam# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
21116744Ssam# THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
22116744Ssam# OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23116744Ssam# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24116744Ssam# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25116744Ssam# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26116744Ssam# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27116744Ssam# THE POSSIBILITY OF SUCH DAMAGES.
28116744Ssam#
29116744Ssam# $FreeBSD: head/sys/modules/ath/Makefile 186094 2008-12-14 22:26:57Z sam $
30116744Ssam#
31116744Ssam
32186094SsamATH_RATE?=	sample		# tx rate control algorithm
33116744Ssam
34186094Ssam.PATH:	${.CURDIR}/../../dev/ath
35186094Ssam.PATH:	${.CURDIR}/../../dev/ath/ath_hal
36186094Ssam
37186094SsamKMOD=	if_ath
38186094SsamSRCS=	if_ath.c if_ath_pci.c
39186094Ssam# NB: v3 eeprom support used by both AR5211 and AR5212; just include it
40186094SsamSRCS+=	ah_osdep.c ah.c ah_regdomain.c ah_eeprom_v3.c
41186094SsamSRCS+=	device_if.h bus_if.h pci_if.h opt_inet.h opt_ath.h opt_ah.h
42186094Ssam
43186094Ssam#
44186094Ssam# AR5210 support; these are first generation 11a-only devices.
45186094Ssam#
46186094Ssam.PATH:	${.CURDIR}/../../dev/ath/ath_hal/ar5210
47186094SsamSRCS+=	ah_eeprom_v1.c \
48185522Ssam	ar5210_attach.c ar5210_beacon.c ar5210_interrupts.c \
49185522Ssam	ar5210_keycache.c ar5210_misc.c ar5210_phy.c ar5210_power.c \
50185522Ssam	ar5210_recv.c ar5210_reset.c ar5210_xmit.c
51186094Ssam
52186094Ssam#
53186094Ssam# AR5211 support; these are second generation 11b/g/a devices
54186094Ssam# (but 11g was OFDM only and is not supported).
55186094Ssam#
56186094Ssam.PATH:	${.CURDIR}/../../dev/ath/ath_hal/ar5211
57186094SsamSRCS+=	ar5211_attach.c ar5211_beacon.c ar5211_interrupts.c \
58185522Ssam	ar5211_keycache.c ar5211_misc.c	ar5211_phy.c ar5211_power.c \
59185522Ssam	ar5211_recv.c ar5211_reset.c ar5211_xmit.c
60186094Ssam
61186094Ssam#
62186094Ssam# AR5212 support; this covers all other pci/cardbus legacy parts.
63186094Ssam#
64186094Ssam.PATH:	${.CURDIR}/../../dev/ath/ath_hal/ar5212
65186094SsamSRCS+=	ar5212_ani.c ar5212_attach.c ar5212_beacon.c ar5212_eeprom.c \
66185522Ssam	ar5212_gpio.c ar5212_interrupts.c ar5212_keycache.c ar5212_misc.c \
67185522Ssam	ar5212_phy.c ar5212_power.c ar5212_recv.c ar5212_reset.c \
68186094Ssam	ar5212_rfgain.c ar5212_xmit.c
69186094Ssam# RF backends
70186094SsamSRCS+=	ar5111.c
71186094SsamSRCS+=	ar5112.c
72186094SsamSRCS+=	ar2413.c
73186094SsamSRCS+=	ar2425.c
74186094SsamSRCS+=	ar5413.c
75186094Ssam
76186094Ssam#
77186094Ssam# AR5416, AR9160 support; these are 11n parts but only really
78186094Ssam# supported (right now) operating in legacy mode.  Note enabling
79186094Ssam# this support requires defining AH_SUPPORT_AR5416 in opt_ah.h
80186094Ssam# so the 11n tx/rx descriptor format is handled.
81186094Ssam#
82186094Ssam# NB: 9160 depends on 5416 but 5416 does not require 9160
83186094Ssam#
84186094Ssam.PATH:	${.CURDIR}/../../dev/ath/ath_hal/ar5416
85186094SsamSRCS+=	ah_eeprom_v14.c \
86185522Ssam	ar5416_ani.c ar5416_attach.c ar5416_beacon.c ar5416_cal.c \
87185522Ssam	ar5416_cal_iq.c ar5416_cal_adcgain.c ar5416_cal_adcdc.c \
88185522Ssam	ar5416_eeprom.c ar5416_gpio.c ar5416_interrupts.c ar5416_keycache.c \
89185522Ssam	ar5416_misc.c ar5416_phy.c ar5416_power.c ar5416_recv.c \
90186094Ssam	ar5416_reset.c ar5416_xmit.c
91186094SsamSRCS+=	ar9160_attach.c
92186094Ssam# RF backend for 5416 and 9160
93186094SsamSRCS+=	ar2133.c
94185522Ssam
95186094Ssam# NB: rate control is bound to the driver by symbol names so only pick one
96186094Ssam.if ${ATH_RATE} == "sample"
97186094Ssam.PATH:	${.CURDIR}/../../dev/ath/ath_rate/sample
98186094SsamSRCS+=	sample.c opt_wlan.h
99186094Ssam.elif ${ATH_RATE} == "onoe"
100186094Ssam.PATH:	${.CURDIR}/../../dev/ath/ath_rate/onoe
101186094SsamSRCS+=	onoe.c
102186094Ssam.elif ${ATH_RATE} == "amrr"
103186094Ssam.PATH:	${.CURDIR}/../../dev/ath/ath_rate/amrr
104186094SsamSRCS+=	amrr.c
105186094Ssam.endif
106116744Ssam
107185522SsamCFLAGS+=  -I. -I${.CURDIR}/../../dev/ath -I${.CURDIR}/../../dev/ath/ath_hal
108116744Ssam
109185522Ssamopt_ah.h:
110185522Ssam	echo '#define AH_SUPPORT_AR5416 1' > $@
111157438Ssam
112116744Ssam.include <bsd.kmod.mk>
113