# Atheros AR5B95 wifi not recognised



## Eyemaster (Aug 15, 2009)

Hi,

I just got an AMD64 netbook and installed FBSD-8.0-BETA2 on it.

Unfortunately, there seems to be no module that is able to recognize the onboard atheros wireless card : AR5B95


```
none1@pci0:4:0:0:	
class=0x028000 card=0xe016105b chip=0x002b168c rev=0x01 hdr=0x00
    vendor     = 'Atheros Communications Inc.'
    class      = network
```

Does anyone have any idea how to get this card working under FreeBSD? or is somebody working at this?

I would prefer not to use ndis, but rather FreeBSD HAL.

A fix would be great.

thanks,


----------



## Eyemaster (Sep 12, 2009)

the AR9B95 PCI-E card appears to be recognized by linux as AR9285
and this makes sense, since I found the following line in 
/usr/src/sys/dev/ath/ath_hal/ah_devid.h of FreeBSD-9.0CURRENT :


```
ah_devid.h:#define AR9285_DEVID_PCIE 0x002b /* AR9285 PCI-E Kite */
```

Does anyone understand why FreeBSD does not recognize the PCI-E card as AR9285 like linux does?


----------



## w23 (Jan 4, 2010)

I got a AMD64 laptop as well (Gateway LT31) and it appears to have the same Atheros chip.

You ever get it working?


----------



## bschmidt (Jan 4, 2010)

The AR9285 is a probably quite different to the AR9280 which is supported. You might want to try this, though I'm pretty sure it won't work.

```
--- /usr/src/sys/dev/ath/ath_hal/ar5416/ar9280_attach.c 2009-11-04 13:37:41.285520443 +0100
+++ ar9280_attach.c     2010-01-04 10:58:50.032869955 +0100
@@ -733,6 +733,9 @@ ar9280Probe(uint16_t vendorid, uint16_t
        if (vendorid == ATHEROS_VENDOR_ID &&
            (devid == AR9280_DEVID_PCI || devid == AR9280_DEVID_PCIE))
                return "Atheros 9280";
+       else if (vendorid == ATHEROS_VENDOR_ID &&
+           devid == AR9285_DEVID_PCIE)
+               return "Atheros 9285";
        return AH_NULL;
 }
 AH_CHIP(AR9280, ar9280Probe, ar9280Attach);
```


----------



## zhtw (Jan 12, 2010)

> The AR9285 is a probably quite different to the AR9280 which is supported. You might want to try this, though I'm pretty sure it won't work.



I tried this on my Samsung x118 with the same wifi card. You were right, it doesn't work:


```
# grep ath /var/run/dmesg.boot
ath0: <Atheros 9285> mem 0xf6000000-0xf600ffff irq 16 at device 0.0 on pci2
ath0: [ITHREAD]
ath0: unable to attach hardware; HAL status 7
device_attach: ath0 attach returned 6
```
Is there any way to get it working?


----------



## zhtw (Jan 12, 2010)

Btw, this was reported by S. Smirnov and assigned to Rui Paulo. http://www.freebsd.org/cgi/query-pr.cgi?pr=137170


----------



## opensourceje (Jan 27, 2010)

I have the same chipset.

Yesterday i was looking in the sourcecode of driver ar9280, i thought maybe i could copy paste-some code to a ar9285 driver, but when i saw that code, i came to the conclusion that "making a driver" is a lots of levels to far for me now.
(Seeing a FreeBSD drivercode was almost the same experience for me as the day that i saw for the first time in my live, programming code, at that moment i thought it was was made by aliens )
But this was enough smalltalk for this moment.... People, what is the best way to get this driver into FreeBSD? Send an e-mail to Mister Paulo and question it to him?

Greets


----------



## opensourceje (Jan 30, 2010)

There is a driver now:

http://kerneltrap.org/mailarchive/freebsd-mobile/2010/1/29/6737373
http://kerneltrap.org/mailarchive/freebsd-mobile/2010/1/29/6737993

I didn't install it yet. I do it soon as possible.

Ps

Thanks for the driver, Mister Paulo. 
Thanks for the linktip, Vanger.


----------



## zhtw (Feb 1, 2010)

> There is a driver now:

> http://kerneltrap.org/mailarchive/fr...0/1/29/6737373
> http://kerneltrap.org/mailarchive/fr...0/1/29/6737993

> I didn't install it yet. I do it soon as possible.

I tried it and it works. I'm using it right now on my Samsung X118. Thank you, Paulo!

Btw, when my atheros didn't work with freebsd I switched to linux and you know what, linux' version is buggy. My wifi card has been turning off once in awhile so I had to rmmod/modprobe the drived manualy. Now, with FreeBSD it works just fine. (I've been testing it only for 1 day though, but linux' version didn't even usually work that long without reloading the driver.)

Thank you, Paulo, once again.


----------



## w23 (Feb 2, 2010)

Glad the driver is working, gonna have to give it a shot sometime tomorrow.  

Thank you Mr. Paulo!



> Btw, when my atheros didn't work with freebsd I switched to linux and you know what, linux' version is buggy. My wifi card has been turning off once in awhile so I had to rmmod/modprobe the drived manualy.



Just thought I would mention that I had similar problems with the Linux driver and more recent kernels seem to work without issue.


----------



## Eyemaster (Feb 3, 2010)

This driver works great !!! I glad I waited and did not run over to Linux for this. Many thanks to everyone that have contributed (rpaul, ...) !!!
As a matter of fact, I'm using it right no on 9-current

(I can't get kismet to work (2010-01-R1, radiotap_bsd) on this netbook, but that has probably nothing to do with this driver)

EDIT: kismet works excellent after setting 'wlanmode monitor' :r with radiotap_bsd_g


----------



## pmvalente (Mar 12, 2010)

*noob*

sorry I'm a first time user Freebsd, I don't now how to patch this file.
In which directory should I go first? I go to /dev/conf and run patch -C <~/ar....diff, but then it ask me for a file?
help please.
tkx


----------



## lme@ (Mar 16, 2010)

pmvalente said:
			
		

> sorry I'm a first time user Freebsd, I don't now how to patch this file.
> In which directory should I go first? I go to /dev/conf and run patch -C <~/ar....diff, but then it ask me for a file?
> help please.
> tkx



You probably need to go to /usr/src or /usr/src/sys first.


----------



## SterlingCamden (Apr 29, 2010)

The link to the diff file gives a 404 now.  Any way I can get hold of a copy?


----------



## bschmidt (Apr 30, 2010)

It has been committed to HEAD and stable/8, easiest would be to upgrade to stable.


----------



## SterlingCamden (May 1, 2010)

*Thanks*

Did that yesterday -- all fixed.  Thanks for the reply.


----------



## hellpme (May 7, 2010)

*same problem*

hey guys

your instructions make no sense to me.


how can i get this patch, can you explain it in plain english like i am a noob please

i just need my wireless back =/   one day it just cut out and i have tried switching the drivers on the maker's website but i never get a connection cus it can't find any networks. same problem.


----------



## hellpme (May 7, 2010)

basically i click on that patch link and get a 404 and then to me i see jibberish about head 404 but it doesn't explain how i got about getting said patch


any words of encouragement fellas


----------



## lockfile (Aug 4, 2010)

Well the driver is broken in 8.1 Stable. It gives an error message about the chip freezing. PR:kern/148112.


----------

