kernel compile fails without AH_SUPPORT_AR5416

Bruce Simpson bms at incunabulum.net
Fri May 1 13:07:05 UTC 2009


Hi,

Can you please try this patch?
I can't commit it until STABLE is unfrozen after 7.2-RELEASE is cut.

Sam Leffler wrote:
> Bruce Simpson wrote:
>   
>> Hi,
>>
>> Looks like I'm late to the party. I was responsible for committing these
>> ath(4) changes to RELENG_7.
>> I can't remember if I tested the kernel compile without the
>> AH_SUPPORT_AR5416 option or not, I have been so incredibly busy.
>> ...
> ru had a change to fix this but decided not to; can't say why.
> Otherwise there is a better way to fix this which I alluded to in
> previous mail--use the config-generated #define that is generated for
> the "ath_hal" device.


thanks,
BMS
-------------- next part --------------
Index: UPDATING
===================================================================
--- UPDATING	(revision 191718)
+++ UPDATING	(working copy)
@@ -8,6 +8,11 @@
 /usr/ports/UPDATING.  Please read that file before running
 portupgrade.
 
+20090505:
+	The kernel compile-time option AH_SUPPORT_AR5416 has been
+	removed; it is now enabled by default as if_ath.c depends on it
+	in order to build.
+
 20090504:
 	FreeBSD 7.2-RELEASE
 
Index: sys/arm/conf/AVILA
===================================================================
--- sys/arm/conf/AVILA	(revision 191718)
+++ sys/arm/conf/AVILA	(working copy)
@@ -133,7 +133,6 @@
 #device		wlan_tkip	# 802.11 TKIP support
 device		ath		# Atheros pci/cardbus NIC's
 device		ath_hal		# Atheros HAL (Hardware Access Layer)
-options		AH_SUPPORT_AR5416	# enable AR5416 tx/rx descriptors
 device		ath_rate_sample	# SampleRate tx rate control for ath
 options		ATH_DEBUG
 
Index: sys/sparc64/conf/GENERIC
===================================================================
--- sys/sparc64/conf/GENERIC	(revision 191718)
+++ sys/sparc64/conf/GENERIC	(working copy)
@@ -191,7 +191,6 @@
 device		wlan_scan_sta	# 802.11 STA mode scanning
 device		ath		# Atheros pci/cardbus NIC's
 device		ath_hal		# Atheros HAL (Hardware Access Layer)
-options		AH_SUPPORT_AR5416	# enable AR5416 tx/rx descriptors
 device		ath_rate_sample	# SampleRate tx rate control for ath
 
 # Pseudo devices.
Index: sys/conf/options
===================================================================
--- sys/conf/options	(revision 191718)
+++ sys/conf/options	(working copy)
@@ -731,8 +731,6 @@
 ATH_TX99_DIAG		opt_ath.h
 
 # options for the Atheros hal
-AH_SUPPORT_AR5416	opt_ah.h
-
 AH_DEBUG		opt_ah.h
 AH_ASSERT		opt_ah.h
 AH_DEBUG_ALQ		opt_ah.h
Index: sys/modules/ath/Makefile
===================================================================
--- sys/modules/ath/Makefile	(revision 191718)
+++ sys/modules/ath/Makefile	(working copy)
@@ -76,8 +76,9 @@
 #
 # AR5416, AR9160 support; these are 11n parts but only really
 # supported (right now) operating in legacy mode.  Note enabling
-# this support requires defining AH_SUPPORT_AR5416 in opt_ah.h
+# this support requires defining AH_SUPPORT_AR5416
 # so the 11n tx/rx descriptor format is handled.
+# This support is now enabled by default.
 #
 # NB: 9160 depends on 5416 but 5416 does not require 9160
 #
@@ -106,7 +107,4 @@
 
 CFLAGS+=  -I. -I${.CURDIR}/../../dev/ath -I${.CURDIR}/../../dev/ath/ath_hal
 
-opt_ah.h:
-	echo '#define AH_SUPPORT_AR5416 1' > $@
-
 .include <bsd.kmod.mk>
Index: sys/dev/ath/ath_hal/ah_desc.h
===================================================================
--- sys/dev/ath/ath_hal/ah_desc.h	(revision 191718)
+++ sys/dev/ath/ath_hal/ah_desc.h	(working copy)
@@ -20,8 +20,12 @@
 #ifndef _DEV_ATH_DESC_H
 #define _DEV_ATH_DESC_H
 
-#include "opt_ah.h"		/* NB: required for AH_SUPPORT_AR5416 */
+#include "opt_ah.h"
 
+#ifndef AH_SUPPORT_AR5416
+#define AH_SUPPORT_AR5416	/* always support AR5416 */
+#endif
+
 /*
  * Transmit descriptor status.  This structure is filled
  * in only after the tx descriptor process method finds a
Index: sys/dev/ath/if_ath.c
===================================================================
--- sys/dev/ath/if_ath.c	(revision 191718)
+++ sys/dev/ath/if_ath.c	(working copy)
@@ -3399,7 +3399,7 @@
 	rix = rs->rs_rate;
 	sc->sc_rx_th.wr_rate = sc->sc_hwmap[rix].ieeerate;
 	sc->sc_rx_th.wr_flags = sc->sc_hwmap[rix].rxflags;
-#if HAL_ABI_VERSION >= 0x07050400
+#if HAL_ABI_VERSION >= 0x07050400 && defined(AH_SUPPORT_AR5416)
 	if (sc->sc_curchan.channelFlags & CHANNEL_HT) {
 		/*
 		 * For HT operation we must specify the channel
Index: sys/i386/conf/GENERIC
===================================================================
--- sys/i386/conf/GENERIC	(revision 191718)
+++ sys/i386/conf/GENERIC	(working copy)
@@ -255,7 +255,6 @@
 device		an		# Aironet 4500/4800 802.11 wireless NICs.
 device		ath		# Atheros pci/cardbus NIC's
 device		ath_hal		# Atheros HAL (Hardware Access Layer)
-options		AH_SUPPORT_AR5416	# enable AR5416 tx/rx descriptors
 device		ath_rate_sample	# SampleRate tx rate control for ath
 device		awi		# BayStack 660 and others
 device		ral		# Ralink Technology RT2500 wireless NICs.
Index: sys/amd64/conf/GENERIC
===================================================================
--- sys/amd64/conf/GENERIC	(revision 191718)
+++ sys/amd64/conf/GENERIC	(working copy)
@@ -242,7 +242,6 @@
 device		an		# Aironet 4500/4800 802.11 wireless NICs.
 device		ath		# Atheros pci/cardbus NIC's
 device		ath_hal		# Atheros HAL (Hardware Access Layer)
-options		AH_SUPPORT_AR5416	# enable AR5416 tx/rx descriptors
 device		ath_rate_sample	# SampleRate tx rate control for ath
 device		awi		# BayStack 660 and others
 device		ral		# Ralink Technology RT2500 wireless NICs.


More information about the freebsd-stable mailing list