# Atheros 9285 & Atheros AR8131



## KsenZ (Mar 25, 2011)

Network cards do not work.

```
ath0: <Atheros 9285> irq 19 at device 0.0 on pci7
ath0: 0x10000 bytes of rid 0x10 res 3 failed (0, 0xffffffff).
ath0: cannot map register space
device_attach: ath0 attach returned 6
```


```
alc0: <Atheros AR8131 PCIe Gigabit Ethernet> irq 17 at device 0.0 on pci9
alc0: 0x40000 bytes of rid 0x10 res 3 failed (0, 0xffffffff).
alc0: cannot allocate memory resources.
device_attach: alc0 attach returned 6
```

How can I make them work?


----------



## KsenZ (Mar 26, 2011)

Forgot to say, tried on systems 8.0, 8.1, and 8.2. Notebook Aser Extenza 5635ZG.


----------



## KsenZ (Mar 26, 2011)

Tried to change Wi-Fi adapter on the other, but the situation has not changed

```
cannot map register space
```


----------



## KsenZ (Mar 26, 2011)

In all kinds of windows and linux, works fine.


----------



## tingo (Mar 26, 2011)

This is a hard problem to fix. Somehow, FreeBSD isn't configuring the internal devices in your laptop correctly. Some options:


 Try to boot with acpi disabled, and see if it works then. *Note*: many modern laptops need acpi to have their thermal monitoring work correctly; be careful, you might overheat you laptop if it runs for too long with acpi disabled.
 Search (Google is your friend) and see if anyone else has fixed those problems.
 Look at linux boot messages (or /var/log/messages) and *lspci* output for your network cards; try to figure out how Linux is mapping your device; what irq's, irq routing, memory allocation etc. Then compare that to what FreeBSD does. If you notice that FreeBSD is doing it differently, try to ask (here or on the freebsd-mobile mailinglist) how you can configure FreeBSD to do it the same way Linux does it. Be specific, include as much (relevant) details as possible.


----------



## cheme (Mar 26, 2011)

Hello,

Are you running the standard generic kernel?  If you are then you need to load the modules for the wireless card and the Ethernet port.  There is also some additional configuration that needs to take place to connect automatically when you boot your machine.  

Try adding or changing your settings to match up with these in the following configuration files.


This tells FreeBSD to load the modules for both the wireless and the Ethernet adapter.


```
[B]/boot/loader.conf[/B]

If_alc_load=â€YESâ€  

If_ath_load=â€YESâ€
```


This tells FreeBSD to use DHCP for both the wireless and Ethernet adapters.


```
[B]/etc/rc.conf[/B]

Hostname=â€yourhostnameâ€

ifconfig_alc0=â€DHCPâ€

wlans_ath0=â€wlan0â€

ifconfig_wlan0=â€DHCPâ€
```
 

This is the address of my router, your configuration may be different.



```
[B]/etc/resolv.conf
[/B]
Nameserver  192.168.1.1
```



Reboot your system.



If you want to use wpa_supplicant to protect your wireless network try the following link and check out my configuration to connect to a wpa and/or a wep encrypted network. http://forums.freebsd.org/showthread.php?t=21206.  If it does not help perform a search on this forum or the net using your favorite search engine you will find a ton of information on setting up your system.

Also you should check out the FreeBSD handbook section on wireless networking.  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-wireless.html

Good Luck


----------



## cheme (Mar 27, 2011)

I made an editing mistake in the previous post.

Make sure to use lower case in all of the configuration files except for the "YES" at the end of the line in /boot/loader.conf

Example:

```
if_ath_load="YES"
hostname="yourhostname"
```

Good Luck


----------



## KsenZ (Mar 27, 2011)

tingo said:
			
		

> This is a hard problem to fix. Somehow, FreeBSD isn't configuring the internal devices in your laptop correctly. Some options:
> 
> 
> Try to boot with acpi disabled, and see if it works then. *Note*: many modern laptops need acpi to have their thermal monitoring work correctly; be careful, you might overheat you laptop if it runs for too long with acpi disabled.
> ...



Google does not know the answer 
irq's identical.



			
				cheme said:
			
		

> Hello,
> 
> Are you running the standard generic kernel?  If you are then you need to load the modules for the wireless card and the Ethernet port.  There is also some additional configuration that needs to take place to connect automatically when you boot your machine.
> 
> ...



I know this, but it does not solve the problem. I think that the problem in ACPI(or anything else) in FreeBSD


----------



## cheme (Mar 28, 2011)

I did some searching and found some information on the mailing lists and a bug report.

It appears that you filled a bug report on August 5th 2010, PR kern/149306.  Well, it's the same user name. I could not find a resolution to the bug report so that was a dead end.

Check out the following link. http://mail-index.netbsd.org/current-users/2010/06/08/msg013697.html.  The mailing list is about the AR9285 and AR8132 ethernet adapter. It may lead you in the right direction with some additional research and/or internet searching.

One last thought, have you tried 9.0?  Here is a link to the ftp site. ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/201101/ 

Good Luck


----------



## KsenZ (Mar 28, 2011)

Yes, it's me 
OK, I will try. Thanks


----------



## KsenZ (Mar 28, 2011)

response from the mailinglist ACPI:


> This is probably due to a problem FreeBSD has with ACPI initialization
> sometimes wiping out the state in PCI-PCI bridges for resource windows and not
> gracefully recovering from that.  I have some early work in progress to
> address this, but it will be a while before I have something ready for
> testing.


----------

