Comparison of wpa_supplicant with -Dnl80211 and -Dwext, WEP and WPA

Holger Schurig hs4233
Wed Sep 23 00:07:24 PDT 2009


> Those are expected, and ok.

Okay, then here is a patch to silence this in wpa_supplicant.

Signed-off-by: Holger Schurig <hs4233 at mail.mn-solutions.de>

Index: wpasupplicant/src/drivers/driver_nl80211.c
===================================================================
--- wpasupplicant.orig/src/drivers/driver_nl80211.c	2009-09-22 12:28:58.000000000 +0200
+++ wpasupplicant/src/drivers/driver_nl80211.c	2009-09-22 12:30:29.000000000 +0200
@@ -1819,6 +1819,8 @@ static int nl_set_encr(int ifindex, stru
 	NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, ifindex);
 
 	ret = send_and_recv_msgs(drv, msg, NULL, NULL);
+	if (ret == -ENOLINK)
+		ret = 0;
 	if (ret == -ENOENT && alg == WPA_ALG_NONE)
 		ret = 0;
 	if (ret)
@@ -1850,7 +1852,7 @@ static int nl_set_encr(int ifindex, stru
 		NLA_PUT_FLAG(msg, NL80211_ATTR_KEY_DEFAULT);
 
 	ret = send_and_recv_msgs(drv, msg, NULL, NULL);
-	if (ret == -ENOENT)
+	if (ret == -ENOENT || ret == -ENOLINK)
 		ret = 0;
 	if (ret)
 		wpa_printf(MSG_DEBUG, "nl80211: set_key default failed; "



-- 
http://www.holgerschurig.de



More information about the Hostap mailing list