Re: Fine, OK, here's my initial AR9380/AR9485 support

2013-03-17 Thread Adrian Chadd
I've just fixed a couple things with the AR9300 HAL:

* I've implemented a get slot time method, so one stub function call
message should disappear;
* I've fixed a quirk with slot/ack/rtscts timeout calculations in HT40
- the AR9300 HAL was compensating for the 40Mhz width of the channel,
but FreeBSD's HAL library call already does this. So now the HAL
doesn't double compensate for this.
* I broke and then fixed some compile time issues.

Please update and test!

Thanks,


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


Re: Fine, OK, here's my initial AR9380/AR9485 support

2013-03-17 Thread Joshua Isom

There's no issues for the fork, only the master.

On 3/17/2013 4:40 PM, Adrian Chadd wrote:

Just go to my github - github.com/erikarn/ - then click on
repositories, then the HAL fork, then just file an issue there.



Adrian




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


Re: Fine, OK, here's my initial AR9380/AR9485 support

2013-03-17 Thread Adrian Chadd
Fixed!



Adrian


On 17 March 2013 15:27, Joshua Isom jri...@gmail.com wrote:
 There's no issues for the fork, only the master.


 On 3/17/2013 4:40 PM, Adrian Chadd wrote:

 Just go to my github - github.com/erikarn/ - then click on
 repositories, then the HAL fork, then just file an issue there.



 Adrian



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


Re: Fine, OK, here's my initial AR9380/AR9485 support

2013-03-14 Thread Joshua Isom

On 3/13/2013 7:31 PM, Adrian Chadd wrote:

On 9 March 2013 10:54, Adrian Chadd adr...@freebsd.org wrote:


What's tested:

* legacy, 1x1 and 2x2 HT20/HT40, STA mode
* AR9380 (1x1, 2x2 - 2/5ghz)
* AR9485 (1x1, 2ghz only)


I can now add two more NICs to this list:

* AR9390 (HB116)
* AR9462 (WB225)

Thanks,


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




I've got it all compiled and booted, but the driver's not finding the 
card.  Any ideas?



[jri:~] root# uname -a
FreeBSD jri.homeunix.com 10.0-CURRENT FreeBSD 10.0-CURRENT #5 r248281M: Thu Mar 
14 18:55:48 CDT 2013 r...@jri.homeunix.com:/usr/obj/root/ATH/head/sys/ATH  
amd64
[jri:~] root# pciconf -lv # Truncated
none3@pci0:2:0:0:   class=0x028000 card=0x3112168c chip=0x0030168c rev=0x01 
hdr=0x00
vendor = 'Atheros Communications Inc.'
device = 'AR9300 Wireless LAN adaptor'
class  = network
[jri:~] root# diff ATH/head/sys/amd64/conf/{ATH,GENERIC}
27,30d26
 options ATH_DEBUG
 options AH_DEBUG
 options ATH_DIAGAPI

142c138
 #device   cd  # CD
---

devicecd  # CD

[jri:~] root# ifconfig
nfe0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500
options=82008VLAN_MTU,WOL_MAGIC,LINKSTATE
ether 6c:f0:49:d5:6f:6a
inet 192.168.1.6 netmask 0xff00 broadcast 192.168.1.255
inet 192.168.1.2 netmask 0xff00 broadcast 192.168.1.255
nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL
media: Ethernet autoselect (1000baseT full-duplex)
status: active
lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST metric 0 mtu 16384
options=63RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
inet 127.0.0.1 netmask 0xff00
nd6 options=21PERFORMNUD,AUTO_LINKLOCAL
[jri:~] root# kldload if_ath
kldload: can't load if_ath: File exists


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


Re: Fine, OK, here's my initial AR9380/AR9485 support

2013-03-14 Thread Adrian Chadd
Oh!

http://wikidevi.com/wiki/TP-LINK_TL-WDN4800

Silly me, I was reading the wrong number on my phone.

Yes, 0x0030 is Osprey (AR9380.)

kldload if_ath_pci too. :-)



Adrian

On 14 March 2013 19:18, Joshua Isom jri...@gmail.com wrote:
 Not a laptop, but here's the vendor's website.
 http://www.tp-link.com/en/products/details/?model=TL-WDN4800


 On 3/14/2013 9:02 PM, Adrian Chadd wrote:

 0x3112? What nic is that?

 I'll go and take a quick look at the reference driver. Can you google
 your laptop model and see what you can find?


 Adrian


 Sent from my Palm Pre on ATT

 

 On Mar 14, 2013 6:31 PM, Joshua Isom jri...@gmail.com wrote:

 On 3/13/2013 7:31 PM, Adrian Chadd wrote:

 On 9 March 2013 10:54, Adrian Chadd adr...@freebsd.org wrote:

 What's tested:

 * legacy, 1x1 and 2x2 HT20/HT40, STA mode
 * AR9380 (1x1, 2x2 - 2/5ghz)
 * AR9485 (1x1, 2ghz only)


 I can now add two more NICs to this list:

 * AR9390 (HB116)
 * AR9462 (WB225)

 Thanks,


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



 I've got it all compiled and booted, but the driver's not finding the
 card. Any ideas?

 [jri:~] root# uname -a
 FreeBSD jri.homeunix.com 10.0-CURRENT FreeBSD 10.0-CURRENT #5 r248281M:
 Thu Mar 14 18:55:48 CDT 2013
 r...@jri.homeunix.com:/usr/obj/root/ATH/head/sys/ATH  amd64
 [jri:~] root# pciconf -lv # Truncated
 none3@pci0:2:0:0:   class=0x028000 card=0x3112168c chip=0x0030168c
 rev=0x01 hdr=0x00
 vendor = 'Atheros Communications Inc.'
 device = 'AR9300 Wireless LAN adaptor'
 class  = network
 [jri:~] root# diff ATH/head/sys/amd64/conf/{ATH,GENERIC}
 27,30d26
  options ATH_DEBUG
  options AH_DEBUG
  options ATH_DIAGAPI
 
 142c138
  #device   cd  # CD
 ---

 devicecd  # CD

 [jri:~] root# ifconfig
 nfe0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu
 1500
 options=82008VLAN_MTU,WOL_MAGIC,LINKSTATE
 ether 6c:f0:49:d5:6f:6a
 inet 192.168.1.6 netmask 0xff00 broadcast 192.168.1.255
 inet 192.168.1.2 netmask 0xff00 broadcast 192.168.1.255
 nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL
 media: Ethernet autoselect (1000baseT full-duplex)
 status: active
 lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST metric 0 mtu 16384
 options=63RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6
 inet6 ::1 prefixlen 128
 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
 inet 127.0.0.1 netmask 0xff00
 nd6 options=21PERFORMNUD,AUTO_LINKLOCAL
 [jri:~] root# kldload if_ath
 kldload: can't load if_ath: File exists


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


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


Re: Fine, OK, here's my initial AR9380/AR9485 support

2013-03-14 Thread Adrian Chadd
.. and here I am, hoping you're user #1 (with me being user #0) of this HAL. :)



Adrian


On 14 March 2013 19:20, Adrian Chadd adrian.ch...@gmail.com wrote:
 Oh!

 http://wikidevi.com/wiki/TP-LINK_TL-WDN4800

 Silly me, I was reading the wrong number on my phone.

 Yes, 0x0030 is Osprey (AR9380.)

 kldload if_ath_pci too. :-)



 Adrian

 On 14 March 2013 19:18, Joshua Isom jri...@gmail.com wrote:
 Not a laptop, but here's the vendor's website.
 http://www.tp-link.com/en/products/details/?model=TL-WDN4800


 On 3/14/2013 9:02 PM, Adrian Chadd wrote:

 0x3112? What nic is that?

 I'll go and take a quick look at the reference driver. Can you google
 your laptop model and see what you can find?


 Adrian


 Sent from my Palm Pre on ATT

 

 On Mar 14, 2013 6:31 PM, Joshua Isom jri...@gmail.com wrote:

 On 3/13/2013 7:31 PM, Adrian Chadd wrote:

 On 9 March 2013 10:54, Adrian Chadd adr...@freebsd.org wrote:

 What's tested:

 * legacy, 1x1 and 2x2 HT20/HT40, STA mode
 * AR9380 (1x1, 2x2 - 2/5ghz)
 * AR9485 (1x1, 2ghz only)


 I can now add two more NICs to this list:

 * AR9390 (HB116)
 * AR9462 (WB225)

 Thanks,


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



 I've got it all compiled and booted, but the driver's not finding the
 card. Any ideas?

 [jri:~] root# uname -a
 FreeBSD jri.homeunix.com 10.0-CURRENT FreeBSD 10.0-CURRENT #5 r248281M:
 Thu Mar 14 18:55:48 CDT 2013
 r...@jri.homeunix.com:/usr/obj/root/ATH/head/sys/ATH  amd64
 [jri:~] root# pciconf -lv # Truncated
 none3@pci0:2:0:0:   class=0x028000 card=0x3112168c chip=0x0030168c
 rev=0x01 hdr=0x00
 vendor = 'Atheros Communications Inc.'
 device = 'AR9300 Wireless LAN adaptor'
 class  = network
 [jri:~] root# diff ATH/head/sys/amd64/conf/{ATH,GENERIC}
 27,30d26
  options ATH_DEBUG
  options AH_DEBUG
  options ATH_DIAGAPI
 
 142c138
  #device   cd  # CD
 ---

 devicecd  # CD

 [jri:~] root# ifconfig
 nfe0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu
 1500
 options=82008VLAN_MTU,WOL_MAGIC,LINKSTATE
 ether 6c:f0:49:d5:6f:6a
 inet 192.168.1.6 netmask 0xff00 broadcast 192.168.1.255
 inet 192.168.1.2 netmask 0xff00 broadcast 192.168.1.255
 nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL
 media: Ethernet autoselect (1000baseT full-duplex)
 status: active
 lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST metric 0 mtu 16384
 options=63RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6
 inet6 ::1 prefixlen 128
 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
 inet 127.0.0.1 netmask 0xff00
 nd6 options=21PERFORMNUD,AUTO_LINKLOCAL
 [jri:~] root# kldload if_ath
 kldload: can't load if_ath: File exists


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


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


Re: Fine, OK, here's my initial AR9380/AR9485 support

2013-03-14 Thread Joshua Isom

On 3/14/2013 9:20 PM, Adrian Chadd wrote:

Oh!

http://wikidevi.com/wiki/TP-LINK_TL-WDN4800

Silly me, I was reading the wrong number on my phone.

Yes, 0x0030 is Osprey (AR9380.)

kldload if_ath_pci too. :-)



Adrian



Something weird happened.  My config has ath_pci listed, but then I get 
this.



[jri:~] root# kldload if_ath_pci
kldload: can't load if_ath_pci: Exec format error
[jri:~] root# file /boot/kernel/if_ath_pci.ko
/boot/kernel/if_ath_pci.ko: ELF 64-bit LSB relocatable, x86-64, version 1 
(FreeBSD), not stripped


Other modules like ath return the standard already loaded message.
___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to freebsd-wireless-unsubscr...@freebsd.org


Re: Fine, OK, here's my initial AR9380/AR9485 support

2013-03-13 Thread Adrian Chadd
On 9 March 2013 10:54, Adrian Chadd adr...@freebsd.org wrote:

 What's tested:

 * legacy, 1x1 and 2x2 HT20/HT40, STA mode
 * AR9380 (1x1, 2x2 - 2/5ghz)
 * AR9485 (1x1, 2ghz only)

I can now add two more NICs to this list:

* AR9390 (HB116)
* AR9462 (WB225)

Thanks,


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


Re: Fine, OK, here's my initial AR9380/AR9485 support

2013-03-13 Thread Joshua Isom
I added a cast to u_int64_t first on line 63 of ar9300_gpio.c to get it 
to compile.  I imagine (void *) would be prefered, but I don't know 
what's actually correct.  Unfortunately, I get a kernel panic on boot 
with scsi_cd, so I'll have to wait until that's dealt with before trying 
the ath driver.


On 3/13/2013 7:30 PM, Adrian Chadd wrote:

Hi,

I've fixed some warnings - please update the git repo youre using.

I've also added some clang workarounds in the MAkefile (see the bottom
of the file for the two lines to update) - so please svn update in
sys/modules/ath/

Hopefully that works enough for you! Please let me know what other
build errors you're seeing.

Thanks,


Adrian



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


Re: Fine, OK, here's my initial AR9380/AR9485 support

2013-03-13 Thread Adrian Chadd
Can you please post the patch and the specific compile issue?



adrian


On 13 March 2013 18:41, Joshua Isom jri...@gmail.com wrote:
 I added a cast to u_int64_t first on line 63 of ar9300_gpio.c to get it to
 compile.  I imagine (void *) would be prefered, but I don't know what's
 actually correct.  Unfortunately, I get a kernel panic on boot with scsi_cd,
 so I'll have to wait until that's dealt with before trying the ath driver.


 On 3/13/2013 7:30 PM, Adrian Chadd wrote:

 Hi,

 I've fixed some warnings - please update the git repo youre using.

 I've also added some clang workarounds in the MAkefile (see the bottom
 of the file for the two lines to update) - so please svn update in
 sys/modules/ath/

 Hopefully that works enough for you! Please let me know what other
 build errors you're seeing.

 Thanks,


 Adrian


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


Re: Fine, OK, here's my initial AR9380/AR9485 support

2013-03-13 Thread Adrian Chadd
... oh, that's with the smartantenna support.

Which I guess they've never actually _put_ on a 64 bit platform. so
it's doing direct  SOC GPIO port accesses from the HAL. That's .. ew.
Anyway.

I've just fixed it; so please update your git repo and the bad code
will magically not compile in any longer.



adrian


On 13 March 2013 19:16, Adrian Chadd adr...@freebsd.org wrote:
 Can you please post the patch and the specific compile issue?



 adrian


 On 13 March 2013 18:41, Joshua Isom jri...@gmail.com wrote:
 I added a cast to u_int64_t first on line 63 of ar9300_gpio.c to get it to
 compile.  I imagine (void *) would be prefered, but I don't know what's
 actually correct.  Unfortunately, I get a kernel panic on boot with scsi_cd,
 so I'll have to wait until that's dealt with before trying the ath driver.


 On 3/13/2013 7:30 PM, Adrian Chadd wrote:

 Hi,

 I've fixed some warnings - please update the git repo youre using.

 I've also added some clang workarounds in the MAkefile (see the bottom
 of the file for the two lines to update) - so please svn update in
 sys/modules/ath/

 Hopefully that works enough for you! Please let me know what other
 build errors you're seeing.

 Thanks,


 Adrian


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


Re: Fine, OK, here's my initial AR9380/AR9485 support

2013-03-12 Thread Joshua Isom
I had to remove the /sys/ from the PATH and CFLAGS to point to the right 
directory, it's still failing with warnings.  I tried gcc and clang. 
I'll try to see how much I can patch myself without knowing the code at all.


On 3/11/2013 10:25 PM, Adrian Chadd wrote:

Ok, I see that clang is doing some odd expansion there. I've poked the
clang nerds about it, I'll see what they say.

Anyway - I've shifted its location - now please create a new directory
- sys/contrib/dev/ath/ath_hal/ar9300/, and put your symlinks in there.

Then uncomment in ath/Makefile like this:

Index: ath/Makefile
===
--- ath/Makefile(revision 248181)
+++ ath/Makefile(working copy)
@@ -124,13 +124,13 @@
  SRCS+=  ar9287.c ar9287_reset.c ar9287_attach.c ar9287_cal.c ar9287_olc.c

  # + AR9300 HAL
-# .PATH:  ${.CURDIR}/../../contrib/sys/dev/ath/ath_hal/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
+.PATH:  ${.CURDIR}/../../contrib/sys/dev/ath/ath_hal/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

  # NB: rate control is bound to the driver by symbol names so only pick one
  .if ${ATH_RATE} == sample
@@ -149,7 +149,7 @@
  SRCS+= dfs_null.c

  CFLAGS+=  -I. -I${.CURDIR}/../../dev/ath -I${.CURDIR}/../../dev/ath/ath_hal
-# CFLAGS+=  -I. -I${.CURDIR}/../../contrib/sys/dev/ath/ath_hal/
+CFLAGS+=  -I. -I${.CURDIR}/../../contrib/sys/dev/ath/ath_hal/

  .if !defined(KERNBUILDDIR)
  opt_ah.h:



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


Re: Fine, OK, here's my initial AR9380/AR9485 support

2013-03-11 Thread Adrian Chadd
Try this:

adrian@cynthia:~/git/github/erikarn$
g...@github.com:erikarn/qcamain_open_hal_public.git
-bash: g...@github.com:erikarn/qcamain_open_hal_public.git: No such
file or directory
adrian@cynthia:~/git/github/erikarn$ git clone
https://github.com/erikarn/qcamain_open_hal_public.git
Cloning into qcamain_open_hal_public...
cd qc   remote: Counting objects: 128, done.
remote: Compressing objects: 100% (67/67), done.
remote: Total 128 (delta 66), reused 118 (delta 56)
Receiving objects: 100% (128/128), 857.79 KiB | 486 KiB/s, done.
Resolving deltas: 100% (66/66), done.
adrian@cynthia:~/git/github/erikarn$ cd qcamain_open_hal_public/
adrian@cynthia:~/git/github/erikarn/qcamain_open_hal_public$ git
checkout local/freebsd
Branch local/freebsd set up to track remote branch local/freebsd from origin.
Switched to a new branch 'local/freebsd'
adrian@cynthia:~/git/github/erikarn/qcamain_open_hal_public$ ls
hal/ar9300/*freebsd*
hal/ar9300/ar9300_freebsd.c hal/ar9300/ar9300_freebsd.h 
hal/ar9300/ar9300_freebsd_inc.h
adrian@cynthia:~/git/github/erikarn/qcamain_open_hal_public$

...

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


Re: Fine, OK, here's my initial AR9380/AR9485 support

2013-03-11 Thread Joshua Isom
Here's me retrying everything.  I also tried running make with 
-DAH_DEBUG and -DAH_DEBUG_ALQ, but I also got errors messages that made 
me think the variables didn't propagate to the source files.



[jri:~/ATH/head] root# uname -a
FreeBSD jri.homeunix.com 9.1-STABLE FreeBSD 9.1-STABLE #1: Thu Jan 24 22:19:24 
UTC 2013 root@buildjail:/usr/obj/usr/src/sys/GENERIC  amd64
[jri:~/ATH/head] root# svn info
Path: .
Working Copy Root Path: /root/ATH/head
URL: https://svn0.us-east.freebsd.org/base/head
Repository Root: https://svn0.us-east.freebsd.org/base
Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revision: 248174
Node Kind: directory
Schedule: normal
Last Changed Author: tuexen
Last Changed Rev: 248172
Last Changed Date: 2013-03-11 12:43:55 -0500 (Mon, 11 Mar 2013)

[jri:~/ATH/head] root# svn diff
Index: sys/modules/ath/Makefile
===
--- sys/modules/ath/Makefile(revision 248174)
+++ sys/modules/ath/Makefile(working copy)
@@ -124,13 +124,13 @@
 SRCS+=  ar9287.c ar9287_reset.c ar9287_attach.c ar9287_cal.c ar9287_olc.c

 # + AR9300 HAL
-# .PATH:  ${.CURDIR}/../../dev/ath/ath_hal/ar9003
-#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
+ .PATH:  ${.CURDIR}/../../dev/ath/ath_hal/ar9003
+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

 # NB: rate control is bound to the driver by symbol names so only pick one
 .if ${ATH_RATE} == sample




[jri:~/ATH/qcamain_open_hal_public] root# git status
# On branch local/freebsd
nothing to commit, working directory clean
[jri:~/ATH/qcamain_open_hal_public] root# cat .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote origin]
url = https://github.com/erikarn/qcamain_open_hal_public.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch master]
remote = origin
merge = refs/heads/master
[branch local/freebsd]
remote = origin
merge = refs/heads/local/freebsd



[jri:ath/ath_hal/ar9003] root# pwd
/root/ATH/head/sys/dev/ath/ath_hal/ar9003
[jri:ath/ath_hal/ar9003] root# ln -s 
/root/ATH/qcamain_open_hal_public/hal/ar9300/* .
ln: ./ar9300_devid.h: File exists



[jri:~/ATH/head] root# ls /usr/obj
[jri:~/ATH/head] root# make -j 3 buildworld  ../buildworld.txt
[jri:~/ATH/head] root# make -j 6 -k buildkernel  ../buildkernel.txt
[jri:~/ATH/head] root# make -DNO_CLEAN -k buildkernel  ../buildkernel-next.txt
/root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal/ar9003/ar9300_radio.c:83:27:
 error: unused variable 'ichan' [-Werror,-Wunused-variable]
HAL_CHANNEL_INTERNAL *ichan = ath_hal_checkchannel(ah, chan);
  ^
1 error generated.
/root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal/ar9003/ar9300_misc.c:853:38: 
error: use of logical '' with constant operand 
[-Werror,-Wconstant-logical-operand]
if ((ahp-ah_enterprise_mode  AR_ENT_OTP_MIN_PKT_SIZE_DISABLE) 
 ^  ~~~
/root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal/ar9003/ar9300_misc.c:853:38: 
note: use '' for a bitwise operation
if ((ahp-ah_enterprise_mode  AR_ENT_OTP_MIN_PKT_SIZE_DISABLE) 
 ^~
 
/root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal/ar9003/ar9300_misc.c:853:38:
 note: remove constant to silence this warning
if ((ahp-ah_enterprise_mode  AR_ENT_OTP_MIN_PKT_SIZE_DISABLE) 
~^~
1 error generated.
In file included from 
/root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal/ar9003/ar9300_eeprom.c:21:
/root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal/ar9003/ar9300template_generic.h:107:3:
 error: implicit conversion from 'int' to 'u_int8_t' (aka 'unsigned char')
  changes value from -477 to 35 [-Werror,-Wconstant-conversion]
FREQ2FBIN(2412, 1),
^~
/root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal/ar9003/ar9300eep.h:136:65: 
note: expanded from macro 'FREQ2FBIN'
(((y) == HAL_FREQ_BAND_2GHZ) ? ((x) - 2300) : (((x) - 4800) / 5))
   ~^~~
In 

Re: Fine, OK, here's my initial AR9380/AR9485 support

2013-03-11 Thread Adrian Chadd
Is this with clang?




adrian


On 11 March 2013 17:39, Joshua Isom jri...@gmail.com wrote:
 Still no luck, and some errors look like I'm missing more.


 /root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal/ar9003/ar9300_misc.c:853:38:
 error: use of logical '' with constant operand
 [-Werror,-Wconstant-logical-operand]
 if ((ahp-ah_enterprise_mode  AR_ENT_OTP_MIN_PKT_SIZE_DISABLE) 
  ^  ~~~

 AR_ENT_OTP_MIN_PKT_SIZE_DISABLE is defined in ar9300reg.h and hardcoded.

 At least you figured out an easy way to genuine check to see if someone
 tried your code.


 On 3/11/2013 6:41 PM, Adrian Chadd wrote:

 Ooh.. add the debug options to your kernel, sorry!

 options ATH_DEBUG
 options AH_DEBUG
 options ATH_DIAGAPI

 I'm sorry, I've never tested it outside of a debug build before.




 Adrian


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


Re: Fine, OK, here's my initial AR9380/AR9485 support

2013-03-11 Thread Adrian Chadd
.. and yeah, that code is wrong. GCC doesn't complain; just change it to:

if ((ahp-ah_enterprise_mode  AR_ENT_OTP_MIN_PKT_SIZE_DISABLE) 

to:

if ((ahp-ah_enterprise_mode  AR_ENT_OTP_MIN_PKT_SIZE_DISABLE) 

Thanks, this is the first bug that I can file as having come from the
FreeBSD community. :)



Adrian


On 11 March 2013 17:41, Adrian Chadd adr...@freebsd.org wrote:
 Is this with clang?




 adrian


 On 11 March 2013 17:39, Joshua Isom jri...@gmail.com wrote:
 Still no luck, and some errors look like I'm missing more.


 /root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal/ar9003/ar9300_misc.c:853:38:
 error: use of logical '' with constant operand
 [-Werror,-Wconstant-logical-operand]
 if ((ahp-ah_enterprise_mode  AR_ENT_OTP_MIN_PKT_SIZE_DISABLE) 
  ^  ~~~

 AR_ENT_OTP_MIN_PKT_SIZE_DISABLE is defined in ar9300reg.h and hardcoded.

 At least you figured out an easy way to genuine check to see if someone
 tried your code.


 On 3/11/2013 6:41 PM, Adrian Chadd wrote:

 Ooh.. add the debug options to your kernel, sorry!

 options ATH_DEBUG
 options AH_DEBUG
 options ATH_DIAGAPI

 I'm sorry, I've never tested it outside of a debug build before.




 Adrian


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


Re: Fine, OK, here's my initial AR9380/AR9485 support

2013-03-11 Thread Adrian Chadd
On 11 March 2013 17:43, Adrian Chadd adr...@freebsd.org wrote:
 .. and yeah, that code is wrong. GCC doesn't complain; just change it to:

 if ((ahp-ah_enterprise_mode  AR_ENT_OTP_MIN_PKT_SIZE_DISABLE) 

 to:

 if ((ahp-ah_enterprise_mode  AR_ENT_OTP_MIN_PKT_SIZE_DISABLE) 

 Thanks, this is the first bug that I can file as having come from the
 FreeBSD community. :)

Please file an issue regarding this problem:

https://github.com/qca/qcamain_open_hal_public/issues

and feel free to file another issue (this doesn't compile if ATH_DEBUG
/ AH_DEBUG isn't specified.)

I can submit fixes for both of those in the upstream (internal) HAL.



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


Re: Fine, OK, here's my initial AR9380/AR9485 support

2013-03-11 Thread Joshua Isom
I had tried the buildworld with -DWITHOUT_CLANG at one point, partially 
to speed up buildworld since building clang is slow without large 
amounts of memory.  Most of the errors were the same, so my last 
buildworld was just stock.


On 3/11/2013 7:41 PM, Adrian Chadd wrote:

Is this with clang?




adrian


On 11 March 2013 17:39, Joshua Isom jri...@gmail.com wrote:

Still no luck, and some errors look like I'm missing more.


/root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal/ar9003/ar9300_misc.c:853:38:
error: use of logical '' with constant operand
[-Werror,-Wconstant-logical-operand]
 if ((ahp-ah_enterprise_mode  AR_ENT_OTP_MIN_PKT_SIZE_DISABLE) 
  ^  ~~~

AR_ENT_OTP_MIN_PKT_SIZE_DISABLE is defined in ar9300reg.h and hardcoded.

At least you figured out an easy way to genuine check to see if someone
tried your code.


On 3/11/2013 6:41 PM, Adrian Chadd wrote:


Ooh.. add the debug options to your kernel, sorry!

options ATH_DEBUG
options AH_DEBUG
options ATH_DIAGAPI

I'm sorry, I've never tested it outside of a debug build before.




Adrian





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


Re: Fine, OK, here's my initial AR9380/AR9485 support

2013-03-11 Thread Adrian Chadd
Ok, I see that clang is doing some odd expansion there. I've poked the
clang nerds about it, I'll see what they say.

Anyway - I've shifted its location - now please create a new directory
- sys/contrib/dev/ath/ath_hal/ar9300/, and put your symlinks in there.

Then uncomment in ath/Makefile like this:

Index: ath/Makefile
===
--- ath/Makefile(revision 248181)
+++ ath/Makefile(working copy)
@@ -124,13 +124,13 @@
 SRCS+=  ar9287.c ar9287_reset.c ar9287_attach.c ar9287_cal.c ar9287_olc.c

 # + AR9300 HAL
-# .PATH:  ${.CURDIR}/../../contrib/sys/dev/ath/ath_hal/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
+.PATH:  ${.CURDIR}/../../contrib/sys/dev/ath/ath_hal/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

 # NB: rate control is bound to the driver by symbol names so only pick one
 .if ${ATH_RATE} == sample
@@ -149,7 +149,7 @@
 SRCS+= dfs_null.c

 CFLAGS+=  -I. -I${.CURDIR}/../../dev/ath -I${.CURDIR}/../../dev/ath/ath_hal
-# CFLAGS+=  -I. -I${.CURDIR}/../../contrib/sys/dev/ath/ath_hal/
+CFLAGS+=  -I. -I${.CURDIR}/../../contrib/sys/dev/ath/ath_hal/

 .if !defined(KERNBUILDDIR)
 opt_ah.h:
___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to freebsd-wireless-unsubscr...@freebsd.org


Re: Fine, OK, here's my initial AR9380/AR9485 support

2013-03-10 Thread Joshua Isom
I patched according to the instructions, but it fails with these four 
missing files:


ash_amem.h
ar9300_freebsd.c
ar9300_stub_funcs.c
ar9300_stub.c

I tried commenting them out, the .c files in the makefile, ash_amem.h in 
the .c file, but the build fails.

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


Re: Fine, OK, here's my initial AR9380/AR9485 support

2013-03-10 Thread Adrian Chadd
You didn't check out the local/freebsd branch.

On 10 March 2013 09:29, Joshua Isom jri...@gmail.com wrote:
 I patched according to the instructions, but it fails with these four
 missing files:

 ash_amem.h
 ar9300_freebsd.c
 ar9300_stub_funcs.c
 ar9300_stub.c

 I tried commenting them out, the .c files in the makefile, ash_amem.h in the
 .c file, but the build fails.
 ___
 freebsd-wireless@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
 To unsubscribe, send any mail to freebsd-wireless-unsubscr...@freebsd.org
___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to freebsd-wireless-unsubscr...@freebsd.org


Re: Fine, OK, here's my initial AR9380/AR9485 support

2013-03-10 Thread Joshua Isom
It's my first time using git, so there's a learning curve.  I'm building 
on 9-STABLE, but because of yacc I am doing a buildworld first.  First 
it fails with ichan not being used in ar9300_radio.c.  I commented it 
out, rebuilt, and then it fails with the errors listed below.  I was 
using -j, but the error messages look readable enough.  Any clue to get 
it to compile?


On 3/10/2013 11:43 AM, Adrian Chadd wrote:

You didn't check out the local/freebsd branch.

On 10 March 2013 09:29, Joshua Isom jri...@gmail.com wrote:

I patched according to the instructions, but it fails with these four
missing files:

ash_amem.h
ar9300_freebsd.c
ar9300_stub_funcs.c
ar9300_stub.c

I tried commenting them out, the .c files in the makefile, ash_amem.h in the
.c file, but the build fails.
___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to freebsd-wireless-unsubscr...@freebsd.org



/root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal/ar9003/ar9300_misc.c:853:38: 
error: use of logical '' with constant operand 
[-Werror,-Wconstant-logical-operand]

if ((ahp-ah_enterprise_mode  AR_ENT_OTP_MIN_PKT_SIZE_DISABLE) 
 ^  ~~~
/root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal/ar9003/ar9300_misc.c:853:38: 
note: use '' for a bitwise operation

if ((ahp-ah_enterprise_mode  AR_ENT_OTP_MIN_PKT_SIZE_DISABLE) 
 ^~
 
/root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal/ar9003/ar9300_misc.c:853:38: 
note: remove constant to silence this warning

if ((ahp-ah_enterprise_mode  AR_ENT_OTP_MIN_PKT_SIZE_DISABLE) 
~^~
cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE 
-nostdinc  -I. -I/root/ATH/head/sys/modules/ath/../../dev/ath 
-I/root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal 
-DHAVE_KERNEL_OPTION_HEADERS -include 
/usr/obj/root/ATH/head/sys/GENERIC/opt_global.h -I. -I@ -I@/contrib/altq 
-fno-common -g -fno-omit-frame-pointer 
-I/usr/obj/root/ATH/head/sys/GENERIC  -mno-aes -mno-avx -mcmodel=kernel 
-mno-red-zone -mno-mmx -mno-sse -msoft-float 
-fno-asynchronous-unwind-tables -ffreestanding -fstack-protector 
-std=iso9899:1999 -Qunused-arguments -fstack-protector -Wall 
-Wredundant-decls -Wnested-externs -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef 
-Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs 
-fdiagnostics-show-option  -Wno-error-tautological-compare 
-Wno-error-empty-body  -Wno-error-parentheses-equality  -c 
/root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal/ar9003/ar9300_stub_funcs.c
cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE 
-nostdinc  -I. -I/root/ATH/head/sys/modules/ath/../../dev/ath 
-I/root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal 
-DHAVE_KERNEL_OPTION_HEADERS -include 
/usr/obj/root/ATH/head/sys/GENERIC/opt_global.h -I. -I@ -I@/contrib/altq 
-fno-common -g -fno-omit-frame-pointer 
-I/usr/obj/root/ATH/head/sys/GENERIC  -mno-aes -mno-avx -mcmodel=kernel 
-mno-red-zone -mno-mmx -mno-sse -msoft-float 
-fno-asynchronous-unwind-tables -ffreestanding -fstack-protector 
-std=iso9899:1999 -Qunused-arguments -fstack-protector -Wall 
-Wredundant-decls -Wnested-externs -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef 
-Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs 
-fdiagnostics-show-option  -Wno-error-tautological-compare 
-Wno-error-empty-body  -Wno-error-parentheses-equality  -c 
/root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal/ar9003/ar9300_eeprom.c

1 error generated.
*** [ar9300_misc.o] Error code 1
ctfconvert -L VERSION -g ar9300_attach.o
ctfconvert -L VERSION -g ar9300_recv.o
In file included from 
/root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal/ar9003/ar9300_eeprom.c:21:
/root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal/ar9003/ar9300template_generic.h:107:3: 
error: implicit conversion from 'int' to 'u_int8_t' (aka 'unsigned 
char') changes value from -477 to 35 [-Werror,-Wconstant-conversion]

FREQ2FBIN(2412, 1),
^~
/root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal/ar9003/ar9300eep.h:136:65: 
note: expanded from macro 'FREQ2FBIN'

(((y) == HAL_FREQ_BAND_2GHZ) ? ((x) - 2300) : (((x) - 4800) / 5))
   ~^~~
In file included from 
/root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal/ar9003/ar9300_eeprom.c:21:
/root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal/ar9003/ar9300template_generic.h:108:3: 
error: implicit conversion from 'int' to 'u_int8_t' (aka 'unsigned 
char') changes value from -472 to 40 [-Werror,-Wconstant-conversion]

FREQ2FBIN(2437, 1),

Re: Fine, OK, here's my initial AR9380/AR9485 support

2013-03-10 Thread Rui Paulo
On 2013/03/10, at 16:35, Joshua Isom jri...@gmail.com wrote:

 It's my first time using git, so there's a learning curve.  I'm building on 
 9-STABLE, but because of yacc I am doing a buildworld first.  First it fails 
 with ichan not being used in ar9300_radio.c.  I commented it out, rebuilt, 
 and then it fails with the errors listed below.  I was using -j, but the 
 error messages look readable enough.  Any clue to get it to compile?


Did you 'git checkout branch-name' ?

Regards,
--
Rui Paulo

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


Re: Fine, OK, here's my initial AR9380/AR9485 support

2013-03-10 Thread Adrian Chadd
Yes, you need to do this:

Git clone ...
Cd openhal...
Git checkout local/freebsd

It'll create the branch based off of my branch in git.

Then do the ln -s ing.. Then build.



Adrian


Sent from my Palm Pre on ATamp;T
On Mar 10, 2013 5:07 PM, Rui Paulo lt;rpa...@felyko.comgt; wrote: 

On 2013/03/10, at 16:35, Joshua Isom lt;jri...@gmail.comgt; wrote:



gt; It's my first time using git, so there's a learning curve.  I'm building 
on 9-STABLE, but because of yacc I am doing a buildworld first.  First it fails 
with ichan not being used in ar9300_radio.c.  I commented it out, rebuilt, and 
then it fails with the errors listed below.  I was using -j, but the error 
messages look readable enough.  Any clue to get it to compile?





Did you 'git checkout lt;branch-namegt;' ?



Regards,

--

Rui Paulo




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