# Wireless (Atheros AR5007EG)

## cniall

I recently installed Gentoo on my Toshiba A210-12U laptop which uses the Atheros AR5007EG wireless card. I used an ethernet connection during the installation, so that the relatively large files could be downloaded fairly quickly.

However, I need to have the wireless connection working too -- how would I do this? I ran 'emerge -av wireless-tools' followed by 'iwconfig scan', but all of the interfaces shown are labelled as 'no wireless extension found' or similar. I think this is a driver issue; I tried 'emerge -av madwifi-ng madwifi-ng-tools', but this did not help. Does anybody have any suggestions?

----------

## erik258

The kernel now has good support for that card built-in.  I'd recommend running a newish kernel (anything you recently installed should include support) and removing madwifi-ng.  

Let us know if you built your own kernel; in that case, you might have missed some support stuff.

----------

## Logicien

Try to load ath5k module. It's support the 5xxx Atheros series.

----------

## mimosinnet

I used to have an atheros card. Some information in the gentoo wiki:  Atheros_5xxx

Cheers!

----------

## d2_racing

Use the ath5k driver and post this :

```

# lspci -n

# ifconfig -a

# iwconfig

# cat /etc/conf.d/net

# cat /etc/wpa_supplicant/wpa_supplicant.conf

# cd /etc/init.d && ls -la

# rc-update show

```

----------

## cniall

lspci -n:

```
00:00.0 0600: 1002:7910

00:01.0 0604: 1002:7912

00:05.0 0604: 1002:7915

00:06.0 0604: 1002:7916

00:07.0 0604: 1002:7917

00:12.0 0106: 1002:4380

00:13.0 0c03: 1002:4387

00:13.1 0c03: 1002:4388

00:13.2 0c03: 1002:4389

00:13.3 0c03: 1002:438a

00:13.4 0c03: 1002:438b

00:13.5 0c03: 1002:4386

00:14.0 0c05: 1002:4385 (rev 14)

00:14.1 0101: 1002:438c

00:14.2 0403: 1002:4383

00:14.3 0601: 1002:438d

00:14.4 0604: 1002:4384

00:18.0 0600: 1022:1100

00:18.1 0600: 1022:1101

00:18.2 0600: 1022:1102

00:18.3 0600: 1022:1103

01:05.0 0300: 1002:791f

0e:00.0 0200: 10ec:8136 (rev 01)

14:00.0 0200: 168c:001c (rev 01)

1a:04.0 0607: 104c:8039

1a:04.1 0c00: 104c:803a

1a:04.2 0180: 104c:803b

1a:04.3 0805: 104c:803c
```

ifconfig -a

```
eth0      Link encap:Ethernet  HWaddr 00:1b:38:42:3f:2b  

          inet addr:192.168.1.66  Bcast:192.168.1.255  Mask:255.255.255.0

          inet6 addr: fe80::21b:38ff:fe42:3f2b/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:22 errors:0 dropped:0 overruns:0 frame:0

          TX packets:28 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:2126 (2.0 KiB)  TX bytes:2418 (2.3 KiB)

          Interrupt:27 

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

sit0      Link encap:IPv6-in-IPv4  

          NOARP  MTU:1480  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

```

iwconfig 

```

lo            no wireless extensions

eth0        no wireless extensions

sit0         no wireless extensions

```

cat /etc/conf.d/net

```
# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

config_eth0=( "dhcp" )
```

cat /etc/wpa_supplicant/wpa_supplicant.conf

```

```

cd /etc/init.d && ls -la

```
total 102

drwxr-xr-x  2 root root  1024 May 25 18:25 .

drwxr-xr-x 32 root root  4096 May 26 15:18 ..

-rwxr-xr-x  1 root root  3614 May 18 17:53 bootmisc

-rwxr-xr-x  1 root root  1232 May 18 17:53 checkfs

-rwxr-xr-x  1 root root  3226 May 18 17:53 checkroot

-rwxr-xr-x  1 root root  3054 May 18 17:53 clock

-rwxr-xr-x  1 root root  1419 May 18 17:53 consolefont

-rwxr-xr-x  1 root root  1729 May 18 17:52 crypto-loop

lrwxrwxrwx  1 root root    21 May 23 17:35 depscan.sh -> ../../sbin/depscan.sh

lrwxrwxrwx  1 root root    23 May 23 17:35 functions.sh -> ../../sbin/functions.sh

-rwxr-xr-x  1 root root  5606 May 18 17:53 halt.sh

-rwxr-xr-x  1 root root   433 May 18 17:53 hostname

-rwxr-xr-x  1 root root  1855 May 18 17:53 keymaps

-rwxr-xr-x  1 root root   620 May 18 17:53 local

-rwxr-xr-x  1 root root  2088 May 18 17:53 localmount

-rwxr-xr-x  1 root root  1018 May 24 17:28 metalog

-rwxr-xr-x  1 root root  2947 May 18 17:53 modules

lrwxrwxrwx  1 root root     6 May 23 17:31 net.eth0 -> net.lo

-rwxr-xr-x  1 root root 30689 May 18 17:53 net.lo

-rwxr-xr-x  1 root root  3307 May 18 17:53 netmount

-rwxr-xr-x  1 root root  1526 May 18 17:12 nscd

-rwxr-xr-x  1 root root   670 May 18 17:53 numlock

-rwxr-xr-x  1 root root  1871 May 25 18:25 pciparm

-rwxr-xr-x  1 root root   666 May 18 18:06 pydoc-2.6

-rwxr-xr-x  1 root root   304 May 18 16:43 reboot.sh

-rwxr-xr-x  1 root root   276 May 18 17:53 rmnologin

-rwxr-xr-x  1 root root   558 May 18 18:30 rsyncd

lrwxrwxrwx  1 root root    23 May 23 17:35 runscript.sh -> ../../sbin/runscript.sh

-rwxr-xr-x  1 root root   385 May 18 16:43 shutdown.sh

-rwxr-xr-x  1 root root  2159 May 18 18:46 sshd

-rwxr-xr-x  1 root root  6382 May 18 17:54 udev

-rwxr-xr-x  1 root root  2579 May 18 17:54 udev-dev-tarball

-rwxr-xr-x  1 root root  2863 May 18 17:54 udev-mount

-rwxr-xr-x  1 root root   803 May 18 17:54 udev-postmount

-rwxr-xr-x  1 root root   942 May 18 17:53 urandom

-rwxr-xr-x  1 root root   530 May 24 17:29 vixie-cron
```

rc-update show

```
            bootmisc | boot                          

             checkfs | boot                          

           checkroot | boot                          

               clock | boot                          

         consolefont | boot                          

            hostname | boot                          

             keymaps | boot                          

               local |      default nonetwork        

          localmount | boot                          

             metalog |      default                  

             modules | boot                          

            net.eth0 |      default                  

              net.lo | boot                          

            netmount |      default                  

           rmnologin | boot                          

      udev-postmount |      default                  

             urandom | boot                          

          vixie-cron |      default                  
```

----------

## d2_racing

Can you post this :

```

# cd /usr/src/linux

# cat .config | grep -i CONFIG_ATH5K

# cat /etc/udev/rules.d/70-persistent-net.rules

```

----------

## cniall

cat .config | grep -i CONFIG_ATH5K 

```
CONFIG_ATH5K=y

CONFIG_ATH5K_DEBUG=y
```

cat /etc/udev/rules.d/70-persistent-net.rules 

```
# This file was automatically generated by the /lib/udev/write_net_rules

# program, run by the persistent-net-generator.rules rules file.

#

# You can modify it, as long as you keep each rule on a single

# line, and change only the value of the NAME= key.

# PCI device 0x10ec:0x8136 (r8169)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1b:38:42:3f:2b", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
```

----------

## d2_racing

Hi, can you make your ath5k in module instead of builtin.

Recompile your kernel and reboot your box.

And post this :

```

# cat /etc/udev/rules.d/70-persistent-net.rules 

# lsmod

# dmesg | grep -i ath

```

----------

## cniall

cat /etc/udev/rules.d/70-persistent-net.rules 

```
# This file was automatically generated by the /lib/udev/write_net_rules

# program, run by the persistent-net-generator.rules rules file.

#

# You can modify it, as long as you keep each rule on a single

# line, and change only the value of the NAME= key.

# PCI device 0x10ec:0x8136 (r8169)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1b:38:42:3f:2b", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
```

lsmod

```
Module                  Size  Used by

wlan_wep                4378  0 

wlan_tkip               8750  0 

wlan_scan_sta           7686  0 

wlan_acl                2114  0 

wlan_xauth               502  0 

ath_rate_onoe           3286  0 

ath_rate_amrr           3674  0 

ath_rate_sample         7766  0 

ath_rate_minstrel       7674  0 

ath_pci                61650  0 

wlan                  139748  10 wlan_wep,wlan_tkip,wlan_scan_sta,wlan_acl,wlan_xauth,ath_rate_onoe,

                                 ath_rate_amrr,ath_rate_sample,ath_rate_minstrel,ath_pci

ath_hal               188328  3 ath_rate_sample,ath_rate_minstrel,ath_pci
```

dmesg | grep -i ath 

```
[    4.216346] ath_hal: module license 'Proprietary' taints kernel.

[    4.268967] ath_hal: 0.9.18.0 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)

[    4.345962] ath_pci: svn r4119 (branch madwifi-0.9.4)

[    4.346022] ath_pci 0000:14:00.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19

[    4.346033] ath_pci 0000:14:00.0: setting latency timer to 64

[    4.346058] ath_pci: HAL doesn't support MAC revision 0xe2

[    4.346067] ath_pci 0000:14:00.0: PCI INT A disabled

[    4.441689] ath5k: Unknown symbol ath_rxbuf_alloc

[    4.443026] ath5k: Unknown symbol ath_regd_get_band_ctl

[    4.443381] ath5k: Unknown symbol ath_reg_notifier_apply

[    4.443960] ath5k: Unknown symbol ath_is_world_regd

[    4.445119] ath5k: Unknown symbol ath_regd_init

[    5.417880] ath5k: Unknown symbol ath_rxbuf_alloc

[    5.419208] ath5k: Unknown symbol ath_regd_get_band_ctl

[    5.419575] ath5k: Unknown symbol ath_reg_notifier_apply

[    5.420157] ath5k: Unknown symbol ath_is_world_regd

[    5.421315] ath5k: Unknown symbol ath_regd_init

[    5.439827] ath_rate_minstrel: Minstrel automatic rate control algorithm 1.2 (svn r4119 (branch madwifi-0.9.4))

[    5.439833] ath_rate_minstrel: Look around rate set to 10%

[    5.439836] ath_rate_minstrel: EWMA rolloff level set to 75%

[    5.439839] ath_rate_minstrel: Max Segment size in the mrr set to 6000 us

[    5.444220] ath_rate_sample: 1.2 (svn r4119 (branch madwifi-0.9.4))

[    5.448124] ath_rate_amrr: 0.1 (svn r4119 (branch madwifi-0.9.4))

[    5.452059] ath_rate_onoe: 1.0 (svn r4119 (branch madwifi-0.9.4))

[    5.452081] sysctl table check failed: /dev/ath/rate/interval  Sysctl already exists

[    5.452142]  [<c1038080>] __register_sysctl_paths+0xb1/0x22d

[    5.452160]  [<f826e000>] ? init_module+0x0/0x43 [ath_rate_onoe]

[    5.452166]  [<c103821a>] register_sysctl_paths+0x1e/0x20

[    5.452176]  [<f826e037>] init_module+0x37/0x43 [ath_rate_onoe]
```

Applied some manual line wrapping to the wlan line of the lsmod output in an attempt to reduce horizontal scrolling requirements. -- desultory

----------

## d2_racing

Can you post this :

```

# eix madwifi

```

----------

## erik258

 *Quote:*   

> [    4.441689] ath5k: Unknown symbol ath_rxbuf_alloc
> 
> [    4.443026] ath5k: Unknown symbol ath_regd_get_band_ctl
> 
> [    4.443381] ath5k: Unknown symbol ath_reg_notifier_apply
> ...

 

Unknown symbols in modules typically mean that your kernel build got borked in one way or another.  I am a little confused it didn't crash and burn a little harder.  Anyhow, if I correctly anticipate d2_racing's train of thought, did you make sure to get rid of madwifi?  You can't use two drivers at the same time for the same piece of hardware!

----------

## d2_racing

Hi, can you post your .config that is related with your wifi configuration, because you have something wrong for sure inside your kernel.

I say that, because your /etc/udev/rules.d/70-persistent-net.rules should contain an entry with ath0 or wlan0 that is related with your wifi card.

So, maybe it's the madwifi driver that crash your config or your kernel config is not good.

----------

## Havin_it

I have one of these myself (in a Samsung NC10) and ath5k still isn't much fun with it - speed is lousy most of the time and association often fails at boot. The current madwifi ebuilds in the tree don't support it, but there are svn ebuilds available that do. Check this bug:

https://bugs.gentoo.org/show_bug.cgi?id=193549

Not without its own problems, but you might have more luck with it. Let me know if you want any advice about it.

----------

