# Wireless not working with AR9285 wireless chip.

## Logomachist

This is my first time installing Gentoo and I can't get my wireless to work. I've talked to some people on #gentoo and while they've tried to help me no one has been able to fix it.

I've recompiled the kernel multiple times with different settings to no avail. I'm pretty sure I have the right drivers, that was one thing we double-checked.

Anyone here willing to give it a shot? I'm running Gentoo hardened if that matters.  And my wireless card is AR9285 Wireless Network Adapter (PCI-Express). 

Running "wpa_supplicant -B  -i wlp2s0 -c /etc/wpa_supplicant/wpa_supplicant.conf" results in:

 *Quote:*   

> Successfully initialized wpa_supplicant
> 
> Could not read interface wlp2s0 flags: No such device
> 
> WEXT: Could not set interface 'wlp2s0' UP
> ...

 

----------

## khayyam

Logomachist ...

try:

```
# wpa_supplicant -Dnl80211 -B -i wlp2s0 -c /etc/wpa_supplicant/wpa_supplicant.conf
```

If this fails then add '-d -f /var/log/wpa_supplicant.log' and pastebin the log.

Also pastebin/post your wpa_supplicant.conf (removing psk) ...

best ... khay

----------

## Logomachist

 *khayyam wrote:*   

> try:
> 
> ```
> # wpa_supplicant -Dnl80211 -B -i wlp2s0 -c /etc/wpa_supplicant/wpa_supplicant.conf
> ```
> ...

 

That results in: http://pastebin.com/BzDu0EbG

 *Quote:*   

> If this fails then add '-d -f /var/log/wpa_supplicant.log' and pastebin the log.

 

http://pastebin.com/pZ6QA3n3

 *Quote:*   

> Also pastebin/post your wpa_supplicant.conf (removing psk) ...

 

http://pastebin.com/2TAnQXn2

----------

## khayyam

```
Could not open file /sys/class/net/wlp2s0/phy80211/name: No such file or directory
```

Logomachist ... this suggests your missing something from the kernel, or the device isn't wlp2s0. Please provide the output of the following:

```
# ifconfig -a

# dmesg | grep ath9k

# awk '/(ATH9K|WEXT|(MAC|CFG|NL)80211)/' /usr/src/linux/.config
```

best ... khay

----------

## Logomachist

ifconfig -a

 *Quote:*   

> enp1s0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
> 
>         ether e0:cb:4e:5a:ed:c7  txqueuelen 1000  (Ethernet)
> 
>         RX packets 0  bytes 0 (0.0 B)
> ...

 

dmesg | grep ath9k

 *Quote:*   

> [    9.290766] ath9k 0000:02:00.0: Failed to initialize device
> 
> [    9.290942] ath9k: probe of 0000:02:00.0 failed with error -2

 

awk '/(ATH9K|WEXT|(MAC|CFG|NL)80211)/' /usr/src/linux/.config

 *Quote:*   

> CONFIG_WEXT_CORE=y
> 
> CONFIG_WEXT_PROC=y
> 
> CONFIG_CFG80211=y
> ...

 

----------

## khayyam

 *Logomachist wrote:*   

> [    9.290766] ath9k 0000:02:00.0: Failed to initialize device

 

Logomachist ... that is the pci device initialisation failing. I should have asked you to pastebin the entire kernel config as I suspect PCI_MSI is disabled (though thats somewhat of a guess on my part). Also, have you checked the BIOS/firmware for anything PCI related?

So, the following should provide a clearer picture:

```
# emerge wgetpaste

# wgetpaste /usr/src/linux/.config # paste the URL here
```

It might also be a good idea to get the lines prior to the above in dmesg (I should have limited my grep to 'ath') ...

```
 # dmesg | grep ath
```

Actually, pastebin the whole dmesg ...

```
# dmesg | wgetpaste
```

best ... khay

----------

## NeddySeagoon

khayyam,

Heh ... you can't work through a keyhole

----------

## Logomachist

 *khayyam wrote:*   

> Logomachist ... that is the pci device initialisation failing. I should have asked you to pastebin the entire kernel config as I suspect PCI_MSI is disabled (though thats somewhat of a guess on my part).

 

http://dpaste.com/214X644

 *Quote:*   

>  Also, have you checked the BIOS/firmware for anything PCI related? 

 

Emerging Linux firmware was the last thing I did (as part of a last ditch attempt to fix my wireless) before turning to this forum. Besides that? Nah, not that I know of.

 *Quote:*   

> 
> 
> ```
> # emerge wgetpaste
> 
> ...

 

I hope you don't mind me manually posting to dpaste, it's currently more convenient than than using wgetpaste... no easy Internet access for my laptop.

 *Quote:*   

> It might also be a good idea to get the lines prior to the above in dmesg (I should have limited my grep to 'ath') ...

 

 *Quote:*   

> 
> 
> ```
> # dmesg | wgetpaste
> ```
> ...

 

http://dpaste.com/3M0R298

----------

## khayyam

Logomachist ... here is the issue ...

```
[  9.283270] ieee80211 phy0: Failed to select rate control algorithm

[  9.283283] ieee80211 phy0: Failed to initialize rate control algorithm
```

... no rate control is enabled ...

```
# CONFIG_MAC80211_RC_PID is not set

# CONFIG_MAC80211_RC_MINSTREL is not set
```

This should be set to minstrel (afaik, that should be the default for ath9k).

Networking => Wireless => Default rate control algorithm

 *NeddySeagoon wrote:*   

> Heh ... you can't work through a keyhole

 

I'm playing "what the buttler saw" :)

best ... khay

----------

## Logomachist

 *khayyam wrote:*   

> Logomachist ... here is the issue ...
> 
> ```
> [  9.283270] ieee80211 phy0: Failed to select rate control algorithm
> 
> ...

 

I think I disabled that during the troubleshooting process. We were worried about a non-ath9k driver conflicting with the driver we wanted and I was told to disable everything but ath9k. And when I was told to disable "everything" I might have taken it a bit too far. Anyway I reenabled the two kernel options and recompiled. 

To my chagrin the wireless is still offline.

----------

## khayyam

 *Logomachist wrote:*   

> To my chagrin the wireless is still offline.

 

Logomachist ... yes, but unless you provide information as to why I can only speculate. Atheros are very well supported, and the AR9285 is listed as supported by the ath9k driver, so its either a configuration issue, or something in the bios/firmware is preventing the driver from initialising the card.

If you pastebin the dmesg and wpa_supplicant.log with minstral enabled then we should see why its currently failing.

best ... khay

----------

## Logomachist

Ok here we go! 

dmesg:

http://dpaste.com/018F8X3

wpa_supplicant.log:

http://dpaste.com/018F8X3

----------

## khayyam

 *Logomachist wrote:*   

> dmesg:
> 
> http://dpaste.com/018F8X3

 

Logomarchist ... you're booting same kernel as the dmesg you posted previously ... note the build #{N} and build time. 

07:06 June 21st:

```
Linux version 3.12.21-gentoo-r1 (root@Synergy) (gcc version 4.7.3 (Gentoo Hardened 4.7.3-r1 p1.4, pie-0.5.5) ) #4 SMP Wed Jun 18 17:03:17 EDT 2014
```

20:10 June 22nd:

```
Linux version 3.12.21-gentoo-r1 (root@Synergy) (gcc version 4.7.3 (Gentoo Hardened 4.7.3-r1 p1.4, pie-0.5.5) ) #4 SMP Wed Jun 18 17:03:17 EDT 2014
```

Anyhow, I now notice your using systemd and so I'll decline to provide further support. 

best ... khay

----------

## Logomachist

I just realized that I posted dmesg twice instead of wpa_supplicant.log.   :Shocked:   :Embarassed: 

Here's the correct wpa_supplicant.log:

http://dpaste.com/23416PY

As for not compiling the kernel since Jun 18 that's another mistake. I didn't run 

```
make install
```

 after recompiling the kernel.   :Sad:  Here is the correct dmesg

 *Quote:*   

> Anyhow, I now notice your using systemd and so I'll decline to provide further support. 

 

Systemd not your specialty, huh? Well thanks for the support you've provided so far!

----------

