# Any Plans to Support ath9k?



## Weinter (Nov 17, 2008)

Linux has released drivers for Atheros N Wireless call ath9k
It is OpenSourced
Any plans to add native support for Atheros Wireless N?


----------



## lme@ (Nov 21, 2008)

AFAIK there are no plans to port ath9k.


----------



## bartgrefte (Feb 25, 2011)

Sorry for the kick.

Has there been any change on this?
I would like to get a wifi N card working as access point with pfSense.
Right now it only does G and the driver that is available (ath(4)) has the "stuck beacon" bug, although after trying a bunch of settings it now works, but without N-features.


----------



## butcher (Feb 26, 2011)

You can try FreeBSD CURRENT. Adrian Chadd has done some work with ath(4) driver and he's still doing.


----------



## bartgrefte (Feb 26, 2011)

Okay 

Well, if you can tell me how to get and manually update the ath(4) driver currently in pfSense, I will give it a try.


----------



## DutchDaemon (Feb 27, 2011)

Disclaimer: Topics about PC-BSD | FreeNAS | DesktopBSD | m0N0WALL | pfSense | Debian GNU/kFreeBSD. You can't expect FreeBSD users to know (or advise on) how pfSense should be patched. There may be customizations in the pfSense codebase that are incompatible with the way FreeBSD is laid out.


----------



## bartgrefte (Feb 27, 2011)

I know I know...

I only want to know where I can get the most recent ath(4) driver from FreeBSD, that's all.
Then I'll figure the rest out on my own.


----------



## butcher (Feb 27, 2011)

I think the easiest way to get latest source code of the ath(4) driver is through svn. If you have svn installed you can try this command:
[cmd=]% svn co http://svn.freebsd.org/base/head/sys/dev/ath[/cmd]

But I am not sure that there were no changes of kernel that may be needed also.


----------



## bartgrefte (Feb 27, 2011)

Hmm, don't know if pfSense has that. Gonna check that tomorrow 
But that's the location where the modifications are send to when they are ready?


----------



## bartgrefte (Feb 28, 2011)

Installed svn using *pkg_add*, does not work because of missing "libgssapi.so.10". Found the file in my FreeBSD virtual pc, now installing samba to copy it over the network from there.

edit: Couldn't get samba to work, so used scp.

Ended up coping over all of these:


```
/usr/lib/libgssapi.so.10
/usr/lib/libheimntlm.so.10
/usr/lib/libkrb5.so.10
/usr/lib/libhx509.so.10
/usr/lib/libasn1.so.10
/usr/lib/libroken.so.10
```

Ran your command, which worked  Gonna try compile/build it later, dinner first 

edit:

Can't seem to compile it. Running *make* followed by filename produces a whole lot of text containing errors, tried this with FreeBSD 8.2 in the virtual pc I got. Someone on pfSense's forum mentioned the compiling should be done there and not in pfSense. (That's why I tried that there.)


----------



## bartgrefte (Mar 3, 2011)

Managed to get the driver compiled in my virtual pc with FreeBSD 8.2, something with forgetting to install the kernel headers:r

Anyway, now I just have to figure out how to have pfSense ignore the ath driver that is already in the kernel and use the one I got here. Google explained how to enable/disable (load/unload) drivers in FreeBSD, but it not explained how to do what I want, without having to rebuild the kernel that is.

How does one do this in FreeBSD? If it's even possible...


----------



## butcher (Mar 3, 2011)

AFAIK, It is not possible.


----------



## tingo (Mar 3, 2011)

Build a new kernel for your pfSense.


----------



## bartgrefte (Mar 8, 2011)

After a few attempts I managed to make a custom pfSense, however, the driver is still in there.

Adding 
	
	



```
WITHOUT_MODULES = ath
```
 to /etc/make.conf does not seem to work.


----------



## tingo (Mar 12, 2011)

How does your kernel config file look? It is there you need to change things.
For example, the GENERIC config file includes the following for ath:

```
root@kg-vm# grep ath /sys/amd64/conf/GENERIC
device		ath		# Atheros pci/cardbus NIC's
device		ath_hal		# pci/cardbus chip support
device		ath_rate_sample	# SampleRate tx rate control for ath
device		uath		# Atheros AR5523 wireless NICs
```

Create a new kernel config  file, include GENERIC (or whatever pfSense calls it), the do


> nodevice ath


and so on to exclude the drivers from it. Then compile your new kernel.


----------



## bartgrefte (Mar 12, 2011)

It does not (seem to) work that way with pfSense, apparently I had to modify the pfSense buildscript, but that did not help. Then someone said to add 
	
	



```
export MODULES_OVERRIDE="i2c ipmi acpi ndis ipfw ipdivert dummynet fdescfs cpufreq opensolaris zfs glxsb runfw if_stf ath"
```
 to certain buildfiles. The only thing that was different when doing that, was that the Atheros module was integrated in the kernel *and* added as separate module in the /boot/kernel/ folder.


----------



## tingo (Mar 12, 2011)

Well, somewhere in the pfSense source the kernel config they use is hidden. Once you find it, you can change it.


----------

