# FreeBSD 9 RC2 and Atheros ar5413



## francesco74 (Dec 10, 2011)

Hello and thanks in advance for your attention. I am new to FreeBSD, but I must say that I love it. I am in Florence and I apologize if my English is not quite correct, but I ask your help please. I have a problem with my wireless card atheros ar5413. I'm using FreeBSD 9 RC2, I tried PC-BSD RC2, very convenient to quickly get a working desktop, but the kernel at boot gives me this error:


```
ath0: mem <Atheros 5413> 0xfdee0000 0xfdeeffff irq 16 at device-4.0 on pci2
ath0: unable to attach hardware; HAL status 14
device_attach: ath0 attach returned 6
```

The result of `pciconf-lbcv` on the wireless card is as follows:


```
ath0 @ pci0: 2:4:0: class = 0x020000 card = 0x500111ad chip rev = 0x01 hdr = 0x001b168c = 0x00
     vendor = 'Atheros Communications Inc.'
     device = 'AR5413 802.11abg NIC'
     class = network
     subclass = ethernet
     bar [10] = type Memory, range 32, base 0xfdee0000, size 65536, enabled
     Chapter 01 [44] = D0 D3 current powerspec 2 Supports D0
```

acpi is enabled but disabling it does not solve the problem. I also tried to follow a guide and recompile the kernel after created in /usr/src/sys/contrib/dev/ folder ath and here you have copied the contents of the folder of the madwifi-hal-current 0.9.4, but without positive results.

The strange thing is that in the new boot messages of unknown type ath_hal 0.9.4 before loading ath, but the messages are the same as before. Yet I think I've recompiled properly, or why I created the folder did not exist in ath /usr/src/sys/contrib/dev/, then I copied the contents of the folder inside the file downloaded and after hal /usr/src I have given the command
[cmd=]make-j4 install kernel buildkernel[/cmd]

If you have any suggestions for me to run this wireless card thank you so much.


----------



## DutchDaemon (Dec 10, 2011)

You may have to find a simpler way to describe what you did, because the paragraphs about what you did in /usr/src do not make much sense to me. Also, please do not put spaces in path names, it is impossible to read. So not / usr / src / sys /, please, but simply /usr/src/sys/.


----------



## francesco74 (Dec 10, 2011)

First of all thanks for reply. So I rewrite the procedure I followed:

I downloaded and unzipped the file madwifi-0.9.4-current.tar. I went into /usr/src/sys/contrib/dev/ and why I created the folder ath did not exist. 
`cd /usr/src/sys/contrib/dev`
`mkdir ath`

Then I went to the folder the hal file downloaded and copied the entire contents. 
`cd madwifi-0.9.4-current/hal`
`cp -R * /usr/src/sys/contrib/dev/ath`
At this point I moved to /usr/src and I gave the commands to recompile the kernel.
`cd /usr/src`
`make -j4 buildkernel installkernel`

I was wrong?


----------



## ondra_knezour (Dec 11, 2011)

There is Atheros driver for FreeBSD, check ath() man page.

Madwifi is Linux driver.

Maybe some kernel config options may solve your problem, check this thread and files mentioned there.


----------



## francesco74 (Dec 11, 2011)

Hello and thanks for your answer Onda Knezour. Then I read the page you sent me. I reformatted the entire computer. I went and checked the file GENERIC kernel configuration parameters:


```
device ath
	   device ath_hal
	   options AH_SUPPORT_AR5416
	   device ath_rate_sample
	   device wlan
```
I added 
	
	



```
device wlan
```
 It was not there and instead I removed this line:


```
# device ath_pci Atheros pci / cardbus glue
```

Then I recompiled the kernel and the warning no longer appears at startup:


```
ath0: mem <Atheros 5413> 0xfdee0000 0xfdeeffff irq 16 at device-4.0 on pci2
ath0: unable to attach hardware; HAL status 14
device_attach: ath0 attach returned 6
```
But the wireless interface is still not recognized.

If I add back the following line:


```
# device ath_pci Atheros pci / cardbus glue
```

and recompile the kernel, then start the message 
	
	



```
ath0 attach returned 6.
```

After this attempt, I tried removing and adding the following lines in loader.conf:


```
if_ath_load = "YES"
if_alc_load = "YES"
if_ath_pci_load = "YES"
```
but it does not solve the problem.


----------



## DutchDaemon (Dec 12, 2011)

Start formatting your posts, francesco74.


----------

