kernel/ath: Make it compile into the kernel again and re-add to GENERIC.
authorSascha Wildner <saw@online.de>
Fri, 3 Jan 2014 00:22:08 +0000 (01:22 +0100)
committerSascha Wildner <saw@online.de>
Fri, 3 Jan 2014 00:23:03 +0000 (01:23 +0100)
Full list of changes:

* Adjust the 'files' file for changed ath_hal path and additional
  source.

* Add options from FreeBSD and comment those out which are not
  compiling/used. Add the remaining ones to the LINT kernels for
  additional build checking.

* Fix some typos in the ar9300 code.

* Use ath_hal_ether_sprintf() where needed.

* Add some casts to work around -Wenum-compare and -Wformat breakage.

* Comment out some unused struct ifp's and FreeBSD's ktr.

* Slightly readjust ATH_RXBUF and ATH_TXBUF handling to let the kernel
  options of the same name override the defaults. In the GENERIC kernel
  and module everything stays the same.

* Use the (slightly better structured) FreeBSD Makefile for ath_hal.

All kernels compile with ath(4) as of this commit.

23 files changed:
sys/conf/files
sys/conf/kern.pre.mk
sys/conf/options
sys/config/GENERIC
sys/config/LINT
sys/config/LINT64
sys/config/X86_64_GENERIC
sys/contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c
sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c
sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h
sys/dev/netif/ath/ath/if_ath.c
sys/dev/netif/ath/ath/if_ath_debug.h
sys/dev/netif/ath/ath/if_ath_keycache.c
sys/dev/netif/ath/ath/if_ath_sysctl.c
sys/dev/netif/ath/ath/if_ath_tdma.c
sys/dev/netif/ath/ath/if_ath_tx.c
sys/dev/netif/ath/ath/if_athvar.h
sys/dev/netif/ath/ath_hal/Makefile
sys/dev/netif/ath/ath_hal/ah_osdep.c
sys/dev/netif/ath/ath_hal/ar9002/ar9285_btcoex.c
sys/dev/netif/ath/ath_rate/sample/sample.c
tools/tools/ath/Makefile.inc
tools/tools/ath/athrd/Makefile

index 9bbffa3..4a23fbe 100644 (file)
@@ -183,96 +183,160 @@ dev/disk/aic7xxx/ahd_pci.c               optional ahd pci
 dev/disk/aic7xxx/aic79xx.c             optional ahd pci
 dev/disk/aic7xxx/aic79xx_osm.c         optional ahd pci
 dev/disk/aic7xxx/aic79xx_pci.c         optional ahd pci
-#dev/netif/ath/hal/ah_osdep.c                          optional ath_hal
-#dev/netif/ath/hal/ath_hal/ah.c                                optional ath_hal
-#dev/netif/ath/hal/ath_hal/ah_eeprom_v1.c              optional ath_hal
-#dev/netif/ath/hal/ath_hal/ah_eeprom_v14.c             optional ath_hal
-#dev/netif/ath/hal/ath_hal/ah_eeprom_v3.c              optional ath_hal
-#dev/netif/ath/hal/ath_hal/ah_eeprom_v4k.c             optional ath_hal
-#dev/netif/ath/hal/ath_hal/ah_regdomain.c              optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5210/ar5210_attach.c      optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5210/ar5210_beacon.c      optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5210/ar5210_interrupts.c  optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5210/ar5210_keycache.c    optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5210/ar5210_misc.c                optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5210/ar5210_phy.c                 optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5210/ar5210_power.c       optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5210/ar5210_recv.c                optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5210/ar5210_reset.c       optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5210/ar5210_xmit.c                optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5211/ar5211_attach.c      optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5211/ar5211_beacon.c      optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5211/ar5211_interrupts.c  optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5211/ar5211_keycache.c    optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5211/ar5211_misc.c                optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5211/ar5211_phy.c                 optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5211/ar5211_power.c       optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5211/ar5211_recv.c                optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5211/ar5211_reset.c       optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5211/ar5211_xmit.c                optional ath_hal
-##dev/netif/ath/hal/ath_hal/ar5212/ar2316.c            optional ath_hal
-##dev/netif/ath/hal/ath_hal/ar5212/ar2317.c            optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5212/ar2413.c             optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5212/ar2425.c             optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5212/ar5111.c             optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5212/ar5112.c             optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5212/ar5212_ani.c                 optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5212/ar5212_attach.c      optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5212/ar5212_beacon.c      optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5212/ar5212_eeprom.c      optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5212/ar5212_gpio.c                optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5212/ar5212_interrupts.c  optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5212/ar5212_keycache.c    optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5212/ar5212_misc.c                optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5212/ar5212_phy.c                 optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5212/ar5212_power.c       optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5212/ar5212_recv.c                optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5212/ar5212_reset.c       optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5212/ar5212_rfgain.c      optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5212/ar5212_xmit.c                optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5212/ar5413.c             optional ath_hal
-##dev/netif/ath/hal/ath_hal/ar5312/ar5312_attach.c     optional ath_hal
-##dev/netif/ath/hal/ath_hal/ar5312/ar5312_eeprom.c     optional ath_hal
-##dev/netif/ath/hal/ath_hal/ar5312/ar5312_gpio.c       optional ath_hal
-##dev/netif/ath/hal/ath_hal/ar5312/ar5312_interrupts.c         optional ath_hal
-##dev/netif/ath/hal/ath_hal/ar5312/ar5312_misc.c       optional ath_hal
-##dev/netif/ath/hal/ath_hal/ar5312/ar5312_power.c      optional ath_hal
-##dev/netif/ath/hal/ath_hal/ar5312/ar5312_reset.c      optional ath_hal
-##dev/netif/ath/hal/ath_hal/ar5312/ar5315_gpio.c       optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5416/ar2133.c             optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5416/ar5416_ani.c                 optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5416/ar5416_attach.c      optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5416/ar5416_beacon.c      optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5416/ar5416_cal.c                 optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5416/ar5416_cal_adcdc.c   optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5416/ar5416_cal_adcgain.c         optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5416/ar5416_cal_iq.c      optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5416/ar5416_eeprom.c      optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5416/ar5416_gpio.c                optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5416/ar5416_interrupts.c  optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5416/ar5416_keycache.c    optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5416/ar5416_misc.c                optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5416/ar5416_phy.c                 optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5416/ar5416_power.c       optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5416/ar5416_recv.c                optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5416/ar5416_reset.c       optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5416/ar5416_xmit.c                optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5416/ar9160_attach.c      optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5416/ar9280.c             optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5416/ar9280_attach.c      optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5416/ar9285.c             optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5416/ar9285_attach.c      optional ath_hal
-#dev/netif/ath/hal/ath_hal/ar5416/ar9285_reset.c       optional ath_hal
-#dev/netif/ath/rate_amrr/amrr.c                optional ath_rate_amrr \
-#      compile-with "${NORMAL_C} -I$S/dev/netif/ath/ath ${WERROR}"
-#dev/netif/ath/rate_onoe/onoe.c                optional ath_rate_onoe \
-#      compile-with "${NORMAL_C} -I$S/dev/netif/ath/ath ${WERROR}"
-#dev/netif/ath/rate_sample/sample.c    optional ath_rate_sample \
-#      compile-with "${NORMAL_C} -I$S/dev/netif/ath/ath ${WERROR}"
-#dev/netif/ath/ath/if_ath.c            optional ath \
-#      compile-with "${NORMAL_C} -I$S/dev/netif/ath/ath ${WERROR}"
-#dev/netif/ath/ath/if_ath_pci.c                optional ath pci \
-#      compile-with "${NORMAL_C} -I$S/dev/netif/ath/ath ${WERROR}"
+dev/netif/ath/ath_hal/ah_osdep.c                       optional ath_hal
+dev/netif/ath/ath_hal/ah.c                             optional ath_hal
+dev/netif/ath/ath_hal/ah_eeprom_v1.c                   optional ath_hal
+dev/netif/ath/ath_hal/ah_eeprom_v14.c                  optional ath_hal
+dev/netif/ath/ath_hal/ah_eeprom_v3.c                   optional ath_hal
+dev/netif/ath/ath_hal/ah_eeprom_v4k.c                  optional ath_hal
+dev/netif/ath/ath_hal/ah_eeprom_9287.c                 optional ath_hal
+dev/netif/ath/ath_hal/ah_regdomain.c                   optional ath_hal
+dev/netif/ath/ath_hal/ar5210/ar5210_attach.c           optional ath_hal
+dev/netif/ath/ath_hal/ar5210/ar5210_beacon.c           optional ath_hal
+dev/netif/ath/ath_hal/ar5210/ar5210_interrupts.c       optional ath_hal
+dev/netif/ath/ath_hal/ar5210/ar5210_keycache.c                 optional ath_hal
+dev/netif/ath/ath_hal/ar5210/ar5210_misc.c             optional ath_hal
+dev/netif/ath/ath_hal/ar5210/ar5210_phy.c              optional ath_hal
+dev/netif/ath/ath_hal/ar5210/ar5210_power.c            optional ath_hal
+dev/netif/ath/ath_hal/ar5210/ar5210_recv.c             optional ath_hal
+dev/netif/ath/ath_hal/ar5210/ar5210_reset.c            optional ath_hal
+dev/netif/ath/ath_hal/ar5210/ar5210_xmit.c             optional ath_hal
+dev/netif/ath/ath_hal/ar5211/ar5211_attach.c           optional ath_hal
+dev/netif/ath/ath_hal/ar5211/ar5211_beacon.c           optional ath_hal
+dev/netif/ath/ath_hal/ar5211/ar5211_interrupts.c       optional ath_hal
+dev/netif/ath/ath_hal/ar5211/ar5211_keycache.c                 optional ath_hal
+dev/netif/ath/ath_hal/ar5211/ar5211_misc.c             optional ath_hal
+dev/netif/ath/ath_hal/ar5211/ar5211_phy.c              optional ath_hal
+dev/netif/ath/ath_hal/ar5211/ar5211_power.c            optional ath_hal
+dev/netif/ath/ath_hal/ar5211/ar5211_recv.c             optional ath_hal
+dev/netif/ath/ath_hal/ar5211/ar5211_reset.c            optional ath_hal
+dev/netif/ath/ath_hal/ar5211/ar5211_xmit.c             optional ath_hal
+dev/netif/ath/ath_hal/ar5212/ar2413.c                  optional ath_hal
+dev/netif/ath/ath_hal/ar5212/ar2425.c                  optional ath_hal
+dev/netif/ath/ath_hal/ar5212/ar5111.c                  optional ath_hal
+dev/netif/ath/ath_hal/ar5212/ar5112.c                  optional ath_hal
+dev/netif/ath/ath_hal/ar5212/ar5212_ani.c              optional ath_hal
+dev/netif/ath/ath_hal/ar5212/ar5212_attach.c           optional ath_hal
+dev/netif/ath/ath_hal/ar5212/ar5212_beacon.c           optional ath_hal
+dev/netif/ath/ath_hal/ar5212/ar5212_eeprom.c           optional ath_hal
+dev/netif/ath/ath_hal/ar5212/ar5212_gpio.c             optional ath_hal
+dev/netif/ath/ath_hal/ar5212/ar5212_interrupts.c       optional ath_hal
+dev/netif/ath/ath_hal/ar5212/ar5212_keycache.c                 optional ath_hal
+dev/netif/ath/ath_hal/ar5212/ar5212_misc.c             optional ath_hal
+dev/netif/ath/ath_hal/ar5212/ar5212_phy.c              optional ath_hal
+dev/netif/ath/ath_hal/ar5212/ar5212_power.c            optional ath_hal
+dev/netif/ath/ath_hal/ar5212/ar5212_recv.c             optional ath_hal
+dev/netif/ath/ath_hal/ar5212/ar5212_reset.c            optional ath_hal
+dev/netif/ath/ath_hal/ar5212/ar5212_rfgain.c           optional ath_hal
+dev/netif/ath/ath_hal/ar5212/ar5212_xmit.c             optional ath_hal
+dev/netif/ath/ath_hal/ar5212/ar5413.c                  optional ath_hal
+dev/netif/ath/ath_hal/ar5416/ar2133.c                  optional ath_hal
+dev/netif/ath/ath_hal/ar5416/ar5416_ani.c              optional ath_hal
+dev/netif/ath/ath_hal/ar5416/ar5416_attach.c           optional ath_hal
+dev/netif/ath/ath_hal/ar5416/ar5416_beacon.c           optional ath_hal
+dev/netif/ath/ath_hal/ar5416/ar5416_btcoex.c           optional ath_hal
+dev/netif/ath/ath_hal/ar5416/ar5416_cal.c              optional ath_hal
+dev/netif/ath/ath_hal/ar5416/ar5416_cal_adcdc.c        optional ath_hal
+dev/netif/ath/ath_hal/ar5416/ar5416_cal_adcgain.c      optional ath_hal
+dev/netif/ath/ath_hal/ar5416/ar5416_cal_iq.c           optional ath_hal
+dev/netif/ath/ath_hal/ar5416/ar5416_eeprom.c           optional ath_hal
+dev/netif/ath/ath_hal/ar5416/ar5416_gpio.c             optional ath_hal
+dev/netif/ath/ath_hal/ar5416/ar5416_interrupts.c       optional ath_hal
+dev/netif/ath/ath_hal/ar5416/ar5416_keycache.c                 optional ath_hal
+dev/netif/ath/ath_hal/ar5416/ar5416_misc.c             optional ath_hal
+dev/netif/ath/ath_hal/ar5416/ar5416_phy.c              optional ath_hal
+dev/netif/ath/ath_hal/ar5416/ar5416_power.c            optional ath_hal
+dev/netif/ath/ath_hal/ar5416/ar5416_radar.c            optional ath_hal
+dev/netif/ath/ath_hal/ar5416/ar5416_recv.c             optional ath_hal
+dev/netif/ath/ath_hal/ar5416/ar5416_reset.c            optional ath_hal
+dev/netif/ath/ath_hal/ar5416/ar5416_spectral.c         optional ath_hal
+dev/netif/ath/ath_hal/ar5416/ar5416_xmit.c             optional ath_hal
+dev/netif/ath/ath_hal/ar9001/ar9130_attach.c           optional ath_hal
+dev/netif/ath/ath_hal/ar9001/ar9130_eeprom.c           optional ath_hal
+dev/netif/ath/ath_hal/ar9001/ar9130_phy.c              optional ath_hal
+dev/netif/ath/ath_hal/ar9001/ar9160_attach.c           optional ath_hal
+dev/netif/ath/ath_hal/ar9002/ar9280.c                  optional ath_hal
+dev/netif/ath/ath_hal/ar9002/ar9280_attach.c           optional ath_hal
+dev/netif/ath/ath_hal/ar9002/ar9280_olc.c              optional ath_hal
+dev/netif/ath/ath_hal/ar9002/ar9285.c                  optional ath_hal
+dev/netif/ath/ath_hal/ar9002/ar9285_attach.c           optional ath_hal
+dev/netif/ath/ath_hal/ar9002/ar9285_btcoex.c           optional ath_hal
+dev/netif/ath/ath_hal/ar9002/ar9285_cal.c              optional ath_hal
+dev/netif/ath/ath_hal/ar9002/ar9285_diversity.c        optional ath_hal
+dev/netif/ath/ath_hal/ar9002/ar9285_phy.c              optional ath_hal
+dev/netif/ath/ath_hal/ar9002/ar9285_reset.c            optional ath_hal
+dev/netif/ath/ath_hal/ar9002/ar9287.c                  optional ath_hal
+dev/netif/ath/ath_hal/ar9002/ar9287_attach.c           optional ath_hal
+dev/netif/ath/ath_hal/ar9002/ar9287_cal.c              optional ath_hal
+dev/netif/ath/ath_hal/ar9002/ar9287_olc.c              optional ath_hal
+dev/netif/ath/ath_hal/ar9002/ar9287_reset.c            optional ath_hal
+contrib/dev/ath/ath_hal/ar9300/ar9300_ani.c            optional ath_hal
+contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c         optional ath_hal
+contrib/dev/ath/ath_hal/ar9300/ar9300_beacon.c         optional ath_hal
+contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c         optional ath_hal
+contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c                optional ath_hal
+contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c           optional ath_hal
+contrib/dev/ath/ath_hal/ar9300/ar9300_interrupts.c     optional ath_hal
+contrib/dev/ath/ath_hal/ar9300/ar9300_keycache.c       optional ath_hal
+contrib/dev/ath/ath_hal/ar9300/ar9300_mci.c            optional ath_hal
+contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c           optional ath_hal
+contrib/dev/ath/ath_hal/ar9300/ar9300_paprd.c          optional ath_hal
+contrib/dev/ath/ath_hal/ar9300/ar9300_phy.c            optional ath_hal
+contrib/dev/ath/ath_hal/ar9300/ar9300_power.c          optional ath_hal
+contrib/dev/ath/ath_hal/ar9300/ar9300_radar.c          optional ath_hal
+contrib/dev/ath/ath_hal/ar9300/ar9300_radio.c          optional ath_hal
+contrib/dev/ath/ath_hal/ar9300/ar9300_recv.c           optional ath_hal
+contrib/dev/ath/ath_hal/ar9300/ar9300_recv_ds.c                optional ath_hal
+contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c          optional ath_hal
+contrib/dev/ath/ath_hal/ar9300/ar9300_stub.c           optional ath_hal
+contrib/dev/ath/ath_hal/ar9300/ar9300_stub_funcs.c     optional ath_hal
+contrib/dev/ath/ath_hal/ar9300/ar9300_timer.c          optional ath_hal
+contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c           optional ath_hal
+contrib/dev/ath/ath_hal/ar9300/ar9300_xmit_ds.c                optional ath_hal
+dev/netif/ath/ath_rate/amrr/amrr.c     optional ath_rate_amrr \
+       compile-with "${NORMAL_C} -I$S/dev/netif/ath/ath ${WERROR}"
+dev/netif/ath/ath_rate/onoe/onoe.c     optional ath_rate_onoe \
+       compile-with "${NORMAL_C} -I$S/dev/netif/ath/ath ${WERROR}"
+dev/netif/ath/ath_rate/sample/sample.c optional ath_rate_sample \
+       compile-with "${NORMAL_C} -I$S/dev/netif/ath/ath ${WERROR}"
+dev/netif/ath/ath/if_ath.c             optional ath \
+       compile-with "${NORMAL_C} -I$S/dev/netif/ath/ath ${WERROR}"
+dev/netif/ath/ath/if_ath_ahb.c         optional ath \
+       compile-with "${NORMAL_C} -I$S/dev/netif/ath/ath ${WERROR}"
+dev/netif/ath/ath/if_ath_alq.c         optional ath \
+       compile-with "${NORMAL_C} -I$S/dev/netif/ath/ath ${WERROR}"
+dev/netif/ath/ath/if_ath_beacon.c      optional ath \
+       compile-with "${NORMAL_C} -I$S/dev/netif/ath/ath ${WERROR}"
+dev/netif/ath/ath/if_ath_btcoex.c      optional ath \
+       compile-with "${NORMAL_C} -I$S/dev/netif/ath/ath ${WERROR}"
+dev/netif/ath/ath/if_ath_debug.c       optional ath \
+       compile-with "${NORMAL_C} -I$S/dev/netif/ath/ath ${WERROR}"
+dev/netif/ath/ath/if_ath_keycache.c    optional ath \
+       compile-with "${NORMAL_C} -I$S/dev/netif/ath/ath ${WERROR}"
+dev/netif/ath/ath/if_ath_led.c         optional ath \
+       compile-with "${NORMAL_C} -I$S/dev/netif/ath/ath ${WERROR}"
+dev/netif/ath/ath/if_ath_lna_div.c     optional ath \
+       compile-with "${NORMAL_C} -I$S/dev/netif/ath/ath ${WERROR}"
+dev/netif/ath/ath/if_ath_pci.c         optional ath pci \
+       compile-with "${NORMAL_C} -I$S/dev/netif/ath/ath ${WERROR}"
+dev/netif/ath/ath/if_ath_rx.c          optional ath \
+       compile-with "${NORMAL_C} -I$S/dev/netif/ath/ath ${WERROR}"
+dev/netif/ath/ath/if_ath_rx_edma.c     optional ath \
+       compile-with "${NORMAL_C} -I$S/dev/netif/ath/ath ${WERROR}"
+dev/netif/ath/ath/if_ath_spectral.c    optional ath \
+       compile-with "${NORMAL_C} -I$S/dev/netif/ath/ath ${WERROR}"
+dev/netif/ath/ath/if_ath_sysctl.c      optional ath \
+       compile-with "${NORMAL_C} -I$S/dev/netif/ath/ath ${WERROR}"
+dev/netif/ath/ath/if_ath_tdma.c                optional ath \
+       compile-with "${NORMAL_C} -I$S/dev/netif/ath/ath ${WERROR}"
+dev/netif/ath/ath/if_ath_tx.c          optional ath \
+       compile-with "${NORMAL_C} -I$S/dev/netif/ath/ath ${WERROR}"
+dev/netif/ath/ath/if_ath_tx_edma.c     optional ath \
+       compile-with "${NORMAL_C} -I$S/dev/netif/ath/ath ${WERROR}"
+dev/netif/ath/ath/if_ath_tx_ht.c       optional ath \
+       compile-with "${NORMAL_C} -I$S/dev/netif/ath/ath ${WERROR}"
+dev/netif/ath/ath_dfs/null/dfs_null.c  optional ath \
+       compile-with "${NORMAL_C} -I$S/dev/netif/ath/ath ${WERROR}"
 dev/netif/alc/if_alc.c                 optional alc
 dev/netif/ale/if_ale.c                 optional ale
 dev/netif/bce/if_bce.c                 optional bce
index a7d0f59..776639d 100644 (file)
@@ -49,8 +49,8 @@ INCLUDES+= -I/usr/include
 .include "$S/conf/acpi.mk"
 INCLUDES+= -I${.OBJDIR} -I"$S/${OSACPI_MI_DIR}" -I"$S/${ACPICA_DIR}/include"
 
-## ... and the same for Atheros HAL
-##INCLUDES+= -I$S/dev/netif/ath/ath_hal
+# ... and the same for Atheros HAL
+INCLUDES+= -I$S/dev/netif/ath/ath_hal -I$S/contrib/dev/ath/ath_hal
 
 # Same thing for drm includes
 INCLUDES+= -I$S/dev/drm/include
index 3d72312..dda8c28 100644 (file)
@@ -604,12 +604,36 @@ NTFS_DEBUG                        opt_ntfs.h
 
 # options for the Atheros driver
 ATH_DEBUG              opt_ath.h
+#ATH_DEBUG_ALQ         opt_ath.h
 ATH_DIAGAPI            opt_ath.h
+#ATH_EEPROM_FIRMWARE   opt_ath.h
+#ATH_ENABLE_11N                opt_ath.h
+ATH_ENABLE_DFS         opt_ath.h
+#ATH_ENABLE_RADIOTAP_VENDOR_EXT opt_ath.h
+ATH_KTR_INTR_DEBUG     opt_ath.h
 ATH_RXBUF              opt_ath.h
+#ATH_TX99_DIAG         opt_ath.h
 ATH_TXBUF              opt_ath.h
 
 # ...and its HAL
+AH_AR5416_INTERRUPT_MITIGATION opt_ah.h
+AH_ASSERT              opt_ah.h
+AH_DEBUG               opt_ah.h
+#AH_DEBUG_ALQ          opt_ah.h
+#AH_DEBUG_COUNTRY      opt_ah.h
+AH_INTERRUPT_DEBUGGING opt_ah.h
+AH_MAXCHAN             opt_ah.h
+AH_NEED_DESC_SWAP      opt_ah.h
+AH_PRIVATE_DIAG                opt_ah.h
+AH_REGOPS_FUNC         opt_ah.h
+AH_RXCFG_SDMAMW_4BYTES opt_ah.h
 AH_SUPPORT_AR5416      opt_ah.h
+AH_SUPPORT_AR9130      opt_ah.h
+AH_SUPPORT_AR9330      opt_ah.h
+AH_SUPPORT_AR9340      opt_ah.h
+AH_USE_INIPDGAIN       opt_ah.h
+#AH_WRITE_EEPROM               opt_ah.h
+#AH_WRITE_REGDOMAIN    opt_ah.h
 
 # bce driver
 BCE_RSS_DEBUG          opt_bce.h
index cc168b9..e8f5c02 100644 (file)
@@ -294,10 +294,10 @@ device            wlan_wep        # 802.11 WEP support
 # card for a manually chosen I/O address and IRQ, you must specify
 # those parameters here.
 device         an
-#device                ath             # Atheros NICs
-#device                ath_hal         # Atheros Hardware Access Layer
-#options       AH_SUPPORT_AR5416       # enable AR5416 tx/rx descriptors
-#device                ath_rate_sample # Atheros Sample TX rate control algorithm
+device         ath             # Atheros NICs
+device         ath_hal         # Atheros Hardware Access Layer
+options        AH_SUPPORT_AR5416       # enable AR5416 tx/rx descriptors
+device         ath_rate_sample # Atheros Sample TX rate control algorithm
 device         ral             # Ralink Technology 802.11 wireless NIC
 device         iwn             # Intel
 #device                rtw             # RealTek 802.11 wireless NIC
index dd145f1..f3b6c02 100644 (file)
@@ -1337,13 +1337,28 @@ device          wlan_xauth      # 802.11 WPA or 802.1x authentication for AP
 device         wlan_amrr       # 802.11 AMRR TX rate control algorithm
 device         an              # Aironet Communications 4500/4800
 device         ath             # Atheros AR521x
-options        AH_SUPPORT_AR5416
+options                AH_AR5416_INTERRUPT_MITIGATION
+options                AH_ASSERT
+options                AH_DEBUG
+options                AH_INTERRUPT_DEBUGGING
+options                AH_MAXCHAN=96
+options                AH_NEED_DESC_SWAP
+options                AH_PRIVATE_DIAG
+options                AH_REGOPS_FUNC
+options                AH_RXCFG_SDMAMW_4BYTES
+options                AH_SUPPORT_AR5416
+options                AH_SUPPORT_AR9130
+options                AH_SUPPORT_AR9330
+options                AH_SUPPORT_AR9340
+options                AH_USE_INIPDGAIN
 device         ath_hal         # Atheros Hardware Access Layer
 #device                ath_rate_amrr   # Atheros AMRR TX rate control algorithm
 #device                ath_rate_onoe   # Atheros Onoe TX rate control algorithm
 device         ath_rate_sample # Atheros Sample TX rate control algorithm
 options                ATH_DEBUG       # turn on debugging output (see hw.ath.debug)
 options                ATH_DIAGAPI     # diagnostic interface to the HAL
+options                ATH_ENABLE_DFS
+options                ATH_KTR_INTR_DEBUG
 options                ATH_RXBUF=80    # number of RX buffers to allocate
 options                ATH_TXBUF=400   # number of TX buffers to allocate
 #device                iwl             # Intel PRO/Wireless 2100
index 5a8125e..5cd1d5c 100644 (file)
@@ -1202,13 +1202,28 @@ device          wlan_xauth      # 802.11 WPA or 802.1x authentication for AP
 device         wlan_amrr       # 802.11 AMRR TX rate control algorithm
 device         an              # Aironet Communications 4500/4800
 device         ath             # Atheros AR521x
-options        AH_SUPPORT_AR5416
+options                AH_AR5416_INTERRUPT_MITIGATION
+options                AH_ASSERT
+options                AH_DEBUG
+options                AH_INTERRUPT_DEBUGGING
+options                AH_MAXCHAN=96
+options                AH_NEED_DESC_SWAP
+options                AH_PRIVATE_DIAG
+options                AH_REGOPS_FUNC
+options                AH_RXCFG_SDMAMW_4BYTES
+options                AH_SUPPORT_AR5416
+options                AH_SUPPORT_AR9130
+options                AH_SUPPORT_AR9330
+options                AH_SUPPORT_AR9340
+options                AH_USE_INIPDGAIN
 device         ath_hal         # Atheros Hardware Access Layer
 #device                ath_rate_amrr   # Atheros AMRR TX rate control algorithm
 #device                ath_rate_onoe   # Atheros Onoe TX rate control algorithm
 device         ath_rate_sample # Atheros Sample TX rate control algorithm
 options                ATH_DEBUG       # turn on debugging output (see hw.ath.debug)
 options                ATH_DIAGAPI     # diagnostic interface to the HAL
+options                ATH_ENABLE_DFS
+options                ATH_KTR_INTR_DEBUG
 options                ATH_RXBUF=80    # number of RX buffers to allocate
 options                ATH_TXBUF=400   # number of TX buffers to allocate
 #device                iwl             # Intel PRO/Wireless 2100
index db99db9..a582b69 100644 (file)
@@ -270,10 +270,10 @@ device            wlan_wep        # 802.11 WEP support
 # card for a manually chosen I/O address and IRQ, you must specify
 # those parameters here.
 device         an
-#device                ath             # Atheros NICs
-#device                ath_hal         # Atheros Hardware Access Layer
-#options       AH_SUPPORT_AR5416       # enable AR5416 tx/rx descriptors
-#device                ath_rate_sample # Atheros Sample TX rate control algorithm
+device         ath             # Atheros NICs
+device         ath_hal         # Atheros Hardware Access Layer
+options        AH_SUPPORT_AR5416       # enable AR5416 tx/rx descriptors
+device         ath_rate_sample # Atheros Sample TX rate control algorithm
 device         ral             # Ralink Technology 802.11 wireless NIC
 device         iwn             # Intel
 #device                rtw             # RealTek 802.11 wireless NIC
index 5660c1f..2d9f4a2 100644 (file)
@@ -285,7 +285,7 @@ ar9300_gpio_cfg_output_led_off(
         AR_GPIO_OUTPUT_MUX_AS_SMARTANT_CTRL1,
         AR_GPIO_OUTPUT_MUX_AS_SMARTANT_CTRL2
     };
-    HALASSERT(gpio < AH_PRIVATE(ah)->ah_caps.hal_num_gpio_pins);
+    HALASSERT(gpio < AH_PRIVATE(ah)->ah_caps.halNumGpioPins);
 
     /* Convert HAL signal type definitions to hardware-specific values. */
     if ((int) halSignalType < ARRAY_LENGTH(mux_signal_conversion_table))
index ab39284..9eda1a9 100644 (file)
@@ -699,7 +699,7 @@ ar9300_stop_tx_dma_indv_que(struct ath_hal *ah, u_int q, u_int timeout)
 #define AH_TIME_QUANTUM        100     /* usec */
     u_int wait;
 
-    HALASSERT(q < AH_PRIVATE(ah)->ah_caps.hal_total_queues);
+    HALASSERT(q < AH_PRIVATE(ah)->ah_caps.halTotalQueues);
 
     HALASSERT(AH9300(ah)->ah_txq[q].tqi_type != HAL_TX_QUEUE_INACTIVE);
 
index 9244c6e..0e59bb9 100644 (file)
@@ -139,9 +139,9 @@ enum Ar9300EepromTemplate
 #define OSPREY_CUSTOMER_DATA_SIZE    20
 
 #define FREQ2FBIN(x,y) \
-    (((y) == HAL_FREQ_BAND_2GHZ) ? ((x) - 2300) : (((x) - 4800) / 5))
+    (((uintmax_t)(y) == (uintmax_t)HAL_FREQ_BAND_2GHZ) ? ((x) - 2300) : (((x) - 4800) / 5))
 #define FBIN2FREQ(x,y) \
-    (((y) == HAL_FREQ_BAND_2GHZ) ? (2300 + x) : (4800 + 5 * x))
+    (((uintmax_t)(y) == (uintmax_t)HAL_FREQ_BAND_2GHZ) ? (2300 + x) : (4800 + 5 * x))
 #define OSPREY_MAX_CHAINS            3
 #define OSPREY_ANT_16S               25
 #define OSPREY_FUTURE_MODAL_SZ       6
index 888a1bb..6333f83 100644 (file)
@@ -229,6 +229,8 @@ static int  ath_node_set_tim(struct ieee80211_node *, int);
 #include <dev/netif/ath/ath/if_ath_tdma.h>
 #endif
 
+extern const char* ath_hal_ether_sprintf(const u_int8_t *mac);
+
 SYSCTL_DECL(_hw_ath);
 
 /* XXX validate sysctl values */
@@ -2729,7 +2731,9 @@ ath_getbuf(struct ath_softc *sc, ath_buf_type_t btype)
                bf = _ath_getbuf_locked(sc, ATH_BUFTYPE_NORMAL);
        ATH_TXBUF_UNLOCK(sc);
        if (bf == NULL) {
+#if 0
                struct ifnet *ifp = sc->sc_ifp;
+#endif
 
                DPRINTF(sc, ATH_DEBUG_XMIT, "%s: stop queue\n", __func__);
                sc->sc_stats.ast_tx_qstop++;
@@ -3138,12 +3142,14 @@ ath_mode_init(struct ath_softc *sc)
        /* configure operational mode */
        ath_hal_setopmode(ah);
 
+#if 0
        DPRINTF(sc, ATH_DEBUG_STATE | ATH_DEBUG_MODE,
            "%s: ah=%p, ifp=%p, if_addr=%p\n",
            __func__,
            ah,
            ifp,
            (ifp == NULL) ? NULL : ifp->if_addr);
+#endif
 
        /* handle any link-level address change */
        ath_hal_setmac(ah, IF_LLADDR(ifp));
@@ -3658,7 +3664,8 @@ ath_node_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN])
        /* XXX setup ath_tid */
        ath_tx_tid_init(sc, an);
 
-       DPRINTF(sc, ATH_DEBUG_NODE, "%s: %6D: an %p\n", __func__, mac, ":", an);
+       DPRINTF(sc, ATH_DEBUG_NODE, "%s: %s: an %p\n", __func__,
+           ath_hal_ether_sprintf(mac), an);
        return &an->an_node;
 }
 
@@ -3668,8 +3675,8 @@ ath_node_cleanup(struct ieee80211_node *ni)
        struct ieee80211com *ic = ni->ni_ic;
        struct ath_softc *sc = ic->ic_ifp->if_softc;
 
-       DPRINTF(sc, ATH_DEBUG_NODE, "%s: %6D: an %p\n", __func__,
-           ni->ni_macaddr, ":", ATH_NODE(ni));
+       DPRINTF(sc, ATH_DEBUG_NODE, "%s: %s: an %p\n", __func__,
+           ath_hal_ether_sprintf(ni->ni_macaddr), ATH_NODE(ni));
 
        /* Cleanup ath_tid, free unused bufs, unlink bufs in TXQ */
        ath_tx_node_flush(sc, ATH_NODE(ni));
@@ -3683,8 +3690,8 @@ ath_node_free(struct ieee80211_node *ni)
        struct ieee80211com *ic = ni->ni_ic;
        struct ath_softc *sc = ic->ic_ifp->if_softc;
 
-       DPRINTF(sc, ATH_DEBUG_NODE, "%s: %6D: an %p\n", __func__,
-           ni->ni_macaddr, ":", ATH_NODE(ni));
+       DPRINTF(sc, ATH_DEBUG_NODE, "%s: %s: an %p\n", __func__,
+           ath_hal_ether_sprintf(ni->ni_macaddr), ATH_NODE(ni));
 #if 0
        mtx_destroy(&ATH_NODE(ni)->an_mtx);
 #endif
@@ -4317,7 +4324,9 @@ static void
 ath_tx_proc_q0(void *arg, int npending)
 {
        struct ath_softc *sc = arg;
+#if 0
        struct ifnet *ifp = sc->sc_ifp;
+#endif
        uint32_t txqs;
 
        wlan_serialize_enter();
@@ -4362,7 +4371,9 @@ static void
 ath_tx_proc_q0123(void *arg, int npending)
 {
        struct ath_softc *sc = arg;
+#if 0
        struct ifnet *ifp = sc->sc_ifp;
+#endif
        int nacked;
        uint32_t txqs;
 
@@ -4419,7 +4430,9 @@ static void
 ath_tx_proc(void *arg, int npending)
 {
        struct ath_softc *sc = arg;
+#if 0
        struct ifnet *ifp = sc->sc_ifp;
+#endif
        int i, nacked;
        uint32_t txqs;
 
@@ -4897,7 +4910,9 @@ void
 ath_legacy_tx_drain(struct ath_softc *sc, ATH_RESET_TYPE reset_type)
 {
        struct ath_hal *ah = sc->sc_ah;
+#ifdef ATH_DEBUG
        struct ifnet *ifp = sc->sc_ifp;
+#endif
        int i;
        struct ath_buf *bf_last;
 
@@ -5685,10 +5700,9 @@ ath_newassoc(struct ieee80211_node *ni, int isnew)
         */
        if (! isnew) {
                DPRINTF(sc, ATH_DEBUG_NODE,
-                   "%s: %6D: reassoc; is_powersave=%d\n",
+                   "%s: %s: reassoc; is_powersave=%d\n",
                    __func__,
-                   ni->ni_macaddr,
-                   ":",
+                   ath_hal_ether_sprintf(ni->ni_macaddr),
                    an->an_is_powersave);
 
                /* XXX for now, we can't hold the lock across assoc */
@@ -6244,10 +6258,9 @@ ath_node_powersave(struct ieee80211_node *ni, int enable)
 
        /* XXX and no TXQ locks should be held here */
 
-       DPRINTF(sc, ATH_DEBUG_NODE_PWRSAVE, "%s: %6D: enable=%d\n",
+       DPRINTF(sc, ATH_DEBUG_NODE_PWRSAVE, "%s: %6s: enable=%d\n",
            __func__,
-           ni->ni_macaddr,
-           ":",
+           ath_hal_ether_sprintf(ni->ni_macaddr),
            !! enable);
 
        /* Suspend or resume software queue handling */
@@ -6346,18 +6359,16 @@ ath_node_set_tim(struct ieee80211_node *ni, int enable)
         */
        if (enable && an->an_tim_set == 1) {
                DPRINTF(sc, ATH_DEBUG_NODE_PWRSAVE,
-                   "%s: %6D: enable=%d, tim_set=1, ignoring\n",
+                   "%s: %s: enable=%d, tim_set=1, ignoring\n",
                    __func__,
-                   ni->ni_macaddr,
-                   ":",
+                   ath_hal_ether_sprintf(ni->ni_macaddr),
                    enable);
                ATH_TX_UNLOCK(sc);
        } else if (enable) {
                DPRINTF(sc, ATH_DEBUG_NODE_PWRSAVE,
-                   "%s: %6D: enable=%d, enabling TIM\n",
+                   "%s: %s: enable=%d, enabling TIM\n",
                    __func__,
-                   ni->ni_macaddr,
-                   ":",
+                   ath_hal_ether_sprintf(ni->ni_macaddr),
                    enable);
                an->an_tim_set = 1;
                ATH_TX_UNLOCK(sc);
@@ -6365,10 +6376,9 @@ ath_node_set_tim(struct ieee80211_node *ni, int enable)
        } else if (an->an_swq_depth == 0) {
                /* disable */
                DPRINTF(sc, ATH_DEBUG_NODE_PWRSAVE,
-                   "%s: %6D: enable=%d, an_swq_depth == 0, disabling\n",
+                   "%s: %s: enable=%d, an_swq_depth == 0, disabling\n",
                    __func__,
-                   ni->ni_macaddr,
-                   ":",
+                   ath_hal_ether_sprintf(ni->ni_macaddr),
                    enable);
                an->an_tim_set = 0;
                ATH_TX_UNLOCK(sc);
@@ -6378,10 +6388,9 @@ ath_node_set_tim(struct ieee80211_node *ni, int enable)
                 * disable regardless; the node isn't in powersave now
                 */
                DPRINTF(sc, ATH_DEBUG_NODE_PWRSAVE,
-                   "%s: %6D: enable=%d, an_pwrsave=0, disabling\n",
+                   "%s: %s: enable=%d, an_pwrsave=0, disabling\n",
                    __func__,
-                   ni->ni_macaddr,
-                   ":",
+                   ath_hal_ether_sprintf(ni->ni_macaddr),
                    enable);
                an->an_tim_set = 0;
                ATH_TX_UNLOCK(sc);
@@ -6394,10 +6403,9 @@ ath_node_set_tim(struct ieee80211_node *ni, int enable)
                 */
                ATH_TX_UNLOCK(sc);
                DPRINTF(sc, ATH_DEBUG_NODE_PWRSAVE,
-                   "%s: %6D: enable=%d, an_swq_depth > 0, ignoring\n",
+                   "%s: %s: enable=%d, an_swq_depth > 0, ignoring\n",
                    __func__,
-                   ni->ni_macaddr,
-                   ":",
+                   ath_hal_ether_sprintf(ni->ni_macaddr),
                    enable);
                changed = 0;
        }
@@ -6467,10 +6475,9 @@ ath_tx_update_tim(struct ath_softc *sc, struct ieee80211_node *ni,
                    an->an_tim_set == 0 &&
                    an->an_swq_depth != 0) {
                        DPRINTF(sc, ATH_DEBUG_NODE_PWRSAVE,
-                           "%s: %6D: swq_depth>0, tim_set=0, set!\n",
+                           "%s: %s: swq_depth>0, tim_set=0, set!\n",
                            __func__,
-                           ni->ni_macaddr,
-                           ":");
+                           ath_hal_ether_sprintf(ni->ni_macaddr));
                        an->an_tim_set = 1;
                        (void) avp->av_set_tim(ni, 1);
                }
@@ -6486,11 +6493,10 @@ ath_tx_update_tim(struct ath_softc *sc, struct ieee80211_node *ni,
                    an->an_tim_set == 1 &&
                    an->an_swq_depth == 0) {
                        DPRINTF(sc, ATH_DEBUG_NODE_PWRSAVE,
-                           "%s: %6D: swq_depth=0, tim_set=1, psq_set=0,"
+                           "%s: %s: swq_depth=0, tim_set=1, psq_set=0,"
                            " clear!\n",
                            __func__,
-                           ni->ni_macaddr,
-                           ":");
+                           ath_hal_ether_sprintf(ni->ni_macaddr));
                        an->an_tim_set = 0;
                        (void) avp->av_set_tim(ni, 0);
                }
index 83597af..edd53f2 100644 (file)
@@ -83,10 +83,14 @@ enum {
        ATH_KTR_TX              = 0x00000080,
 };
 
+#ifdef __DragonFly__           /* XXX: port to our ktr */
+#define        ATH_KTR(_sc, _km, _kf, ...)     do { } while (0)
+#else
 #define        ATH_KTR(_sc, _km, _kf, ...)     do {    \
        if (sc->sc_ktrdebug & (_km))            \
                CTR##_kf(KTR_DEV, __VA_ARGS__); \
        } while (0)
+#endif
 
 extern uint64_t ath_debug;
 
index 1db07ec..0a654b5 100644 (file)
@@ -76,6 +76,8 @@
 #include <dev/netif/ath/ath/if_ath_debug.h>
 #include <dev/netif/ath/ath/if_ath_keycache.h>
 
+extern  const char* ath_hal_ether_sprintf(const uint8_t *mac);
+
 #ifdef ATH_DEBUG
 static void
 ath_keyprint(struct ath_softc *sc, const char *tag, u_int ix,
index 32cb267..833caae 100644 (file)
@@ -720,12 +720,12 @@ ath_sysctlattach(struct ath_softc *sc)
                "EEPROM regdomain code");
 #ifdef ATH_DEBUG
        SYSCTL_ADD_QUAD(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
-               "debug", CTLFLAG_RW, &sc->sc_debug,
+               "debug", CTLFLAG_RW, &sc->sc_debug, 0,
                "control debugging printfs");
 #endif
 #ifdef ATH_DEBUG_ALQ
        SYSCTL_ADD_QUAD(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
-               "ktrdebug", CTLFLAG_RW, &sc->sc_ktrdebug,
+               "ktrdebug", CTLFLAG_RW, &sc->sc_ktrdebug, 0,
                "control debugging KTR");
 #endif /* ATH_DEBUG_ALQ */
        SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
index 87ef52f..785e320 100644 (file)
@@ -471,19 +471,19 @@ ath_tdma_update(struct ieee80211_node *ni,
        tsfdelta = (int32_t)((nextslot % TU_TO_TSF(HAL_BEACON_PERIOD + 1)) - nexttbtt);
 
        DPRINTF(sc, ATH_DEBUG_TDMA_TIMER,
-           "rs->rstamp %llu rstamp %llu tsf %llu txtime %d, nextslot %llu, "
+           "rs->rstamp %ju rstamp %ju tsf %ju txtime %d, nextslot %ju, "
            "nextslottu %d, nextslottume %d\n",
-           (unsigned long long) rs->rs_tstamp, rstamp, tsf, txtime,
-           nextslot, nextslottu, TSF_TO_TU(nextslot >> 32, nextslot));
+           (uintmax_t)rs->rs_tstamp, (uintmax_t)rstamp, (uintmax_t)tsf, txtime,
+           (uintmax_t)nextslot, nextslottu, TSF_TO_TU(nextslot >> 32, nextslot));
        DPRINTF(sc, ATH_DEBUG_TDMA,
-           "  beacon tstamp: %llu (0x%016llx)\n",
-           le64toh(ni->ni_tstamp.tsf),
-           le64toh(ni->ni_tstamp.tsf));
+           "  beacon tstamp: %ju (0x%016jx)\n",
+           (uintmax_t)le64toh(ni->ni_tstamp.tsf),
+           (uintmax_t)le64toh(ni->ni_tstamp.tsf));
 
        DPRINTF(sc, ATH_DEBUG_TDMA_TIMER,
-           "nexttbtt %llu (0x%08llx) tsfdelta %d avg +%d/-%d\n",
-           nexttbtt,
-           (long long) nexttbtt,
+           "nexttbtt %ju (0x%08jx) tsfdelta %d avg +%d/-%d\n",
+           (uintmax_t)nexttbtt,
+           (uintmax_t)nexttbtt,
            tsfdelta,
            TDMA_AVG(sc->sc_avgtsfdeltap), TDMA_AVG(sc->sc_avgtsfdeltam));
 
@@ -574,9 +574,9 @@ ath_tdma_update(struct ieee80211_node *ni,
                tsf = ath_hal_gettsf64(ah);
                ath_hal_settsf64(ah, tsf + tsfdelta);
                DPRINTF(sc, ATH_DEBUG_TDMA_TIMER,
-                   "%s: calling ath_hal_adjusttsf: TSF=%llu, tsfdelta=%d\n",
+                   "%s: calling ath_hal_adjusttsf: TSF=%ju, tsfdelta=%d\n",
                    __func__,
-                   tsf,
+                   (uintmax_t)tsf,
                    tsfdelta);
 
 #ifdef ATH_DEBUG_ALQ
index cab5eba..e61cae7 100644 (file)
 #include <dev/netif/ath/ath/if_ath_alq.h>
 #endif
 
+extern  const char* ath_hal_ether_sprintf(const uint8_t *mac);
+
 /*
  * How many retries to perform in software
  */
@@ -1456,9 +1458,10 @@ ath_tx_should_swq_frame(struct ath_softc *sc, struct ath_node *an,
                 * for now!
                 */
                DPRINTF(sc, ATH_DEBUG_XMIT, 
-                   "%s: %6D: Node is asleep; sending mgmt "
+                   "%s: %s: Node is asleep; sending mgmt "
                    "(type=%d, subtype=%d)\n",
-                   __func__, ni->ni_macaddr, ":", type, subtype);
+                   __func__, ath_hal_ether_sprintf(ni->ni_macaddr),
+                   type, subtype);
                return (0);
        } else {
                return (1);
@@ -2751,10 +2754,9 @@ ath_tx_leak_count_update(struct ath_softc *sc, struct ath_tid *tid,
                        wh->i_fc[1] &= ~IEEE80211_FC1_MORE_DATA;
 
                DPRINTF(sc, ATH_DEBUG_NODE_PWRSAVE,
-                   "%s: %6D: leak count = %d, psq=%d, swq=%d, MORE=%d\n",
+                   "%s: %s: leak count = %d, psq=%d, swq=%d, MORE=%d\n",
                    __func__,
-                   tid->an->an_node.ni_macaddr,
-                   ":",
+                   ath_hal_ether_sprintf(tid->an->an_node.ni_macaddr),
                    tid->an->an_leak_count,
                    tid->an->an_stack_psq,
                    tid->an->an_swq_depth,
@@ -3239,8 +3241,8 @@ ath_tx_tid_resume(struct ath_softc *sc, struct ath_tid *tid)
         */
        if (tid->paused == 0) {
                DPRINTF(sc, ATH_DEBUG_SW_TX_CTRL,
-                   "%s: %6D: paused=0?\n", __func__,
-                   tid->an->an_node.ni_macaddr, ":");
+                   "%s: %s: paused=0?\n", __func__,
+                   ath_hal_ether_sprintf(tid->an->an_node.ni_macaddr));
        } else {
                tid->paused--;
        }
@@ -3510,16 +3512,16 @@ ath_tx_tid_bar_unsuspend(struct ath_softc *sc, struct ath_tid *tid)
        ATH_TX_LOCK_ASSERT(sc);
 
        DPRINTF(sc, ATH_DEBUG_SW_TX_BAR,
-           "%s: %6D: TID=%d, called\n",
+           "%s: %s: TID=%d, called\n",
            __func__,
-           tid->an->an_node.ni_macaddr,
-           ":",
+           ath_hal_ether_sprintf(tid->an->an_node.ni_macaddr),
            tid->tid);
 
        if (tid->bar_tx == 0 || tid->bar_wait == 0) {
                DPRINTF(sc, ATH_DEBUG_SW_TX_BAR,
-                   "%s: %6D: TID=%d, bar_tx=%d, bar_wait=%d: ?\n",
-                   __func__, tid->an->an_node.ni_macaddr, ":",
+                   "%s: %s: TID=%d, bar_tx=%d, bar_wait=%d: ?\n",
+                   __func__,
+                   ath_hal_ether_sprintf(tid->an->an_node.ni_macaddr),
                    tid->tid, tid->bar_tx, tid->bar_wait);
        }
 
@@ -3542,10 +3544,9 @@ ath_tx_tid_bar_tx_ready(struct ath_softc *sc, struct ath_tid *tid)
                return (0);
 
        DPRINTF(sc, ATH_DEBUG_SW_TX_BAR,
-           "%s: %6D: TID=%d, bar ready\n",
+           "%s: %s: TID=%d, bar ready\n",
            __func__,
-           tid->an->an_node.ni_macaddr,
-           ":",
+           ath_hal_ether_sprintf(tid->an->an_node.ni_macaddr),
            tid->tid);
 
        return (1);
@@ -3571,10 +3572,9 @@ ath_tx_tid_bar_tx(struct ath_softc *sc, struct ath_tid *tid)
        ATH_TX_LOCK_ASSERT(sc);
 
        DPRINTF(sc, ATH_DEBUG_SW_TX_BAR,
-           "%s: %6D: TID=%d, called\n",
+           "%s: %s: TID=%d, called\n",
            __func__,
-           tid->an->an_node.ni_macaddr,
-           ":",
+           ath_hal_ether_sprintf(tid->an->an_node.ni_macaddr),
            tid->tid);
 
        tap = ath_tx_get_tx_tid(tid->an, tid->tid);
@@ -3584,8 +3584,9 @@ ath_tx_tid_bar_tx(struct ath_softc *sc, struct ath_tid *tid)
         */
        if (tid->bar_wait == 0 || tid->bar_tx == 1) {
                DPRINTF(sc, ATH_DEBUG_SW_TX_BAR,
-                   "%s: %6D: TID=%d, bar_tx=%d, bar_wait=%d: ?\n",
-                   __func__, tid->an->an_node.ni_macaddr, ":",
+                   "%s: %s: TID=%d, bar_tx=%d, bar_wait=%d: ?\n",
+                   __func__,
+                   ath_hal_ether_sprintf(tid->an->an_node.ni_macaddr),
                    tid->tid, tid->bar_tx, tid->bar_wait);
                return;
        }
@@ -3593,10 +3594,9 @@ ath_tx_tid_bar_tx(struct ath_softc *sc, struct ath_tid *tid)
        /* Don't do anything if we still have pending frames */
        if (tid->hwq_depth > 0) {
                DPRINTF(sc, ATH_DEBUG_SW_TX_BAR,
-                   "%s: %6D: TID=%d, hwq_depth=%d, waiting\n",
+                   "%s: %s: TID=%d, hwq_depth=%d, waiting\n",
                    __func__,
-                   tid->an->an_node.ni_macaddr,
-                   ":",
+                   ath_hal_ether_sprintf(tid->an->an_node.ni_macaddr),
                    tid->tid,
                    tid->hwq_depth);
                return;
@@ -3618,10 +3618,9 @@ ath_tx_tid_bar_tx(struct ath_softc *sc, struct ath_tid *tid)
         * XXX verify this is _actually_ the valid value to begin at!
         */
        DPRINTF(sc, ATH_DEBUG_SW_TX_BAR,
-           "%s: %6D: TID=%d, new BAW left edge=%d\n",
+           "%s: %s: TID=%d, new BAW left edge=%d\n",
            __func__,
-           tid->an->an_node.ni_macaddr,
-           ":",
+           ath_hal_ether_sprintf(tid->an->an_node.ni_macaddr),
            tid->tid,
            tap->txa_start);
 
@@ -3638,8 +3637,8 @@ ath_tx_tid_bar_tx(struct ath_softc *sc, struct ath_tid *tid)
        /* Failure? For now, warn loudly and continue */
        ATH_TX_LOCK(sc);
        DPRINTF(sc, ATH_DEBUG_SW_TX_BAR,
-           "%s: %6D: TID=%d, failed to TX BAR, continue!\n",
-           __func__, tid->an->an_node.ni_macaddr, ":",
+           "%s: %s: TID=%d, failed to TX BAR, continue!\n",
+           __func__, ath_hal_ether_sprintf(tid->an->an_node.ni_macaddr),
            tid->tid);
        ath_tx_tid_bar_unsuspend(sc, tid);
 }
@@ -3696,48 +3695,44 @@ ath_tx_tid_drain_print(struct ath_softc *sc, struct ath_node *an,
        tap = ath_tx_get_tx_tid(an, tid->tid);
 
        DPRINTF(sc, ATH_DEBUG_SW_TX,
-           "%s: %s: %6D: bf=%p: addbaw=%d, dobaw=%d, "
+           "%s: %s: %s: bf=%p: addbaw=%d, dobaw=%d, "
            "seqno=%d, retry=%d\n",
            __func__,
            pfx,
-           ni->ni_macaddr,
-           ":",
+           ath_hal_ether_sprintf(ni->ni_macaddr),
            bf,
            bf->bf_state.bfs_addedbaw,
            bf->bf_state.bfs_dobaw,
            SEQNO(bf->bf_state.bfs_seqno),
            bf->bf_state.bfs_retries);
        DPRINTF(sc, ATH_DEBUG_SW_TX,
-           "%s: %s: %6D: bf=%p: txq[%d] axq_depth=%d, axq_aggr_depth=%d\n",
+           "%s: %s: %s: bf=%p: txq[%d] axq_depth=%d, axq_aggr_depth=%d\n",
            __func__,
            pfx,
-           ni->ni_macaddr,
-           ":",
+           ath_hal_ether_sprintf(ni->ni_macaddr),
            bf,
            txq->axq_qnum,
            txq->axq_depth,
            txq->axq_aggr_depth);
        DPRINTF(sc, ATH_DEBUG_SW_TX,
-           "%s: %s: %6D: bf=%p: tid txq_depth=%d hwq_depth=%d, bar_wait=%d, "
+           "%s: %s: %s: bf=%p: tid txq_depth=%d hwq_depth=%d, bar_wait=%d, "
              "isfiltered=%d\n",
            __func__,
            pfx,
-           ni->ni_macaddr,
-           ":",
+           ath_hal_ether_sprintf(ni->ni_macaddr),
            bf,
            tid->axq_depth,
            tid->hwq_depth,
            tid->bar_wait,
            tid->isfiltered);
        DPRINTF(sc, ATH_DEBUG_SW_TX,
-           "%s: %s: %6D: tid %d: "
+           "%s: %s: %s: tid %d: "
            "sched=%d, paused=%d, "
            "incomp=%d, baw_head=%d, "
            "baw_tail=%d txa_start=%d, ni_txseqs=%d\n",
             __func__,
             pfx,
-            ni->ni_macaddr,
-            ":",
+            ath_hal_ether_sprintf(ni->ni_macaddr),
             tid->tid,
             tid->sched, tid->paused,
             tid->incomp, tid->baw_head,
@@ -3837,10 +3832,9 @@ ath_tx_tid_drain(struct ath_softc *sc, struct ath_node *an,
        if (tap) {
 #if 1
                DPRINTF(sc, ATH_DEBUG_SW_TX_CTRL,
-                   "%s: %6D: node %p: TID %d: sliding BAW left edge to %d\n",
+                   "%s: %s: node %p: TID %d: sliding BAW left edge to %d\n",
                    __func__,
-                   ni->ni_macaddr,
-                   ":",
+                   ath_hal_ether_sprintf(ni->ni_macaddr),
                    an,
                    tid->tid,
                    tap->txa_start);
@@ -3938,11 +3932,10 @@ ath_tx_node_flush(struct ath_softc *sc, struct ath_node *an)
 
        ATH_TX_LOCK(sc);
        DPRINTF(sc, ATH_DEBUG_NODE,
-           "%s: %6D: flush; is_powersave=%d, stack_psq=%d, tim=%d, "
+           "%s: %s: flush; is_powersave=%d, stack_psq=%d, tim=%d, "
            "swq_depth=%d, clrdmask=%d, leak_count=%d\n",
            __func__,
-           an->an_node.ni_macaddr,
-           ":",
+           ath_hal_ether_sprintf(an->an_node.ni_macaddr),
            an->an_is_powersave,
            an->an_stack_psq,
            an->an_tim_set,
@@ -5627,10 +5620,9 @@ ath_addba_request(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap,
        ATH_TX_UNLOCK(sc);
 
        DPRINTF(sc, ATH_DEBUG_SW_TX_CTRL,
-           "%s: %6D: called; dialogtoken=%d, baparamset=%d, batimeout=%d\n",
+           "%s: %s: called; dialogtoken=%d, baparamset=%d, batimeout=%d\n",
            __func__,
-           ni->ni_macaddr,
-           ":",
+           ath_hal_ether_sprintf(ni->ni_macaddr),
            dialogtoken, baparamset, batimeout);
        DPRINTF(sc, ATH_DEBUG_SW_TX_CTRL,
            "%s: txa_start=%d, ni_txseqs=%d\n",
@@ -5671,9 +5663,8 @@ ath_addba_response(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap,
        int r;
 
        DPRINTF(sc, ATH_DEBUG_SW_TX_CTRL,
-           "%s: %6D: called; status=%d, code=%d, batimeout=%d\n", __func__,
-           ni->ni_macaddr,
-           ":",
+           "%s: %s: called; status=%d, code=%d, batimeout=%d\n", __func__,
+           ath_hal_ether_sprintf(ni->ni_macaddr),
            status, code, batimeout);
 
        DPRINTF(sc, ATH_DEBUG_SW_TX_CTRL,
@@ -5718,10 +5709,9 @@ ath_addba_stop(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap)
        ath_bufhead bf_cq;
        struct ath_buf *bf;
 
-       DPRINTF(sc, ATH_DEBUG_SW_TX_CTRL, "%s: %6D: called\n",
+       DPRINTF(sc, ATH_DEBUG_SW_TX_CTRL, "%s: %s: called\n",
            __func__,
-           ni->ni_macaddr,
-           ":");
+           ath_hal_ether_sprintf(ni->ni_macaddr));
 
        /*
         * Pause TID traffic early, so there aren't any races
@@ -5791,10 +5781,9 @@ ath_tx_node_reassoc(struct ath_softc *sc, struct ath_node *an)
                        continue;
                ath_tx_tid_pause(sc, tid);
                DPRINTF(sc, ATH_DEBUG_NODE,
-                   "%s: %6D: TID %d: cleaning up TID\n",
+                   "%s: %s: TID %d: cleaning up TID\n",
                    __func__,
-                   an->an_node.ni_macaddr,
-                   ":",
+                   ath_hal_ether_sprintf(an->an_node.ni_macaddr),
                    i);
                ath_tx_tid_cleanup(sc, an, i, &bf_cq);
                /*
@@ -5833,10 +5822,9 @@ ath_bar_response(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap,
        int attempts = tap->txa_attempts;
 
        DPRINTF(sc, ATH_DEBUG_SW_TX_BAR,
-           "%s: %6D: called; txa_tid=%d, atid->tid=%d, status=%d, attempts=%d\n",
+           "%s: %s: called; txa_tid=%d, atid->tid=%d, status=%d, attempts=%d\n",
            __func__,
-           ni->ni_macaddr,
-           ":",
+           ath_hal_ether_sprintf(ni->ni_macaddr),
            tap->txa_ac,
            atid->tid,
            status,
@@ -5881,10 +5869,9 @@ ath_addba_response_timeout(struct ieee80211_node *ni,
        struct ath_tid *atid = &an->an_tid[tid];
 
        DPRINTF(sc, ATH_DEBUG_SW_TX_CTRL,
-           "%s: %6D: TID=%d, called; resuming\n",
+           "%s: %s: TID=%d, called; resuming\n",
            __func__,
-           ni->ni_macaddr,
-           ":",
+           ath_hal_ether_sprintf(ni->ni_macaddr),
            tid);
 
        ATH_TX_LOCK(sc);
@@ -5944,8 +5931,8 @@ ath_tx_node_sleep(struct ath_softc *sc, struct ath_node *an)
 
        if (an->an_is_powersave) {
                DPRINTF(sc, ATH_DEBUG_XMIT,
-                   "%s: %6D: node was already asleep!\n",
-                   __func__, an->an_node.ni_macaddr, ":");
+                   "%s: %s: node was already asleep!\n",
+                   __func__, ath_hal_ether_sprintf(an->an_node.ni_macaddr));
                ATH_TX_UNLOCK(sc);
                return;
        }
index b87f7bb..3d609ec 100644 (file)
  */
 #define        ATH_MGMT_TXBUF          32
 
-/*
- * Newer chipsets probe far bigger fifos,
- * a default of 40 RXBUFs is not enough.
- */
-#ifdef __DragonFly__
-#define        ATH_TXBUF       256
-#define        ATH_RXBUF       256
-#endif
-
-/*
- * 802.11n requires more TX and RX buffers to do AMPDU.
- */
-#ifdef ATH_ENABLE_11N
-#define        ATH_TXBUF       512
-#define        ATH_RXBUF       512
-#endif
-
 #ifndef ATH_RXBUF
+#ifdef ATH_ENABLE_11N
+#define        ATH_RXBUF       512             /* 802.11n requires more buffers to do AMPDU. */
+#elif defined(__DragonFly__)
+#define        ATH_RXBUF       256             /* a default of 40 RXBUFs is not enough */
+#else
 #define        ATH_RXBUF       40              /* number of RX buffers */
 #endif
+#endif
 #ifndef ATH_TXBUF
+#ifdef ATH_ENABLE_11N
+#define        ATH_TXBUF       512             /* 802.11n requires more buffers to do AMPDU. */
+#elif defined(__DragonFly__)
+#define        ATH_TXBUF       256             /* a default of 40 RXBUFs is not enough */
+#else
 #define        ATH_TXBUF       200             /* number of TX buffers */
 #endif
+#endif
 #define        ATH_BCBUF       4               /* number of beacon buffers */
 
 #define        ATH_TXDESC      10              /* number of descriptors per buffer */
@@ -1270,7 +1265,7 @@ void      ath_intr(void *);
        == HAL_OK)
 #define        ath_hal_setrxbufsize(_ah, _req) \
        (ath_hal_setcapability(_ah, HAL_CAP_RXBUFSIZE, 0, _req, NULL)   \
-       == HAL_OK)
+       == AH_TRUE)
 
 #define        ath_hal_getchannoise(_ah, _c) \
        ((*(_ah)->ah_getChanNoise)((_ah), (_c)))
index 68bf257..8de294f 100644 (file)
@@ -5,76 +5,100 @@ ATH_RATE?=   sample          # tx rate control algorithm
 
 KMOD=  ath_hal
 
-.PATH: ${.CURDIR}/ar5211 ${.CURDIR}/ar5416 ${.CURDIR}/ar5312
-.PATH: ${.CURDIR}/ar5212 ${.CURDIR}/ar9003 ${.CURDIR}/ar9002
-.PATH: ${.CURDIR}/ar9001 ${.CURDIR}/ar5210
-.PATH: ${.CURDIR}/../../../../contrib/dev/ath/ath_hal/ar9300/
-
 HALCONTRIB= ${.CURDIR}/../../../../contrib/dev/ath/ath_hal
 
-SRCS=  ah_eeprom_9287.c ah_eeprom_v4k.c ah_regdomain.c
-SRCS+= ah_eeprom_v1.c ah_eeprom_v3.c ah_osdep.c ah.c ah_eeprom_v14.c
+SRCS=  ah_regdomain.c
+SRCS+= ah_eeprom_v3.c ah_osdep.c ah.c
 SRCS+= device_if.h bus_if.h pci_if.h opt_wlan.h opt_inet.h opt_ath.h opt_ah.h
 
-# AR5211
 #
-SRCS+= ar5211_attach.c ar5211_power.c ar5211_keycache.c ar5211_beacon.c
-SRCS+= ar5211_recv.c ar5211_misc.c ar5211_xmit.c ar5211_reset.c ar5211_phy.c
-SRCS+= ar5211_interrupts.c
+# AR5210 support; these are first generation 11a-only devices.
+#
+.PATH: ${.CURDIR}/ar5210
+SRCS+= ah_eeprom_v1.c \
+       ar5210_attach.c ar5210_beacon.c ar5210_interrupts.c \
+       ar5210_keycache.c ar5210_misc.c ar5210_phy.c ar5210_power.c \
+       ar5210_recv.c ar5210_reset.c ar5210_xmit.c
 
-# AR5416
 #
-SRCS+= ar5416_power.c ar5416_radar.c ar5416_cal_adcgain.c ar5416_ani.c
-SRCS+= ar5416_attach.c ar5416_btcoex.c ar5416_beacon.c ar5416_spectral.c
-SRCS+= ar5416_keycache.c ar5416_cal.c ar5416_recv.c ar5416_gpio.c
-SRCS+= ar5416_eeprom.c ar5416_reset.c ar2133.c ar5416_cal_adcdc.c
-SRCS+= ar5416_interrupts.c ar5416_xmit.c ar5416_misc.c ar5416_phy.c
-SRCS+= ar5416_cal_iq.c
-
-# AR5312
+# AR5211 support; these are second generation 11b/g/a devices
+# (but 11g was OFDM only and is not supported).
 #
-SRCS+= ar5312_misc.c ar5312_interrupts.c ar5312_reset.c ar5312_eeprom.c
-SRCS+= ar5312_gpio.c ar5315_gpio.c ar5312_power.c ar5312_attach.c
+.PATH: ${.CURDIR}/ar5211
+SRCS+= ar5211_attach.c ar5211_beacon.c ar5211_interrupts.c \
+       ar5211_keycache.c ar5211_misc.c ar5211_phy.c ar5211_power.c \
+       ar5211_recv.c ar5211_reset.c ar5211_xmit.c
 
-# AR5212
 #
-SRCS+= ar5212_rfgain.c ar5212_interrupts.c ar5212_ani.c
-SRCS+= ar2413.c ar5413.c ar5212_power.c ar2425.c ar5212_recv.c
-SRCS+= ar5212_gpio.c ar5212_beacon.c ar5212_misc.c ar5212_xmit.c
-SRCS+= ar5212_eeprom.c ar5212_keycache.c ar5212_phy.c ar5212_attach.c
-SRCS+= ar5212_reset.c ar5111.c ar5112.c
-
-# AR2316, AR2317
+# AR5212 support; this covers all other pci/cardbus legacy parts.
 #
-#SRCS+=        ar2316.c
-#SRCS+=        ar2317.c
+.PATH: ${.CURDIR}/ar5212
+SRCS+= ar5212_ani.c ar5212_attach.c ar5212_beacon.c ar5212_eeprom.c \
+       ar5212_gpio.c ar5212_interrupts.c ar5212_keycache.c ar5212_misc.c \
+       ar5212_phy.c ar5212_power.c ar5212_recv.c ar5212_reset.c \
+       ar5212_rfgain.c ar5212_xmit.c
+# RF backends
+SRCS+= ar5111.c
+SRCS+= ar5112.c
+SRCS+= ar2413.c
+SRCS+= ar2425.c
+SRCS+= ar5413.c
 
-# AR9002
 #
+# AR5416, AR9130, AR9160, AR9220, AR9280, AR9285, AR9287 support.
 
-SRCS+= ar9280_olc.c ar9280_attach.c ar9285_diversity.c ar9285_phy.c
-SRCS+= ar9287.c ar9285.c ar9280.c ar9287_reset.c ar9287_olc.c ar9285_cal.c
-SRCS+= ar9287_attach.c ar9285_reset.c ar9285_attach.c ar9285_btcoex.c
-SRCS+= ar9287_cal.c
-
-# AR9001
+# Note enabling this support requires defining AH_SUPPORT_AR5416
+# in opt_ah.h so the 11n tx/rx descriptor format is handled.
 #
-SRCS+= ar9130_phy.c ar9160_attach.c ar9130_attach.c ar9130_eeprom.c
-
-# AR5210
+# NB: 9160 depends on 5416 but 5416 does not require 9160
 #
-SRCS+= ar5210_misc.c ar5210_xmit.c ar5210_power.c ar5210_keycache.c
-SRCS+= ar5210_beacon.c ar5210_reset.c ar5210_interrupts.c ar5210_attach.c
-SRCS+= ar5210_recv.c ar5210_phy.c
-
-# AR9300
+# + 5416 (Owl)
+.PATH: ${.CURDIR}/ar5416
+SRCS+= ah_eeprom_v14.c ah_eeprom_v4k.c \
+       ar5416_ani.c ar5416_attach.c ar5416_beacon.c ar5416_btcoex.c \
+       ar5416_cal.c ar5416_cal_iq.c ar5416_cal_adcgain.c ar5416_cal_adcdc.c \
+       ar5416_eeprom.c ar5416_gpio.c ar5416_interrupts.c ar5416_keycache.c \
+       ar5416_misc.c ar5416_phy.c ar5416_power.c ar5416_radar.c ar5416_spectral.c \
+       ar5416_recv.c ar5416_reset.c ar5416_xmit.c
+
+# RF backend for 5416, 9130 and 9160
+SRCS+= ar2133.c
+
+# + AR9160 (Sowl)
+.PATH: ${.CURDIR}/ar9001
+SRCS+= ar9160_attach.c
+
+# + AR9130 - (Sowl) - Embedded (AR913x SoC)
 #
-SRCS+= ar9300_ani.c ar9300_attach.c ar9300_beacon.c ar9300_eeprom.c
-SRCS+= ar9300_freebsd.c ar9300_gpio.c ar9300_interrupts.c ar9300_keycache.c
-SRCS+= ar9300_mci.c ar9300_misc.c ar9300_paprd.c ar9300_phy.c ar9300_power.c
-SRCS+= ar9300_radar.c ar9300_radio.c ar9300_recv.c ar9300_recv_ds.c
-SRCS+= ar9300_reset.c ar9300_stub.c ar9300_stub_funcs.c ar9300_timer.c
-SRCS+= ar9300_xmit.c ar9300_xmit_ds.c
+# This requires AH_SUPPORT_AR9130 in order to function as some
+# register values have shifted for this chipset. Definig this however
+# (currently) breaks non-AR9130 chipsets - since this is an embedded
+# chipset and no other radios are glued to it, this shouldn't pose a
+# problem.
+SRCS+= ar9130_attach.c ar9130_eeprom.c ar9130_phy.c
+
+# AR9002 series chips
+# + AR9220/AR9280 - Merlin
+.PATH: ${.CURDIR}/ar9002
+SRCS+= ar9280.c ar9280_attach.c ar9280_olc.c
+
+# + AR9285 - Kite
+SRCS+= ar9285.c ar9285_reset.c ar9285_attach.c ar9285_cal.c ar9285_phy.c
+SRCS+= ar9285_diversity.c ar9285_btcoex.c
+
+# + AR9287 - Kiwi
+SRCS+=  ah_eeprom_9287.c
+.PATH:  ${.CURDIR}/ar9002
+SRCS+=  ar9287.c ar9287_reset.c ar9287_attach.c ar9287_cal.c ar9287_olc.c
+
+# + AR9300 HAL
+.PATH:  ${HALCONTRIB}/ar9300
+SRCS+= ar9300_interrupts.c ar9300_radar.c ar9300_ani.c ar9300_keycache.c
+SRCS+= ar9300_radio.c ar9300_xmit.c ar9300_attach.c ar9300_mci.c ar9300_stub.c
+SRCS+= ar9300_xmit_ds.c ar9300_beacon.c ar9300_misc.c ar9300_recv.c
+SRCS+= ar9300_stub_funcs.c ar9300_eeprom.c ar9300_paprd.c ar9300_recv_ds.c
+SRCS+= ar9300_freebsd.c ar9300_phy.c ar9300_reset.c ar9300_gpio.c
+SRCS+= ar9300_power.c ar9300_timer.c
 
 CFLAGS+=  -I. -I${HAL} -I${HALCONTRIB}
 
index 775c783..db7daf8 100644 (file)
@@ -139,7 +139,7 @@ ath_hal_printf(struct ath_hal *ah, const char* fmt, ...)
 const char*
 ath_hal_ether_sprintf(const u_int8_t *mac)
 {
-       static char etherbuf[18];
+       static char etherbuf[ETHER_ADDRSTRLEN + 1];
 
        kether_ntoa(mac, etherbuf);
 
index 4d79a4f..45b5608 100644 (file)
@@ -54,7 +54,7 @@ ar9285BTCoexAntennaDiversity(struct ath_hal *ah)
            !! (ahp->ah_btCoexFlag & HAL_BT_COEX_FLAG_ANT_DIV_ENABLE));
 
        if ((ahp->ah_btCoexFlag & HAL_BT_COEX_FLAG_ANT_DIV_ALLOW) ||
-           (AH5212(ah)->ah_diversity != HAL_ANT_VARIABLE)) {
+           (AH5212(ah)->ah_diversity != (HAL_BOOL)HAL_ANT_VARIABLE)) {
        if ((ahp->ah_btCoexFlag & HAL_BT_COEX_FLAG_ANT_DIV_ENABLE) &&
             (AH5212(ah)->ah_antControl == HAL_ANT_VARIABLE)) {
                /* Enable antenna diversity */
index f9ef40b..a4ef45a 100644 (file)
@@ -1089,8 +1089,8 @@ ath_rate_ctl_reset(struct ath_softc *sc, struct ieee80211_node *ni)
        if (ieee80211_msg(ni->ni_vap, IEEE80211_MSG_RATECTL)) {
                uint64_t mask;
 
-               ieee80211_note(ni->ni_vap, "[%6D] %s: size 1600 rate/tt",
-                   ni->ni_macaddr, ":", __func__);
+               ieee80211_note(ni->ni_vap, "[%s] %s: size 1600 rate/tt",
+                   ath_hal_ether_sprintf(ni->ni_macaddr), __func__);
                for (mask = sn->ratemask, rix = 0; mask != 0; mask >>= 1, rix++) {
                        if ((mask & 1) == 0)
                                continue;
index 2a709da..406fb15 100644 (file)
@@ -10,4 +10,4 @@ CFLAGS+=-I${.CURDIR}
 CFLAGS+=-I${.CURDIR}/../common
 CFLAGS+=-I${.CURDIR}/../../../../sys
 CFLAGS+=-I${.CURDIR}/../../../../sys/dev/netif/ath/ath
-CFLAGS+=-I${.CURDIR}/../../../../sys/dev/netif/ath/hal/ath_hal
+CFLAGS+=-I${.CURDIR}/../../../../sys/dev/netif/ath/ath_hal
index 0eb7a8e..4607be8 100644 (file)
@@ -1,6 +1,6 @@
 # $FreeBSD: src/tools/tools/ath/athrd/Makefile,v 1.1 2009/01/15 23:38:21 sam Exp $
 
-.PATH: ${.CURDIR}/../../../../sys/dev/netif/ath/hal/ath_hal
+.PATH: ${.CURDIR}/../../../../sys/dev/netif/ath/ath_hal
 
 PROG=  athrd