diff mbox

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

Message ID 200909230907.24750.hs4233@mail.mn-solutions.de (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Holger Schurig Sept. 23, 2009, 7:07 a.m. UTC
> Those are expected, and ok.

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

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

Comments

Johannes Berg Sept. 23, 2009, 5:51 p.m. UTC | #1
On Wed, 2009-09-23 at 09:07 +0200, Holger Schurig wrote:
> > Those are expected, and ok.
> 
> Okay, then here is a patch to silence this in wpa_supplicant.

No, they should only be ignored under certain circumstances.

johannes

> Signed-off-by: Holger Schurig <hs4233@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; "
> 
> 
>
diff mbox

Patch

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; "