# Atheros AR922X Wireless card not working correctly

## hjbolide

Hi,

I am currently installing Gentoo linux amd64 on my desktop, which has a D-link dwa-547 wireless card installed. lspci command shows: *Quote:*   

> Network controller: Qualcomm Atheros AR922X Wireless Network Adapter (rev 01)

 

Everything worked fine when it is under LiveCD mode, but when I reboot the system into the newly installed system, it stopped working. wpa_supplicant keeps complaining about wlp4s5 Failed to initiate AP scan. Did a load of research online but it seems like people that had this AP scan problem had different cause, none of the solutions worked for me yet.

In the kernel config, I tried installed all Atheros AR922x drivers, not as modules, but compiled into in the kernel. The system can correctly recognise it but however cannot use it, i tried

```
iwlist s
```

the output said wlp4s5 does not support scanning, which is weird, because in LiveCD mode, it can finish the scan perfectly.

Tried to use

```
genkernel all
```

 as some of the guys suggested, so that from that point I can work backwards to reduce the kernel size, but things got funnier, 

```
ifconfig
```

gave me enp2s0 instead of wlp4s5, and still not working. This deviates from the LiveCD mode even more, so I escaped back to use the non-genkernel version. 

Here is something I have noticed that might help diagnose the situation, I executed

```
wpa_supplicant -Dwext -iwlp4s5 -c/root/wpa.conf -dd
```

the verbose output shows the difference, it appears to me there are still issues with the driver, but I couldn't figure out why:

http://pastebin.com/8CHV3LWa  <-- this is the one in LiveCD mode, ran without any problem.

http://pastebin.com/n4q227gU  <-- this is the one in local system, ran with failed to initiate AP scan

Maybe I'm missing something here, could anyone please help take a look? Appreciated. Thank you very much.

Charles

----------

## hjbolide

Some message from dmesg:

```
dmesg | grep wlp
```

 *Quote:*   

> systemd-udevd[15810]: renamed network interface wlan0 to wlp4s5
> 
> IPv6: ADDRCONF(NETDEV_UP): wlp4s5: link is not ready

 

still stuck here, if anyone has any idea, please give me a tap, much appreciated.

Thank you.

----------

## Logicien

I always compile wireless support in module and it work. I guess it's the case of the live-cd you use too. You may need firmware for your Atheros card. Be sure the appropriate firmware files are available when the module load. Some firmware packages may need to be install for it.The modinfo command tell the firmware files needed by a module.

```
modinfo the-module | less
```

Try to use the nl80211 driver for Wpa_supplicant.

```
wpa_supplicant -Dnl80211 -iwlp4s5 -c/root/wpa.conf -dd
```

----------

## hjbolide

Thanks a lot Logicien, I will give it a try when I get home today. 

Have a great night there.

----------

## hjbolide

Hey Logicien,

Thank you so much for letting me know that I should compile all those into modules, it was so stupid of me didn't think of doing this.

I used

```
lsmod | grep ath
```

to get all the modules in LiveCD that has relationships with ath, then a list came out

 *Quote:*   

> ath
> 
> ath9k
> 
> ath9k_common
> ...

 

compiled all these as modules in kernel config, things just went right. 

Thanks again for your helpful suggestion.

Best regards,

Charles

----------

