Re: kernel compile fails without AH_SUPPORT_AR5416

2009-05-01 Thread Bruce Simpson

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)
@@ -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 @@
 #devicewlan_tkip   # 802.11 TKIP support
 device ath # Atheros pci/cardbus NIC's
 device ath_hal # Atheros HAL (Hardware Access Layer)
-optionsAH_SUPPORT_AR5416   # enable AR5416 tx/rx 
descriptors
 device ath_rate_sample # SampleRate tx rate control for ath
 optionsATH_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)
-optionsAH_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  

Re: kernel compile fails without AH_SUPPORT_AR5416

2009-05-01 Thread Sam Leffler

Bruce Simpson wrote:

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.

Do not modify ah_desc.h like you've done.  Add this to conf/options

ATH_HAL   opt_ah.h

and use that to enable AH_SUPPORT_AR5416.

Also changes must go in head first.

   Sam

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: kernel compile fails without AH_SUPPORT_AR5416

2009-05-01 Thread Sam Leffler

Sam Leffler wrote:

Bruce Simpson wrote:

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.

Do not modify ah_desc.h like you've done.  Add this to conf/options

ATH_HAL   opt_ah.h

and use that to enable AH_SUPPORT_AR5416.

Also changes must go in head first.


To clarify the first comment: you've made it impossible to build code 
w/o the extended format descriptor; this is what I find unacceptable.


   Sam

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: kernel compile fails without AH_SUPPORT_AR5416

2009-05-01 Thread Bruce Simpson

Sam Leffler wrote:

...

the ath_hal device.

Do not modify ah_desc.h like you've done.  Add this to conf/options

ATH_HAL   opt_ah.h

and use that to enable AH_SUPPORT_AR5416.

To clarify the first comment: you've made it impossible to build code 
w/o the extended format descriptor; this is what I find unacceptable.


Ah, of course, duh -- I forgot about the CaPiTalIzAtion of the device 
name gets pulled into config(5) with the 'device' keyword. Thanks for 
the reminder...


This is a much cleaner fix for the issue than forcing the option to be 
set on always. It looks like HEAD has this issue too and this can go 
right in there.


Are we happy with AH_SUPPORT_AR5416 being enabled in 7.x GENERIC?
The 'out of box' config hasn't been broken by the change and this is 
identical to to the situation in HEAD as far as I can see.


thanks,
BMS


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: kernel compile fails without AH_SUPPORT_AR5416

2009-05-01 Thread Sam Leffler

Bruce Simpson wrote:

Sam Leffler wrote:

...

the ath_hal device.

Do not modify ah_desc.h like you've done.  Add this to conf/options

ATH_HAL   opt_ah.h

and use that to enable AH_SUPPORT_AR5416.

To clarify the first comment: you've made it impossible to build code 
w/o the extended format descriptor; this is what I find unacceptable.


Ah, of course, duh -- I forgot about the CaPiTalIzAtion of the device 
name gets pulled into config(5) with the 'device' keyword. Thanks for 
the reminder...


This is a much cleaner fix for the issue than forcing the option to be 
set on always. It looks like HEAD has this issue too and this can go 
right in there.


Are we happy with AH_SUPPORT_AR5416 being enabled in 7.x GENERIC?
The 'out of box' config hasn't been broken by the change and this is 
identical to to the situation in HEAD as far as I can see.


Not sure I understand your last question.  If you fix the code so it's 
not dependent on options AH_SUPPORT_AR5416 then you can just remove it 
from the GENERIC config files.  Otherwise the intent was that device 
ath_hal would enable all available chip support so yes we want support 
for 5416 and later parts.


In fact AH_SUPPORT_AR5416 is probably not needed at all; we can 
conditionalize the code according to the device config; e.g.


#if defined(ATH_HAL) || defined(ATH_AR5416) || defined(ATH_AR9160) || 
defined(ATH_AR9280)


or possibly consolidate this check in one spot and define something like 
AH_SUPPORT_AR5416 to enable the extended descriptor format support.


Beware of driver code that depends on AH_SUPPORT_AR5416 (grep shows 
several uses).


For now just fixing the immediate problem is sufficient; I'll get to 
cleaning this stuff up later (unless you care to deal with it).


   Sam

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: kernel compile fails without AH_SUPPORT_AR5416

2009-04-21 Thread Bruce Simpson

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.


Dennis Melentyev wrote:

2009/4/16 Maxim Sobolev sobo...@sippysoft.com:
  

Dennis Melentyev wrote:


Could be worth an entry in UPDATING and/or explicitly added to GENERIC.
  

My point is that if the option is mandatory for compiling ath(4) driver,
then there is no point in having this option in the first place.



Well, fair.
+1 from me :).

  


So is there a consensus that this seems to break the build for folk who 
do not need this option?
If so I can see about committing the necessary changes to turn this 
option on by default. I needed the option for what I was trying to do.


Of course if someone already has a patch for that, that will help, as I 
don't have a lot of free time at the moment but can certainly commit a 
quick fix if someone already has one.


thanks,
BMS

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: kernel compile fails without AH_SUPPORT_AR5416

2009-04-21 Thread Sam Leffler
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.
 
 Dennis Melentyev wrote:
 2009/4/16 Maxim Sobolev sobo...@sippysoft.com:
  
 Dennis Melentyev wrote:

 Could be worth an entry in UPDATING and/or explicitly added to GENERIC.
   
 My point is that if the option is mandatory for compiling ath(4) driver,
 then there is no point in having this option in the first place.
 

 Well, fair.
 +1 from me :).

   
 
 So is there a consensus that this seems to break the build for folk who
 do not need this option?
 If so I can see about committing the necessary changes to turn this
 option on by default. I needed the option for what I was trying to do.
 
 Of course if someone already has a patch for that, that will help, as I
 don't have a lot of free time at the moment but can certainly commit a
 quick fix if someone already has one.

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.  As I said I've not had time to look at that won't
probably for several weeks.  Either way this requirement has been listed
in UPDATING ever since the ath hal source code was imported into the tree.

Sam
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


kernel compile fails without AH_SUPPORT_AR5416

2009-04-16 Thread Maxim Sobolev

Sam,

What is the reason to have this option in the kernel config if kernel
compilation fails when this option is enabled? It also affects 7-stable.

cc -c -O2 -frename-registers -pipe -fno-strict-aliasing  -std=c99 -g
-Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef
-Wno-pointer-sign -fformat-extensions -nostdinc  -I. -I/usr/src/sys
-I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS
-include opt_global.h -fno-common -finline-limit=8000 --param
inline-unit-growth=100 --param large-function-growth=1000
-mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx
-mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding
-Werror  /usr/src/sys/dev/ath/if_ath.c -I/usr/src/sys/dev/ath
/usr/src/sys/dev/ath/if_ath.c: In function 'ath_rx_tap':
/usr/src/sys/dev/ath/if_ath.c:3414: error: 'const struct ath_rx_status'
has no member named 'rs_flags'
/usr/src/sys/dev/ath/if_ath.c:3416: error: 'const struct ath_rx_status'
has no member named 'rs_flags'

-Maxim

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


kernel compile fails without AH_SUPPORT_AR5416

2009-04-16 Thread Maxim Sobolev

Sam,

What is the reason to have this option in the kernel config if kernel 
compilation fails when this option is enabled? It also affects 7-stable.


cc -c -O2 -frename-registers -pipe -fno-strict-aliasing  -std=c99 -g 
-Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef 
-Wno-pointer-sign -fformat-extensions -nostdinc  -I. -I/usr/src/sys 
-I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS 
-include opt_global.h -fno-common -finline-limit=8000 --param 
inline-unit-growth=100 --param large-function-growth=1000 
-mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx 
-mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding 
-Werror  /usr/src/sys/dev/ath/if_ath.c -I/usr/src/sys/dev/ath

/usr/src/sys/dev/ath/if_ath.c: In function 'ath_rx_tap':
/usr/src/sys/dev/ath/if_ath.c:3414: error: 'const struct ath_rx_status' 
has no member named 'rs_flags'
/usr/src/sys/dev/ath/if_ath.c:3416: error: 'const struct ath_rx_status' 
has no member named 'rs_flags'


-Maxim
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: kernel compile fails without AH_SUPPORT_AR5416

2009-04-16 Thread Dennis Melentyev
Hi Max,

Also seen that.
Fixed with careful merging on my kernel config with GENERIC one.
There are additional strings involved:
device ath
device ath_rate_sample

After adding the later one (and probably, the first one too (?)) compiled ok.
Could be worth an entry in UPDATING and/or explicitly added to GENERIC.

/dennis

2009/4/16 Maxim Sobolev sobo...@sippysoft.com:
 Sam,

 What is the reason to have this option in the kernel config if kernel
 compilation fails when this option is enabled? It also affects 7-stable.

 cc -c -O2 -frename-registers -pipe -fno-strict-aliasing  -std=c99 -g -Wall
 -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes
 -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign
 -fformat-extensions -nostdinc  -I. -I/usr/src/sys
 -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include
 opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100
 --param large-function-growth=1000 -mcmodel=kernel -mno-red-zone
  -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx -mno-3dnow  -msoft-float
 -fno-asynchronous-unwind-tables -ffreestanding -Werror
  /usr/src/sys/dev/ath/if_ath.c -I/usr/src/sys/dev/ath
 /usr/src/sys/dev/ath/if_ath.c: In function 'ath_rx_tap':
 /usr/src/sys/dev/ath/if_ath.c:3414: error: 'const struct ath_rx_status' has
 no member named 'rs_flags'
 /usr/src/sys/dev/ath/if_ath.c:3416: error: 'const struct ath_rx_status' has
 no member named 'rs_flags'

 -Maxim
 ___
 freebsd-stable@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-stable
 To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org




-- 
Dennis Melentyev
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: kernel compile fails without AH_SUPPORT_AR5416

2009-04-16 Thread Maxim Sobolev

Dennis Melentyev wrote:

Could be worth an entry in UPDATING and/or explicitly added to GENERIC.


My point is that if the option is mandatory for compiling ath(4) driver, 
then there is no point in having this option in the first place.


-Maxim
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: kernel compile fails without AH_SUPPORT_AR5416

2009-04-16 Thread Dennis Melentyev
2009/4/16 Maxim Sobolev sobo...@sippysoft.com:
 Dennis Melentyev wrote:

 Could be worth an entry in UPDATING and/or explicitly added to GENERIC.

 My point is that if the option is mandatory for compiling ath(4) driver,
 then there is no point in having this option in the first place.

Well, fair.
+1 from me :).

-- 
Dennis Melentyev
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: kernel compile fails without AH_SUPPORT_AR5416

2009-04-16 Thread Sam Leffler

Maxim Sobolev wrote:

Dennis Melentyev wrote:

Could be worth an entry in UPDATING and/or explicitly added to GENERIC.


My point is that if the option is mandatory for compiling ath(4) 
driver, then there is no point in having this option in the first place.


There is an entry in UPDATING and it is present in GENERIC (in HEAD, I 
didn't commit the changes to RELENG_7 so don't know).


When the ath hal src code was imported the meaning of the ath_hal device 
changed because internal configuration done during binary builds was now 
exposed.  Specifically, the need for AH_SUPPORT_5416 to enable support 
for the extended descriptor format used by the 11n parts.  If you read 
ath_hal(4) this should be clear--if not please help improve the manual page.


However, it so happens you can eliminate this option because config will 
generate a #define you can use instead to identify the configuration of 
ath_hal but this magic is undocumented and I didn't know about it 
until ru recently told me.  I suggested he go ahead and fixup the code 
to use it but haven't seen anything.  I don't have time right now.


   Sam

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org