Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 01 May 2009 14:07:01 +0100
From:      Bruce Simpson <bms@incunabulum.net>
To:        stable@freebsd.org
Cc:        Dennis Melentyev <dennis.melentyev@gmail.com>, Sam Leffler <sam@freebsd.org>, "current@freebsd.org" <current@freebsd.org>, Maxim Sobolev <sobomax@sippysoft.com>
Subject:   Re: kernel compile fails without AH_SUPPORT_AR5416
Message-ID:  <49FAF3F5.5070609@incunabulum.net>
In-Reply-To: <49EDDD51.9040608@freebsd.org>
References:  <49E6DB25.2010601@sippysoft.com>	<b84edfa10904160238u7a94e4aw4f60372a6b99f2a2@mail.gmail.com>	<49E6FF8F.4070403@sippysoft.com>	<b84edfa10904160505s45bcee01n3e516a00d1e4dffe@mail.gmail.com> <49ED6AD2.4010006@incunabulum.net> <49EDDD51.9040608@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------090608000706030809090807
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

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

--------------090608000706030809090807
Content-Type: text/plain;
 name="ath-build-7.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="ath-build-7.diff"

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.

--------------090608000706030809090807--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49FAF3F5.5070609>