wpa_supplicant cannot authenticate connection on prism2 radios if interface names do not match

Dan Williams dcbw at redhat.com
Mon Mar 16 13:03:13 EDT 2015


On Mon, 2015-03-16 at 17:25 +0100, Thomas Richter wrote:
> Hi folks,
> 
> sorry to ask again, probably the issue got lost over the weekend. I
> reported yesterday the following weird problem for wpa_supplicant
> failing on prism2 wireless cards under some conditions related to udev.
> 
> Typically, the prism2 driver creates paired devices, wifi0 (raw radio,
> as I understand it) and wlan0 (the established connection). For reasons
> unclear to me, wpa_supplicant seems to depend matched names, i.e. if
> wlanX is there, and it is a hostap (prism2) managed device, it also
> expects wifiX there, with the same X.

I would consider it a bug that the supplicant has to depend on the
matched names.  However, if the driver provides no mechanism to
determine the sibling from the other interface, then obviously the bug
in the supplicant could not be fixed until the driver exposes that kind
of information.

I don't happen to have a PCMCIA-capable laptop usable at the moment so I
can't plug in a prism2 card to check, but is there anything
in /sys/class/net/wlanX or its sub-directories that would link the
sibling interfaces together?  If so, then perhaps the supplicant could
be modified to use that information and solve the problem.  If not, then
the driver needs some modification to advertise those.  MAC address
matching could work too, but that seems pretty fragile.

Dan

> Now, it happens at points that udev jumps into play and renames the wlan
> interface, without touching the wifi device. If that happens,
> wpa_supplicant just fails, apparently trying to rfkill the wifi device
> for reasons unclear to me, and then fails to establish the connection.
> 
> The precise conditions are as follows:
> 
> This is an oldish IBM R31 laptop with a debian wheezy on it, but with a
> custom vanilla 3.18.7 kernel. (The debian kernel is too old to work on
> this machine, due to a bug in the i830GM graphics support unrelated to
> this issue).
> 
> The laptop came originally with a ipw2200 wifi installed, which udev
> assigned to the interface name wlan0. Unfortunately, the ipw2200 driver
> has a couple of problems of its own, as in randomly crashing the system
> when sending out packets, so the ipw2200 wifi was replaced by a prism2
> based mini-PCI card.
> 
> Now, udev tries to remember device names, and finds that wlan0 is
> already taken for the ipw2200 no longer in the system, so it renames the
> wlan0 of the hostap/prism card to wlan1.
> 
> If I now list network interfaces with ifconfig,I see "wifi0", and
> "wlan1", both handled by the prism driver.
> 
> Unfortunately, in this combination, wpa_supplicant fails over and cannot
> authenticate the connection.
> 
> If I edit /etc/udev/rules.d/70-persistent-net.rules and remove the fixed
> network names, i.e. the reserved entry for ipw2200, then everything
> works fine. In this combination, hostap/prism gets the interfaces wlan0
> and wifi0, and wpa_supplicant accepts this just fine.
> 
> Thus, please: What is the matter here? Could you please fix this?
> 
> Thanks,
> 	Thomas
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap




More information about the HostAP mailing list