Atheros 9285 drivers

Hello, I've recently installed an Atheros AR9285 wireless pcie card on my netbook, and I've run into some issues (bb hangs, scanning coming empty sometimes, or unresponsive)

Browsing the forums, I've found reports that fetching the latest ath driver from -HEAD fixes the problem, now, I've tried to get them trough cvsup, but since I don't want to overwrite the whole src-sys package, I replaced the /usr/src/sys/dev/ath and /usr/src/sys/modules/ath manually, but compiling the kernel fails because some problem with Makefiles (I guess they need to be updated)...

Now, I don't want to overwrite ANYTHING except the ath driver, can someone provide me some instructions in how to proceed?

I've already fetched the files in a separate folder called /usr/src-current, and /usr/src has been restored to default (the files that came with -RELEASE)

I've googled a lot, and no one says how to do it properly... :(

Thanks in advance
 
When I rebuilt the ath driver from -HEAD, I checked it out into my home directory. I didn't try to put it in the kernel source tree. You'll need both ath and ath_pci. Go into the sys/modules/ath directory and run make.

When you have the driver file, unload the currently running instance (if there is one) with kldunload and then kldload your new driver. Be sure to use the full path when calling kldload or it will load the driver in /boot/kernel. If it works, make a backup of the one in /boot/kernel, copy your new driver to that directory, and reboot.

There are probably better ways to do all of that but that's what worked for me.
 
Ok I get it, first I'll remove the ath modules from the kernel configuration (and recompile) or I won't be able to load the new one, thanks for your guidance! I'll take it from there

Thanks a lot!
 
Hmm, not so solved as I thought, when I insert the new if_ath.ko the device doesn't attach, when I try to load the if_ath_pci.ko it says:

Code:
KLD if_ath_pci.ko: depends on kernel - not available or version mismatch

Does that mean that it won't work without the new -CURRENT kernel? Or am I missing some steps?
 
To get mine to work, I copied ath_pci.c into the ath directory and added it to the list of sources in the Makefile. I didn't try to compile ath_pci as a separate module.
 
As if_ath_pci.c is already present on sys/dev/ath/, I just added if_ath_pci.c to the sources on the Makefile present in sys/modules/ath/, it compiled, effectively linking with if_ath_pci.o, but, loading if_ath.ko (which loaded fine before) gave me the same kernel mismatch error.
 
It seems to be caused because the definition in <sys/param.h> of __FreeBSD_version doesn't match some other that's supposed to be somewhere in the ath driver code (I can't find it).

The driver still works, and lately hasn't given me any errors, so I'm giving up, I'm not planning on moving to -CURRENT or -STABLE at any time.

Thanks for your assistance anyway!
 
Hi,

You don't have to do anything tricky. You don't have to replace /usr/src/sys/dev/ath or anything. Just build it outside of your tree.

From the top of my head (and I'd prefer independent verification):

* make sure your kernel source is in /usr/src/sys

* rebuild your kernel with the following commented out:

Code:
device ath
device ath_hal
device ath_rate_sample
* recompile/reinstall a kernel sans ath/hal/sample code.

* check out the relevant bits:
Code:
  $ cd ~
  $ mkdir ath
  $ cd ath
  $ svn checkout [url]http://svn.freebsd.org/base/head/sys/dev/ath[/url] head/sys/dev/ath
  $ svn checkout [url]http://svn.freebsd.org/base/head/sys/modules/ath[/url] head/sys/modules/ath
  $ svn checkout [url]http://svn.freebsd.org/base/head/sys/modules/ath_pci[/url] head/sys/modules/ath_pci
  $ cd ~/ath/head/sys/modules/ath && env CFLAGS=-I~/ath/head/sys/ make
  $ cd ~/ath/head/sys/modules/ath_pci && env CFLAGS=-I~/ath/head/sys/ make
Then as root:

Code:
  # cd ~user/ath/head/sys/modules/ath && make install
  # cd ~user/ath/head/sys/modules/ath_pci && make install
* reboot
* kldload if_ath
* kldload if_ath_pci

I actually have an 8.0-REL install on a netbook here which I was doing the majority of my ath/hal development with. So I know the code works (without 11n support, as 8-STABLE's 11n stack support is currently unfinished.)

Good luck!
 
adrian@ said:
I actually have an 8.0-REL install on a netbook here which I was doing the majority of my ath/hal development with. So I know the code works (without 11n support, as 8-STABLE's 11n stack support is currently unfinished.)

Good luck!

Thank you adrian@

My acer aspire 5552-5615's AR9287 works now in 8-STABLE with 802.11g connection after following your instructions
 
Hi. Got an error when try to make [cmd=]cd ~/ath/head/sys/modules/ath && env CFLAGS=-I~/ath/head/sys/ make[/cmd] :(

Code:
[pasha@ /usr/home/pasha/ath/head/sys/modules/ath]$ cd ~/ath/head/sys/modules/ath && env CFLAGS=-I~/ath/head/sys/ make
cc -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I~/ath/head/sys/ -I. -I/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath
 -I/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/ath_hal -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100
 --param large-function-growth=1000 -fno-common  -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2
 -mno-sse3 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999
 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual
  -Wundef -Wno-pointer-sign -fformat-extensions -c /usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:98:42: error: dev/ath/ath_hal/ah_diagcodes.h: No such file or directory
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:100:34: error: dev/ath/if_ath_debug.h: No such file or directory
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:101:33: error: dev/ath/if_ath_misc.h: No such file or directory
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:102:31: error: dev/ath/if_ath_tx.h: No such file or directory
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:103:35: error: dev/ath/if_ath_sysctl.h: No such file or directory
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:104:37: error: dev/ath/if_ath_keycache.h: No such file or directory
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:105:31: error: dev/ath/if_athdfs.h: No such file or directory
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:190: error: expected declaration specifiers or '...' before 'ATH_RESET_TYPE'
cc1: warnings being treated as errors
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c: In function 'ath_attach':
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:288: warning: implicit declaration of function 'DPRINTF'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:288: warning: nested extern declaration of 'DPRINTF'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:288: error: 'ATH_DEBUG_ANY' undeclared (first use in this function)
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:288: error: (Each undeclared identifier is reported only once
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:288: error: for each function it appears in.)
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:302: error: 'struct ath_softc' has no member named 'sc_eepromdata'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:302: error: too many arguments to function 'ath_hal_attach'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:471: warning: implicit declaration of function 'ath_dfs_attach'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:471: warning: nested extern declaration of 'ath_dfs_attach'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:478: error: 'struct ath_softc' has no member named 'sc_dfstask'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:478: error: 'struct ath_softc' has no member named 'sc_dfstask'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:478: error: 'struct ath_softc' has no member named 'sc_dfstask'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:478: error: 'struct ath_softc' has no member named 'sc_dfstask'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:607: error: 'struct ath_softc' has no member named 'sc_rxslink'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:607: warning: implicit declaration of function 
'ath_hal_self_linked_final_rxdesc'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:607: warning: nested extern declaration of 'ath_hal_self_linked_final_rxdesc'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:608: error: 'struct ath_softc' has no member named 'sc_rxtsf32'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:608: warning: implicit declaration of function 'ath_hal_has_long_rxdesc_tsf'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:608: warning: nested extern declaration of 'ath_hal_has_long_rxdesc_tsf'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:683: error: 'HAL_CAP_SERIALISE_WAR' undeclared (first use in this function)
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:685: error: 'struct ath_hal' has no member named 'ah_config'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:725: error: 'ath_raw_xmit' undeclared (first use in this function)
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:731: error: 'struct ath_softc' has no member named 'sc_node_cleanup'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:739: error: 'struct ath_softc' has no member named 'sc_addba_request'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:740: error: 'struct ath_softc' has no member named 'sc_addba_response'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:741: error: 'struct ath_softc' has no member named 'sc_addba_stop'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:742: error: 'struct ath_softc' has no member named 'sc_bar_response'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:743: error: 'struct ath_softc' has no member named 'sc_addba_response_timeout'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:743: error: 'struct ieee80211com' has no member named 
'ic_addba_response_timeout'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:745: error: 'ath_addba_request' undeclared (first use in this function)
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:746: error: 'ath_addba_response' undeclared (first use in this function)
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:747: error: 'struct ieee80211com' has no member named 
'ic_addba_response_timeout'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:747: error: 'ath_addba_response_timeout' undeclared (first use in this function)
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:748: error: 'ath_addba_stop' undeclared (first use in this function)
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:749: error: 'ath_bar_response' undeclared (first use in this function)
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:761: warning: implicit declaration of function 'ath_sysctlattach'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:761: warning: nested extern declaration of 'ath_sysctlattach'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:762: warning: implicit declaration of function 'ath_sysctl_stats_attach'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:762: warning: nested extern declaration of 'ath_sysctl_stats_attach'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:763: warning: implicit declaration of function 'ath_sysctl_hal_attach'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:763: warning: nested extern declaration of 'ath_sysctl_hal_attach'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c: In function 'ath_detach':
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:786: error: 'ATH_DEBUG_ANY' undeclared (first use in this function)
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:812: warning: implicit declaration of function 'ath_dfs_detach'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:812: warning: nested extern declaration of 'ath_dfs_detach'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c: In function 'ath_vap_create':
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:986: error: 'ath_bufhead' has no member named 'tqh_first'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:1010: error: 'ath_key_alloc' undeclared (first use in this function)
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:1011: error: 'ath_key_delete' undeclared (first use in this function)
...
...

/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:6602: warning: implicit declaration of function 'ath_dfs_process_radar_event'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:6602: warning: nested extern declaration of 'ath_dfs_process_radar_event'
*** Error code 1

Stop in /usr/home/pasha/ath/head/sys/modules/ath.
 
palochka said:
Hi. Got an error when try to make [cmd=]cd ~/ath/head/sys/modules/ath && env CFLAGS=-I~/ath/head/sys/ make[/cmd] :(

Code:
[pasha@ /usr/home/pasha/ath/head/sys/modules/ath]$ cd ~/ath/head/sys/modules/ath && env CFLAGS=-I~/ath/head/sys/ make
cc -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I~/ath/head/sys/ -I. -I/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath
 -I/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/ath_hal -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100
 --param large-function-growth=1000 -fno-common  -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2
 -mno-sse3 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999
 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual
  -Wundef -Wno-pointer-sign -fformat-extensions -c /usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:98:42: error: dev/ath/ath_hal/ah_diagcodes.h: No such file or directory

... snip ...

*** Error code 1

Stop in /usr/home/pasha/ath/head/sys/modules/ath.

This may be caused by the use of ~ in the paths. Even with correct include paths the code will not compile due to missing 802.11n infrastructure in the kernel.
 
chvor said:
This may be caused by the use of ~ in the paths. Even with correct include paths the code will not compile due to missing 802.11n infrastructure in the kernel.

You're Right:

Code:
[pasha@pasha ~/ath]$ cd ~/ath/head/sys/modules/ath && env CFLAGS=-I/usr/home/pasha/ath/head/sys/ make
Warning: Object directory not changed from original /usr/home/pasha/ath/head/sys/modules/ath
@ -> /usr/src/sys
machine -> /usr/src/sys/i386/include
awk -f @/tools/makeobjops.awk @/kern/device_if.m -h
awk -f @/tools/makeobjops.awk @/kern/bus_if.m -h
awk -f @/tools/makeobjops.awk @/dev/pci/pci_if.m -h
:> opt_inet.h
:> opt_ath.h
echo '#define AH_SUPPORT_AR5416 1' > opt_ah.h
:> opt_wlan.h
cc -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I/usr/home/pasha/ath/head/sys/ -I. -I/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath -I/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/ath_hal -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common  -mno-align-long-strings -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c /usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c: In function 'ath_attach':
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:743: error: 'struct ieee80211com' has no member named 'ic_addba_response_timeout'
/usr/home/pasha/ath/head/sys/modules/ath/../../dev/ath/if_ath.c:747: error: 'struct ieee80211com' has no member named 'ic_addba_response_timeout'
*** Error code 1

Stop in /usr/home/pasha/ath/head/sys/modules/ath.
 
Tried commenting out the two offending lines. They're installing response timeout handlers which is a more recent addition to net80211. The module loaded but there was no ath0 interface or any log entries.

Right now I'm using ath as a module (from 8-STABLE with key handling patches). I hope if it stops working I can just reload it instead of rebooting the system.
 
adrian@ said:
Hi,
You don't have to do anything tricky. You don't have to replace /usr/src/sys/dev/ath or anything. Just build it outside of your tree.
...

Code:
# uname -mrs
FreeBSD 9.0-RELEASE i386

Code:
cd /usr/update/src/AR9285 && \
rm -rf /usr/update/src/AR9285/head  && \
svn checkout http://svn.freebsd.org/base/head/sys/dev/ath head/sys/dev/ath && \
svn checkout http://svn.freebsd.org/base/head/sys/modules/ath head/sys/modules/ath && \
svn checkout http://svn.freebsd.org/base/head/sys/modules/ath_pci head/sys/modules/ath_pci && \
cd /usr/update/src/AR9285/head/sys/modules/ath && env CFLAGS=-I/usr/update/src/AR9285/head/sys/ make && \
cd /usr/update/src/AR9285/head/sys/modules/ath_pci && env CFLAGS=-I/usr/update/src/AR9285/head/sys/ make && \
cd /usr/update/src/AR9285/head/sys/modules/ath && make install && \
cd /usr/update/src/AR9285/head/sys/modules/ath_pci && make install

Code:
...
cc -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I/usr/update/src/AR9285/head/sys/ -I.
 -I/usr/update/src/AR9285/head/sys/modules/ath/../../dev/ath
 -I/usr/update/src/AR9285/head/sys/modules/ath/../../dev/ath/ath_hal
 -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common
   -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-sse -mno-mmx -msoft-float -ffreestanding -fstack-protector
 -std=iso9899:1999 -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  -c /usr/update/src/AR9285/head/sys/modules/ath/../../dev/ath/if_ath.c
cc1: warnings being treated as errors
/usr/update/src/AR9285/head/sys/modules/ath/../../dev/ath/if_ath.c: In function 'ath_attach':
/usr/update/src/AR9285/head/sys/modules/ath/../../dev/ath/if_ath.c:741: warning: assignment from incompatible pointer type
*** Error code 1

Stop in /usr/update/src/AR9285/head/sys/modules/ath.

:(
 
HEAD does not compile on 8.3

In case anyone else runs into this issue:

The weak signal problem still exists in 8.3-RELEASE. The ath driver from HEAD does not compile on 8.3, but Adrian's instructions worked for me when I simply substituted stable/9 for head.

9.0-RELEASE is rather sluggish on my netbook, otherwise I would have stuck with it. It seems to be mainly filesystem performance: The system becomes somewhat unresponsive during heavy I/O (like extracting a tarball). Hopefully this will be worked out in time for 9.1.

Jason

adrian@ said:
Hi,

You don't have to do anything tricky. You don't have to replace /usr/src/sys/dev/ath or anything. Just build it outside of your tree.

From the top of my head (and I'd prefer independent verification):

* make sure your kernel source is in /usr/src/sys

* rebuild your kernel with the following commented out:

Code:
device ath
device ath_hal
device ath_rate_sample
* recompile/reinstall a kernel sans ath/hal/sample code.

* check out the relevant bits:
Code:
  $ cd ~
  $ mkdir ath
  $ cd ath
  $ svn checkout [url]http://svn.freebsd.org/base/head/sys/dev/ath[/url] head/sys/dev/ath
  $ svn checkout [url]http://svn.freebsd.org/base/head/sys/modules/ath[/url] head/sys/modules/ath
  $ svn checkout [url]http://svn.freebsd.org/base/head/sys/modules/ath_pci[/url] head/sys/modules/ath_pci
  $ cd ~/ath/head/sys/modules/ath && env CFLAGS=-I~/ath/head/sys/ make
  $ cd ~/ath/head/sys/modules/ath_pci && env CFLAGS=-I~/ath/head/sys/ make
Then as root:

Code:
  # cd ~user/ath/head/sys/modules/ath && make install
  # cd ~user/ath/head/sys/modules/ath_pci && make install
* reboot
* kldload if_ath
* kldload if_ath_pci

I actually have an 8.0-REL install on a netbook here which I was doing the majority of my ath/hal development with. So I know the code works (without 11n support, as 8-STABLE's 11n stack support is currently unfinished.)

Good luck!
 
Well, this is odd. My netbook (ASUS 1015PE) was working fine after rebuilding the kernel, installing the 9-stable driver, and rebooting. After a second reboot, without rebuilding/reinstalling anything, if_ath_pci fails to load with:

Code:
<<<ROOT@quagga>>> /home/bacon/Sculpin/Ath 288 # kldload if_ath_pci
kldload: can't load if_ath_pci: No such file or directory
<<<ROOT@quagga>>> /home/bacon/Sculpin/Ath 289 # dmesg|tail -1
link_elf: symbol ath_hal_probe undefined

If I find a solution, I'll follow up here. I may just go back to 9.0-RELEASE instead.
 
adrian@ said:
Hi,

You don't have to do anything tricky. You don't have to replace /usr/src/sys/dev/ath or anything. Just build it outside of your tree.

From the top of my head (and I'd prefer independent verification):

* make sure your kernel source is in /usr/src/sys

* rebuild your kernel with the following commented out:

Code:
device ath
device ath_hal
device ath_rate_sample
* recompile/reinstall a kernel sans ath/hal/sample code.

* check out the relevant bits:
Code:
  $ cd ~
  $ mkdir ath
  $ cd ath
  $ svn checkout [url]http://svn.freebsd.org/base/head/sys/dev/ath[/url] head/sys/dev/ath
  $ svn checkout [url]http://svn.freebsd.org/base/head/sys/modules/ath[/url] head/sys/modules/ath
  $ svn checkout [url]http://svn.freebsd.org/base/head/sys/modules/ath_pci[/url] head/sys/modules/ath_pci
  $ cd ~/ath/head/sys/modules/ath && env CFLAGS=-I~/ath/head/sys/ make
  $ cd ~/ath/head/sys/modules/ath_pci && env CFLAGS=-I~/ath/head/sys/ make
Then as root:

Code:
  # cd ~user/ath/head/sys/modules/ath && make install
  # cd ~user/ath/head/sys/modules/ath_pci && make install
* reboot
* kldload if_ath
* kldload if_ath_pci

I actually have an 8.0-REL install on a netbook here which I was doing the majority of my ath/hal development with. So I know the code works (without 11n support, as 8-STABLE's 11n stack support is currently unfinished.)

Good luck!

I'm trying to follow these steps on 9.1. I noticed I also need to check out:
http://svn.freebsd.org/base/head/sys/contrib/dev/ath/ath_hal/

But I'm still getting a lot of "has no member named" errors... Last lines:

Code:
ath/head/sys/modules/ath/../../dev/ath/if_ath.c:6470: error: 'struct ath_vap' has no member named 'av_recvpspoll'
*** [if_ath.o] Error code 1

I don't have remote acess to the machine so I can't paste the full details.
 
Back
Top