Re: kernel compile fails without AH_SUPPORT_AR5416

From: Bruce Simpson <bms_at_incunabulum.net>
Date: Fri, 01 May 2009 14:07:01 +0100
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

Index: UPDATING
===================================================================
--- UPDATING	(revision 191718)
+++ UPDATING	(working copy)
_at__at_ -8,6 +8,11 _at__at_
 /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)
_at__at_ -133,7 +133,6 _at__at_
 #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)
_at__at_ -191,7 +191,6 _at__at_
 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)
_at__at_ -731,8 +731,6 _at__at_
 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)
_at__at_ -76,8 +76,9 _at__at_
 #
 # 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
 #
_at__at_ -106,7 +107,4 _at__at_
 
 CFLAGS+=  -I. -I${.CURDIR}/../../dev/ath -I${.CURDIR}/../../dev/ath/ath_hal
 
-opt_ah.h:
-	echo '#define AH_SUPPORT_AR5416 1' > $_at_
-
 .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)
_at__at_ -20,8 +20,12 _at__at_
 #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)
_at__at_ -3399,7 +3399,7 _at__at_
 	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)
_at__at_ -255,7 +255,6 _at__at_
 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)
_at__at_ -242,7 +242,6 _at__at_
 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.
Received on Fri May 01 2009 - 11:07:04 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:47 UTC