[driver_prism54] success with WPA-PSK TKIP & [driver_madwifi] logical bug in madwifi_set_sta_authorized?
Sun Aug 13 20:48:12 PDT 2006
On Thu, Aug 10, 2006 at 02:04:15PM +0200, chunkeey at web.de wrote:
> In the past few days, I had some trouble to get my
> Prism54 device working with Hostapd (WPA-PSK).
> The current driver is rather broken (and needs a cleanup badly).
> So, rewrote some parts. Now, I can connect with wpa_supplicant 0.5.3 and
> Windows XP' Supplicant without problems and fire some pings around.
> So, if someone with "better coding skills" is interested, I could make a
Is this referring to changing the driver itself or just the driver
interface code in hostapd (driver_prism54.c)?
> --- line 407 (hostapd snapshot 2006-08-07)
> if (flags_or & WLAN_STA_AUTHORIZED)
> return madwifi_set_sta_authorized(priv, addr, 1);
> if (flags_and & WLAN_STA_AUTHORIZED)
> return madwifi_set_sta_authorized(priv, addr, 0);
> the problem lies in line 409,
> the kernel driver won't ever receive the "UNAUTHORIZED" request,
> since the "flag_and" is always NOT WLAN_STA_AUTHORIZED.
> (e.g 0xffffffdf & 0x20 = 0), right?
Well, in the current hostapd development version, there are cases where
WLAN_STA_AUTHORIZED bit is set in flags_and, but anyway, I agree that
the current madwifi_sta_set_flags() is not doing this correctly for the
case of removing WLAN_STA_AUTHORIZED flag.
> I don't have a Atheros chip right now. So, can someone try the patch and
> report back?
> +++ driver_madwifi.c 2006-08-10 13:19:19.000000000 +0200
> @@ -406,7 +406,7 @@ madwifi_sta_set_flags(void *priv, const
> - if (flags_and & WLAN_STA_AUTHORIZED)
> + if (!(flags_and & WLAN_STA_AUTHORIZED))
I did not test this, but the change looks correct and I applied it to
the development branch (both for driver_madwifi.c and driver_bsd.c).
Jouni Malinen PGP id EFC895FA
More information about the Hostap