[PATCH] nl80211: Add MLME assoc work-around for -EEXIST errno

greearb at candelatech.com greearb at candelatech.com
Tue Mar 6 12:55:45 PST 2018


From: Ben Greear <greearb at candelatech.com>

The 4.9 kernel, at least, can return EEXIST when trying to add
a station that already exists.

Signed-off-by: Ben Greear <greearb at candelatech.com>
---
 src/drivers/driver_nl80211.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 373f745..1fe0a5c 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -3294,7 +3294,8 @@ retry:
 		wpa_dbg(drv->ctx, MSG_INFO,
 			"nl80211: MLME command failed (auth): count=%d ret=%d (%s)",
 			count, ret, strerror(-ret));
-		if (ret == -EALREADY && count == 1 && params->bssid &&
+		if (((ret == -EALREADY) || (ret == -EEXIST))
+		    && count == 1 && params->bssid &&
 		    !params->local_state_change) {
 			/* Nov 9, 2017:  Re-enable this...user saw endless loop of
 			 * hitting this case.  Maybe the original reason I put this hack
-- 
2.7.5




More information about the Hostap mailing list