clear wdev->connect_keys from cfg layer
diff mbox series

Message ID 20190613161659.30294-1-amit7861234@gmail.com
State Changes Requested
Headers show
Series
  • clear wdev->connect_keys from cfg layer
Related show

Commit Message

Amit Khatri June 13, 2019, 4:16 p.m. UTC
if driver stuck in connection and not able to clear
wdev->conect_keys in cfg80211 layer.below error comes
at wpa_supplicant.
nl80211: MLME connect failed: ret=-115 (Operation now in progress)
This happens because cfg layer return 115 after chceking wdev->connect_keys.
now connct command will never reach to driver.
there is one way to clear wdev->connect_keys call
wpa_driver_nl80211_disconnect() explicitly and try to make connection.

Signed-off-by: Amit Khatri <amit7861234@gmail.com>
---
 src/drivers/driver_nl80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jouni Malinen Aug. 12, 2019, 5:47 p.m. UTC | #1
On Thu, Jun 13, 2019 at 09:46:59PM +0530, Amit Khatri wrote:
> if driver stuck in connection and not able to clear
> wdev->conect_keys in cfg80211 layer.below error comes
> at wpa_supplicant.
> nl80211: MLME connect failed: ret=-115 (Operation now in progress)
> This happens because cfg layer return 115 after chceking wdev->connect_keys.
> now connct command will never reach to driver.
> there is one way to clear wdev->connect_keys call
> wpa_driver_nl80211_disconnect() explicitly and try to make connection.

Could you please clarify how a driver can get in this state? Would you
have an example wpa_supplicant debug log showing a case where this
happens?

The only case where I can see cfg80211.c return -EINPROGRESS based on
wdev->connect_keys being set is in cfg80211_connect() where the comment
implies the driver is in the process of connecting with WEP. Shouldn't
the driver be finishing that attempt at latest based on some kind of
timeout if there is an unexpected failure? Why would wpa_supplicant need
to have workaround code for trying to recover from something that sounds
like a driver issue?

Patch
diff mbox series

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 96fd0aadd..04bd36ad2 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -5808,7 +5808,7 @@  static int wpa_driver_nl80211_connect(
 		os_memset(drv->auth_attempt_bssid, 0, ETH_ALEN);
 
 	ret = wpa_driver_nl80211_try_connect(drv, params, nl_connect);
-	if (ret == -EALREADY) {
+	if (ret == -EALREADY || ret == -EINPROGRESS) {
 		/*
 		 * cfg80211 does not currently accept new connections if
 		 * we are already connected. As a workaround, force