CFG80211 support in wpa_supplicant

Maxim Levitsky maximlevitsky at gmail.com
Fri Jan 15 05:06:30 EST 2010


On Fri, 2010-01-15 at 10:26 +0100, Holger Schurig wrote: 
> > Is there any known issues using this?
> 
> Probably, it's quite new. The last time I checked it didn't work 
> with IBSS :-)    But also, the last time I checked, it worked 
> nicely in my environment (ath5k + cfg80211 + wpa_supplicant, 
> without any WEXT, no wicd/nm thought).
> 
> Do you have any issues?
> 

I use that for an year with NM.

Some issues pop up from time to time.

Currently, it would be very unhappy when you try to disconnect and
reconnect to an AP.

I use following hack, and only this works.
I tried many times to fix that issue properly but nether I fixed it
completely nor did I receive enough feedback.

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 9780327..4b35cf7 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -2102,12 +2102,18 @@ static int wpa_driver_nl80211_deauthenticate(void *priv, const u8 *addr,
 static int wpa_driver_nl80211_disassociate(void *priv, const u8 *addr,
                                           int reason_code)
 {
+       int err;
        struct wpa_driver_nl80211_data *drv = priv;
        if (!(drv->capa.flags & WPA_DRIVER_FLAGS_SME))
                return wpa_driver_nl80211_disconnect(drv, addr, reason_code);
        wpa_printf(MSG_DEBUG, "%s", __func__);
        drv->associated = 0;
-       return wpa_driver_nl80211_mlme(drv, addr, NL80211_CMD_DISASSOCIATE,
+
+       err = wpa_driver_nl80211_mlme(drv, addr, NL80211_CMD_DISASSOCIATE,
+                                      reason_code);
+       if (err)
+               return err;
+       return wpa_driver_nl80211_mlme(drv, addr, NL80211_CMD_DEAUTHENTICATE,
                                       reason_code);
 }




IBSS actually works now.

Also NM doesn't show proper signal levels. I also created more or less a hack to make it work:

diff --git a/src/nm-device-wifi.c b/src/nm-device-wifi.c
index 87d6c86..9fe9736 100644
--- a/src/nm-device-wifi.c
+++ b/src/nm-device-wifi.c
@@ -53,6 +53,9 @@
 #include "nm-setting-ip6-config.h"
 #include "NetworkManagerSystem.h"
 
+
+#undef IW_QUAL_DEBUG
+
 static gboolean impl_device_get_access_points (NMDeviceWifi *device,
                                                GPtrArray **aps,
                                                GError **err);
@@ -1500,6 +1503,7 @@ max_qual->updated);
         * bounded by 0 and max_qual->qual, and MUST change in a linear fashion.  Within those bounds, drivers
         * are free to use whatever they want to calculate "Link Quality".
         */
+#if 0
        if ((max_qual->qual != 0) && !(max_qual->updated & IW_QUAL_QUAL_INVALID) && !(qual->updated & IW_QUAL_QUAL_INVALID))
                percent = (int)(100 * ((double)qual->qual / (double)max_qual->qual));
 
@@ -1519,6 +1523,9 @@ max_qual->updated);
                && (    ((max_qual->noise > 0) && !(max_qual->updated & IW_QUAL_NOISE_INVALID)) /* Must have valid max_qual->noise */
                        || ((qual->noise > 0) && !(qual->updated & IW_QUAL_NOISE_INVALID)))     /*    OR valid qual->noise */
           )
+#endif
+       if (max_qual->updated & IW_QUAL_DBM)
+
        {
                /* Absolute power values (dBm) */
 


Best regards,
	Maxim Levitsky



More information about the HostAP mailing list