Please note: This project is no longer active. The website is kept online for historic purposes only.
If you´re looking for a Linux driver for your Atheros WLAN device, you should continue here .

Ticket #1354 (new defect)

Opened 15 years ago

Last modified 14 years ago

AP scan/association fails with madwifi-trunk on MacBookPro2,2

Reported by: davidepesa@gmail.com Assigned to:
Priority: major Milestone:
Component: madwifi: other Version: trunk
Keywords: Cc:
Patch is attached: 0 Pending:

Description

wpa_supplicant is unable to find any APs using trunk (svn) version of drivers since madwifi-hal-0.9.30.13 branch merge. Before merge, the branch was working fine. I'm on a MacBookPro?2,2 using both wpa_supplicant-0.5.7 (stable version) and 0.6.0 (development).

# wpa_supplicant -iath0 -Dmadwifi -c /etc/wpa_supplicant.conf -dddd
Initializing interface 'ath0' conf '/etc/wpa_supplicant.conf' driver 'madwifi' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
ctrl_interface_group='100' (DEPRECATED)
update_config=1
ap_scan=1
fast_reauth=0
Line: 8 - start of a new network block
ssid - hexdump_ascii(len=13):
     53 54 55 44 45 4e 54 49 2e 4d 41 54 48            STUDENTI.MATH
key_mgmt: 0x1
eap methods - hexdump(len=16): 00 00 00 00 19 00 00 00 00 00 00 00 00 00 00 00
identity - hexdump_ascii(len=8):
     64 70 65 73 61 76 65 6e                     [REMOVED]
password - hexdump_ascii(len=8): [REMOVED]
ca_cert - hexdump_ascii(len=20):
     2f 65 74 63 2f 6d 61 74 68 2e 63 61 63 65 72 74   /etc/math.cacert
     2e 70 65 6d                                       .pem
phase2 - hexdump_ascii(len=13):
     61 75 74 68 3d 4d 53 43 48 41 50 56 32            auth=MSCHAPV2
Priority group 0
   id=0 ssid='STUDENTI.MATH'
Initializing interface (2) 'ath0'
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
Interface ath0 set UP - waiting a second for the driver to complete initialization
SIOCGIWRANGE: WE(compiled)=22 WE(source)=18 enc_capa=0xf
  capabilities: key_mgmt 0xf enc 0xf
WEXT: Operstate: linkmode=1, operstate=5
Own MAC address: 00:19:e3:02:24:32
wpa_driver_madwifi_del_key: keyidx=0
wpa_driver_madwifi_del_key: keyidx=1
wpa_driver_madwifi_del_key: keyidx=2
wpa_driver_madwifi_del_key: keyidx=3
wpa_driver_madwifi_set_countermeasures: enabled=0
wpa_driver_madwifi_set_drop_unencrypted: enabled=1
RSN: flushing PMKID list in the driver
Setting scan request: 0 sec 100000 usec
ctrl_interface_group=100
Added interface ath0
Ignore event for foreign ifindex 3
RTM_NEWLINK: operstate=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added
RTM_NEWLINK: operstate=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added
RTM_NEWLINK: operstate=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
Wireless event: cmd=0x8b06 len=12
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
Trying to get current scan results first without requesting a new scan to speed up initial association
Received 277 bytes of scan results (1 BSSes)
Scan results: 1
Selecting BSS from priority group 0
Try to find WPA-enabled AP
0: 00:0f:b5:c7:bd:95 ssid='' wpa_ie_len=24 rsn_ie_len=0 caps=0x11
   skip - SSID mismatch
Try to find non-WPA AP
0: 00:0f:b5:c7:bd:95 ssid='' wpa_ie_len=24 rsn_ie_len=0 caps=0x11
   skip - SSID mismatch
No suitable AP found.
Setting scan request: 0 sec 0 usec
Starting AP scan (broadcast SSID)
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
Wireless event: cmd=0x8b1a len=16
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
Wireless event: cmd=0x8b19 len=16
Received 277 bytes of scan results (1 BSSes)
Scan results: 1
Selecting BSS from priority group 0
Try to find WPA-enabled AP
0: 00:0f:b5:c7:bd:95 ssid='' wpa_ie_len=24 rsn_ie_len=0 caps=0x11
   skip - SSID mismatch
Try to find non-WPA AP
0: 00:0f:b5:c7:bd:95 ssid='' wpa_ie_len=24 rsn_ie_len=0 caps=0x11
   skip - SSID mismatch
No suitable AP found.

Change History

06/04/07 14:41:33 changed by mentor

A fix went in recently that reportedly fixed some problems some people were experiencing with association using WPA. Would you test again with trunk?

06/04/07 15:56:59 changed by davidepesa

Tested with latest svn trunk (r2427): scanning still doesn't work... :(

06/09/07 02:24:36 changed by ajs

Yep, still broken for me too (WEP here).

06/28/07 18:05:36 changed by davidepesa

Still broken with r2518...

07/27/07 11:19:06 changed by mrenzmann

Chances are that this issue is related to the preempt_scan issue (see #275). Please try this snapshot, see if that helps to fix the issues reported in this ticket and give us some feedback. Thanks.

07/30/07 12:15:31 changed by davidepesa

I tried the snapshot you suggested with a 2.6.22 kernel. The result is not very good: at boot udev loads the module ath_pci as always but then I get the following kernel BUG...

[   27.478183] kernel BUG at fs/sysfs/group.c:51!
[   27.479615] invalid opcode: 0000 [1] PREEMPT SMP
[   27.481044] CPU 1
[   27.482466] Modules linked in: ath_rate_sample(F) ath_pci(F) wlan ath_hal(P) usbhid firewire_ohci firewire_core crc_itu_t i2c_i801 i2c_core sr_mod cdrom sky2 ehci_hcd sg rtc snd_hda_intel snd_pcm snd_timer snd soundcore snd_page_alloc
[   27.485630] Pid: 1292, comm: modprobe Tainted: PF      2.6.22-gentoo-r2 #1
[   27.487195] RIP: 0010:[<ffffffff802da2a0>]  [<ffffffff802da2a0>] sysfs_create_group+0xb0/0xf0
[   27.488723] RSP: 0018:ffff81007d289ab8  EFLAGS: 00010246
[   27.490227] RAX: ffff81007d278000 RBX: ffff81007d278740 RCX: 0000000000000000
[   27.491764] RDX: 000000000000004b RSI: ffffffff88163720 RDI: ffff81007d278558
[   27.493254] RBP: ffff81007d278740 R08: 0000000001851cd2 R09: 0000000000000000
[   27.494736] R10: 00000000fffffffc R11: 0000000000000001 R12: 0000000000000001
[   27.496237] R13: ffffffff88163720 R14: ffff81007d130740 R15: 0000000000000001
[   27.497686] FS:  00002b23eb5d3ae0(0000) GS:ffff810002f12f40(0000) knlGS:0000000000000000
[   27.499180] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[   27.500646] CR2: 00002b3d6c971000 CR3: 000000007c769000 CR4: 00000000000006e0
[   27.502115] Process modprobe (pid: 1292, threadinfo ffff81007d288000, task ffff81007d62d910)
[   27.503610] Stack:  ffff810030687461 ffff81007f0e4900 00000040000000d0 ffff81007d278740
[   27.505187]  ffff81007d278740 0000000000000001 ffffffff88179930 ffffffff8815254d
[   27.506748]  ffff81007d278740 ffff81007d278000 0000000000000001 ffffffff88135dca
[   27.506817] Call Trace:
[   27.509792]  [<ffffffff8815254d>] :wlan:ieee80211_virtfs_vattach+0x1d/0x620
[   27.511313]  [<ffffffff88135dca>] :wlan:ieee80211_vap_setup+0x20a/0x370
[   27.512857]  [<ffffffff881706c1>] :ath_pci:ath_detach+0x2e1/0x1770
[   27.514367]  [<ffffffff881734c3>] :ath_pci:ath_attach+0x1973/0x3350
[   27.515849]  [<ffffffff802658ea>] request_irq+0xfa/0x130
[   27.517329]  [<ffffffff88178300>] :ath_pci:ath_ioctl_ethtool+0x3e0/0x570
[   27.518840]  [<ffffffff80341846>] pci_device_probe+0x76/0xa0
[   27.520327]  [<ffffffff803a4d70>] __driver_attach+0x0/0xb0
[   27.521839]  [<ffffffff803a4b67>] driver_probe_device+0xa7/0x1d0
[   27.523355]  [<ffffffff803a4d70>] __driver_attach+0x0/0xb0
[   27.524874]  [<ffffffff803a4e15>] __driver_attach+0xa5/0xb0
[   27.526384]  [<ffffffff803a3dcd>] bus_for_each_dev+0x4d/0x80
[   27.527898]  [<ffffffff803a41cf>] bus_add_driver+0xaf/0x1f0
[   27.529412]  [<ffffffff80341a70>] __pci_register_driver+0x70/0xc0
[   27.530886]  [<ffffffff8818103a>] :ath_pci:init_module+0x3a/0x5f
[   27.532373]  [<ffffffff80258f3b>] sys_init_module+0x19b/0x1a10
[   27.533847]  [<ffffffff8020a2be>] system_call+0x7e/0x83
[   27.535358]
[   27.536866]
[   27.536866] Code: 0f 0b eb fe 4c 89 ee 48 89 df e8 81 fe ff ff 49 83 7d 00 00
[   27.540101] RIP  [<ffffffff802da2a0>] sysfs_create_group+0xb0/0xf0
[   27.541753]  RSP <ffff81007d289ab8>

07/31/07 01:05:25 changed by mentor

That's been fixed already. Try a newer snapshot, or checkout HEAD directly.

09/06/07 22:19:21 changed by davidepesa

Still doesn't work. Now scanning is broken, too.

09/12/07 15:14:47 changed by davidepesa

Ok, I tested in deeper details with two different WiFi networks. Driver version is madwifi SVN trunk revision 2706. Both networks are 802.11g and ESSID broadcasting.

1) using WPA-PSK + TKIP: scanning reveals this network, association is successful, but after that connection is dropped *before* authentication can complete.

2) using WPA-EAP/PEAP-MSCHAPv2 + TKIP: scanning does *not* show this network, and association fails completely because wpa_supplicant doesn't see the AP.

09/12/07 15:18:22 changed by davidepesa

Forgot to mention that I'm using linux-2.6.22 and wpa_supplicant-0.5.8.