# [Solved] Cannot get wifi to work with Atheros AR5B95H

## Langest

Hello!

I am having trouble getting wifi to work.

My wifi card is Atheros AR5B95H AR9285.

```
$ lspci | grep Wireless

02:00.0 Network controller: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) (rev 01)

```

I have tried to enable (what I think is) the relevant Arheros/Qualcomm features in the kernel. Namely CONFIG_ATH9K. But wireless networks doesn't seem to pop up in either NetworkManager or wicd. Maybe it works fine in the kernel but I need some additional software configuration that I have not found yet.

I am at a loss for what I can do to fix it. Any help is appreciated.

Thank you!

LangestLast edited by Langest on Sun Jan 21, 2018 8:15 pm; edited 1 time in total

----------

## blopsalot

Are you running both NetworkManager and wicd at same time? I would pick one first and go from there.

----------

## bunder

ath9k appears to only need firmware if it's an htc variant.  a few things to check...  

do you see wlan0 or similar in ifconfig?  

is your wireless turned off? (check with `rfkill list`)

anything in dmesg?

----------

## Langest

blopsalot:

I am not using both at the same time. I'm using NM, I just tried to see if wicd worked better.

bunder:

ifconfig does not reveal wlan0

```
$ ifconfig

enp0s25: ...

lo: ...

tun0: ...

```

Does not seem to appear in rfkill

```
$ rfkill list

$ 

```

I cannot see anything that looks like it in dmesg

see link for output: https://gist.github.com/langest/102a42fe781f1e0a90622cb1b14612f9

----------

## charles17

 *Langest wrote:*   

> 
> 
> ```
> $ lspci | grep Wireless
> 
> ...

 

Please add output of: 

```
lspci -nnkv | sed -n '/Wireless/,/^$/p' | head -n -1
```

----------

## soitgoes0745

The output of your dmesg doesn't show ath being initialized. Are you sure you have the proper parameters set in your .config file? For example:

```

[   13.729521] ath: phy0: timeout (1000 us) on reg 0x15f18: 0x00000000 & 0x00000007 != 0x00000004

[   13.731420] ath: phy0: Enable LNA combining

[   13.732657] ath: phy0: ASPM enabled: 0x43

[   13.732659] ath: EEPROM regdomain: 0x65

[   13.732660] ath: EEPROM indicates we should expect a direct regpair map

[   13.732662] ath: Country alpha2 being used: 00

[   13.732662] ath: Regpair used: 0x65

[   13.733815] ieee80211 phy0: Atheros AR9485 Rev:1 mem=0xffffbe03c3400000, irq=17

[   13.770412] ath9k 0000:03:00.0 wlp3s0: renamed from wlan0

[  412.051210] ath: phy0: Timeout while waiting for nf to load: AR_PHY_AGC_CONTROL=0xd0dda

```

Is what I see when I run dmesg. The parameters I have set in my .config specifically for ath9:

```

CONFIG_ATH9K_HW=m

CONFIG_ATH9K_COMMON=m

CONFIG_ATH9K_BTCOEX_SUPPORT=y

CONFIG_ATH9K=m

CONFIG_ATH9K_PCI=y

CONFIG_ATH9K_AHB=y

CONFIG_ATH9K_DEBUGFS=y

CONFIG_ATH9K_STATION_STATISTICS=y

CONFIG_ATH9K_DYNACK=y

CONFIG_ATH9K_WOW=y

CONFIG_ATH9K_RFKILL=y

CONFIG_ATH9K_CHANNEL_CONTEXT=y

CONFIG_ATH9K_PCOEM=y

CONFIG_ATH9K_HTC=m

CONFIG_ATH9K_HTC_DEBUGFS=y

# CONFIG_ATH9K_HWRNG is not set

```

----------

## Langest

soitgoes0745: I activated the same parameters as you have but still no luck.

charles17:

```
$ lspci -nnkv | sed -n '/Wireless/,/^$/p' | head -n -1

02:00.0 Network controller [0280]: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) [168c:002b] (rev 01)

   Subsystem: Hewlett-Packard Company U98Z062.12 802.11bgn Wireless Half-size Mini PCIe Card [103c:3040]

   Flags: fast devsel, IRQ 11

   Memory at e1500000 (64-bit, non-prefetchable) [size=64K]

   Capabilities: [40] Power Management version 3

   Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit-

   Capabilities: [60] Express Legacy Endpoint, MSI 00

   Capabilities: [100] Advanced Error Reporting

   Capabilities: [140] Virtual Channel

   Capabilities: [160] Device Serial Number 00-15-17-ff-ff-24-14-12

   Capabilities: [170] Power Budgeting <?>

```

----------

## charles17

 *Langest wrote:*   

> 
> 
> ```
> $ lspci -nnkv | sed -n '/Wireless/,/^$/p' | head -n -1
> 
> ...

 

No driver?  Then search for Vendor ID:Device ID https://www.startpage.com/do/search?query=%22168c:002b%22+site%3Acateee.net

The internet will tell what you need.

----------

## Langest

 *charles17 wrote:*   

> No driver?  Then search for Vendor ID:Device ID https://www.startpage.com/do/search?query=%22168c:002b%22+site%3Acateee.net
> 
> The internet will tell what you need.

 

Problem is, I have enabled all of what I can find searching for it.

```
CONFIG_ATH5K_PCI=y

CONFIG_ATH9K_HW=y

CONFIG_ATH9K_COMMON=y

CONFIG_ATH9K_COMMON_DEBUG=y

CONFIG_ATH9K_BTCOEX_SUPPORT=y

CONFIG_ATH9K=y

CONFIG_ATH9K_PCI=y

CONFIG_ATH9K_AHB=y

CONFIG_ATH9K_DEBUGFS=y

# CONFIG_ATH9K_STATION_STATISTICS is not set

CONFIG_ATH9K_DYNACK=y

CONFIG_ATH9K_WOW=y

CONFIG_ATH9K_RFKILL=y

CONFIG_ATH9K_CHANNEL_CONTEXT=y

CONFIG_ATH9K_PCOEM=y

CONFIG_ATH9K_HTC=y

CONFIG_ATH9K_HTC_DEBUGFS=y

```

Still doesn't work. Or am I missing something?

----------

## NeddySeagoon

Langest,

Mount /boot maybe?

What does 

```
uname -a
```

 show?

----------

## Langest

I think boot is mounted already since it is in my fstab.

```
$ ls /boot

grub                       System.map-4.14.14-gentoo.old

lost+found                 System.map-4.14.7-gentoo

config-4.14.14-gentoo      System.map-4.14.7-gentoo.old

config-4.14.14-gentoo.old  vmlinuz-4.14.14-gentoo

config-4.14.7-gentoo       vmlinuz-4.14.14-gentoo.old

config-4.14.7-gentoo.old   vmlinuz-4.14.7-gentoo

System.map-4.14.14-gentoo  vmlinuz-4.14.7-gentoo.old

```

```
$ uname -a

Linux tuhundra 4.14.7-gentoo #4 SMP Sun Jan 7 14:09:14 CET 2018 x86_64 Intel(R) Core(TM)2 CPU P8700 @ 2.53GHz GenuineIntel GNU/Linux

```

Last edited by Langest on Sun Jan 21, 2018 7:47 pm; edited 1 time in total

----------

## soitgoes0745

Looks like the last time you compiled your kernel was Jan. 7th. Does that sound accurate?

** edit **

Misspelling

----------

## Langest

Does not sound accurate at all. I did it an hour or two ago. which should explain why the drivers are not loaded.

It might have something to do with me having some trouble compiling the kernel as in this thread https://forums.gentoo.org/viewtopic-t-1075702-highlight-.html

Where I start at 4.14.7 and portage updates to 4.9.76 and I then unmask 4.14.14 and run make and make install in the last one of them.

But I didn't see any error in the output.

```
[langest@tuhundra src]$ ls -l

total 12K

drwxr-xr-x 26 root root 4.0K Jan 21 20:53 linux-4.14.14-gentoo

drwxr-xr-x 22 root root 4.0K Jan 10 17:57 linux-4.14.7-gentoo

drwxr-xr-x 25 root root 4.0K Jan 19 23:39 linux-4.9.76-gentoo-r1

lrwxrwxrwx  1 root root   21 Jan 20 11:32 linux -> linux-4.14.14-gentoo/

[langest@tuhundra src]$ 

```

```
[langest@tuhundra ~]$ cd /usr/src/linux

[langest@tuhundra linux]$ sudo make

  CHK     include/config/kernel.release

  CHK     include/generated/uapi/linux/version.h

  CHK     include/generated/utsrelease.h

  CHK     include/generated/bounds.h

  CHK     include/generated/timeconst.h

  CHK     include/generated/asm-offsets.h

  CALL    scripts/checksyscalls.sh

  DESCEND  objtool

  CHK     scripts/mod/devicetable-offsets.h

  CHK     include/generated/compile.h

  DATAREL arch/x86/boot/compressed/vmlinux

Kernel: arch/x86/boot/bzImage is ready  (#6)

  Building modules, stage 2.

  MODPOST 17 modules

[langest@tuhundra linux]$ sudo make install

sh ./arch/x86/boot/install.sh 4.14.14-gentoo arch/x86/boot/bzImage \

   System.map "/boot"

[langest@tuhundra linux]$ 

```

----------

## NeddySeagoon

Langest,

Sun Jan 7 14:09:14 CET 2018 is the build time of the running kernel.

You may well have made a newer kernel but its not in use.

What does 

```
ls /boot -l
```

 show?

Your running kernel is 4.14.7 and you have 4.14.14.

Did you forget to update grub to tell it about your 4.14.14 kernel?

----------

## Langest

 *NeddySeagoon wrote:*   

> 
> 
> Did you forget to update grub to tell it about your 4.14.14 kernel?

 

Yes, but I didn't know. Previously I reconfigured the kernel a bunch of times and it worked. I guess is that it is because of the version still being the same so grub could find it without needing to be updated.

I will update grub and let you know if it solves the problem.

----------

## Langest

That did the trick.

Thank you all for your help!

----------

## NeddySeagoon

Langest,

That's correct.  

When you overwrite a kernel that grub already knows about, it uses the new file as the filename has not changed.

When you add another file, grub needs to be updated.

Its a good thing to keep several working kernels. Everyone builds a kernel that won't boot every now and again.

Its much simpler to choose another grub menu item to boot than to hunt around for your boot media.

----------

