Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem with net.lo and Atheros 5xxx
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
rafo
Apprentice
Apprentice


Joined: 18 Nov 2003
Posts: 161
Location: Sollentuna, Sweden

PostPosted: Thu Oct 01, 2009 8:58 pm    Post subject: Problem with net.lo and Atheros 5xxx Reply with quote

I recently installed an Atheros 5xxx PCI WLAN card in a desktop Gentoo machine. I tried to reuse a simple configuration that works well on another Gentoo machine. I put this in /etc/conf.d/net:

Code:

preferred_aps=("MyEssid")
associate_order_wlan0="forcepreferredonly"
key_MyEssid="11A3-DCEB-0C"


However, after rebooting the interface does not come up. But, if I log in as root and type `/etc/init.d/net.wlan0 start' then the interface comes up and I have network connectivity. This behaviour is fully reproducible. Reboot or power cycling makes no difference.

Looking at `dmesg' messages it seems that the interface comes up, or almost does, but then in the end it fails. I could see something like this:

Code:

[  145.403089] wlan0: authenticate with AP 00:23:69:ea:7b:da
[  145.404597] wlan0: authenticated
[  145.404603] wlan0: associate with AP 00:23:69:ea:7b:da
[  145.406713] wlan0: RX AssocResp from 00:23:69:ea:7b:da (capab=0x411 status=0 aid=3)
[  145.406718] wlan0: associated
[  145.860455] wlan0: authenticate with AP 00:23:69:ea:7b:da
[  145.862274] wlan0: authenticated
[  145.862284] wlan0: associate with AP 00:23:69:ea:7b:da
[  145.891475] wlan0: authenticate with AP 00:1b:2f:48:82:68
[  145.897024] wlan0: deauthenticating by local choice (reason=3)


Note that the 5th line says "associated", which looks good. However, it all ends with "deauthenticating by local choice (reason=3)".

I put a wrapper around /sbin/iwconfig and traced the arguments that were passed. The calls to that program also looked good to start with, but bad in the end:

Code:

23:09:16 iwconfig wlan0
23:09:16 iwconfig wlan0 txpower on
23:09:16 iwconfig wlan0 ap off
23:09:16 iwconfig wlan0 essid off
23:09:16 iwconfig wlan0
23:09:16 iwconfig wlan0 key 11A3-DCEB-0C enc open
23:09:16 iwconfig wlan0
23:09:16 iwconfig wlan0
23:09:16 iwconfig wlan0 essid MyEssid
23:09:26 iwconfig wlan0 txpower on
23:09:26 iwconfig wlan0 ap off
23:09:26 iwconfig wlan0 essid off
23:09:26 iwconfig wlan0 txpower off


There is a 10 seconds gap, which corresponds to a pause before the first non-green bootup message on the console.

Right now I have a crude workaround which is a copy of net.lo with the start() function containing just a simple hard-coded sequence like this:

Code:

   iwconfig wlan0 txpower on
   iwconfig wlan0 ap off
   iwconfig wlan0 essid off
   iwconfig wlan0 key 11A3-DCEB-0C enc open
   iwconfig wlan0 essid MyEssid
   
   ifconfig wlan0 10.0.0.130 netmask 255.0.0.0
   route add -net 0.0.0.0 gw 10.0.0.1 dev wlan0


With my /etc/init.d/net.wlan0 symlink pointing to this file the network comes up nicely at bootup.

Any ideas or comments welcome. Should this be considered a bug in Gentoo (where exactly)? Or could I get around the problem by just modifying my /etc/conf.d/net in some clever way?
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Sun Oct 04, 2009 2:32 am    Post subject: Reply with quote

Hi, can you post this :

Code:

# lsmod
# ifconfig -a
# iwconfig
# dmesg | grep -i ath
Back to top
View user's profile Send private message
rafo
Apprentice
Apprentice


Joined: 18 Nov 2003
Posts: 161
Location: Sollentuna, Sweden

PostPosted: Sun Oct 04, 2009 8:48 am    Post subject: Reply with quote

Here is what I get,
Code:

> lsmod
Module                  Size  Used by
i2c_i801                8064  0
i2c_core               20052  1 i2c_i801
evdev                   8224  0

> ifconfig -a

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          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)

wlan0     Link encap:Ethernet  HWaddr 00:02:e3:43:b6:f6 
          BROADCAST MULTICAST  MTU:1500  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:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wmaster0  Link encap:UNSPEC  HWaddr 00-02-E3-43-B6-F6-00-00-00-00-00-00-00-00-00-00 
          [NO FLAGS]  MTU:0  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:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

> iwconfig
lo        no wireless extensions.

wmaster0  no wireless extensions.

wlan0     IEEE 802.11abg  ESSID:"" 
          Mode:Managed  Frequency:2.437 GHz  Access Point: Not-Associated   
          Tx-Power=off   
          Retry min limit:7   RTS thr:off   Fragment thr:off
          Encryption key:11B2-DCEB-0C   Security mode:open
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0


> dmesg | grep -i ath
[    1.651345] ath5k 0000:02:05.0: PCI INT A -> GSI 21 (level, low) -> IRQ 21
[    1.651503] ath5k 0000:02:05.0: registered as 'phy0'
[    1.915557] ath5k phy0: Atheros AR5414 chip found (MAC: 0xa5, PHY: 0x61)


I should add that the Atheros driver is compiled into the kernel. And, I am running baselayout-2.0.1 and openrc-0.4.3-r3.

I made a little experiment where I moved the /sbin/ifconfig and /sbin/iwconfig binaries into other locations, and wrote two simple wrappers /sbin/ifconfig and /sbin/iwconfig that call the displaced binaries. The wrappers dump the dmesg messages to file with `dmesg -c', and likewise the arguments passed to the binaries, and the exit codes from the same. This is what I got,
Code:

12:29:59.582633070 ifconfig wlan0 up
12:29:59.633287769 exit code from ifconfig: 0
12:29:59.677164446 ifconfig wlan0
12:29:59.695720783 exit code from ifconfig: 0
12:29:59.748185276 iwconfig wlan0
12:29:59.831363608 exit code from iwconfig: 0
12:29:59.850570769 iwconfig wlan0 txpower on
12:29:59.868455225 exit code from iwconfig: 0
12:29:59.887482485 iwconfig wlan0 ap off
12:29:59.905520884 exit code from iwconfig: 0
12:29:59.924455897 iwconfig wlan0 essid off
12:29:59.942831788 exit code from iwconfig: 0
12:29:59.975489743 iwconfig wlan0
12:29:59.996094971 exit code from iwconfig: 0
12:30:00.072004029 iwconfig wlan0 key 11A3-DCEB-0C enc open
12:30:00.089743489 exit code from iwconfig: 0
12:30:00.111716912 iwconfig wlan0
12:30:00.132245709 exit code from iwconfig: 0
12:30:00.158464186 iwconfig wlan0
12:30:00.178891853 exit code from iwconfig: 0
12:30:00.199216921 iwconfig wlan0 essid MyEssid
12:30:00.244755404 exit code from iwconfig: 0

dmesg: [   23.015112] wlan0: authenticate with AP 00:23:69:ea:7b:da
dmesg: [   23.016645] wlan0: authenticated
dmesg: [   23.016649] wlan0: associate with AP 00:23:69:ea:7b:da
dmesg: [   23.018747] wlan0: RX AssocResp from 00:23:69:ea:7b:da (capab=0x411 status=0 aid=3)
dmesg: [   23.018752] wlan0: associated

12:30:10.357188388 iwconfig wlan0 txpower on
12:30:10.377070845 exit code from iwconfig: 0
12:30:10.396143781 iwconfig wlan0 ap off

dmesg: [   23.725183] wlan0: authenticate with AP 00:23:69:ea:7b:da
dmesg: [   23.728803] wlan0: authenticated
dmesg: [   23.728813] wlan0: associate with AP 00:23:69:ea:7b:da

12:30:10.421227362 exit code from iwconfig: 0

dmesg: [   23.730953] wlan0: RX ReassocResp from 00:23:69:ea:7b:da (capab=0x411 status=0 aid=3)
dmesg: [   23.730963] wlan0: associated

12:30:10.445693874 iwconfig wlan0 essid off

dmesg: [   23.811484] wlan0: authenticate with AP 00:1b:2f:48:82:68
dmesg: [   23.813094] wlan0: authenticated
dmesg: [   23.813101] wlan0: associate with AP 00:1b:2f:48:82:68

12:30:10.507897075 exit code from iwconfig: 0
12:30:10.526739298 iwconfig wlan0 txpower off
12:30:10.544326870 exit code from iwconfig: 0
12:30:10.563014201 ifconfig wlan0 down

dmesg: [   23.895267] wlan0: deauthenticating by local choice (reason=3)

12:30:10.605964173 exit code from ifconfig: 0
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum