diff options
author | Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> | 2018-05-29 15:00:05 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-05-30 22:20:17 +0300 |
commit | 480daa9cb62c14bbd1b87a01cd9bc10cc56dbf32 (patch) | |
tree | bc0e53348851f3daec587d62bc454aea450f63b2 /drivers/net/wireless/quantenna/qtnfmac/event.c | |
parent | 40d68dbb986d2116c15e70f63c419a5481d7b91c (diff) | |
download | linux-480daa9cb62c14bbd1b87a01cd9bc10cc56dbf32.tar.xz |
qtnfmac: fix invalid STA state on EAPOL failure
Driver switches vif sta_state into QTNF_STA_CONNECTING when cfg80211
core initiates connect procedure. Further this state is changed either
to QTNF_STA_CONNECTED or to QTNF_STA_DISCONNECTED by BSS_JOIN and
BSS_LEAVE events from firmware. However it is possible that no such
events will be sent by firmware, e.g. if EAPOL timed out.
In this case vif sta_mode will remain in QTNF_STA_CONNECTING state and
all subsequent connection attempts will fail with -EBUSY error code.
Fix this by perfroming STA state transition from QTNF_STA_CONNECTING
to QTNF_STA_DISCONNECTED in cfg80211 disconnect callback.
No need to rely upon firmware events in this case.
Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/quantenna/qtnfmac/event.c')
-rw-r--r-- | drivers/net/wireless/quantenna/qtnfmac/event.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/wireless/quantenna/qtnfmac/event.c b/drivers/net/wireless/quantenna/qtnfmac/event.c index 16617c44f81b..68da81bec4e9 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/event.c +++ b/drivers/net/wireless/quantenna/qtnfmac/event.c @@ -211,11 +211,9 @@ qtnf_event_handle_bss_leave(struct qtnf_vif *vif, return -EPROTO; } - if (vif->sta_state != QTNF_STA_CONNECTED) { - pr_err("VIF%u.%u: BSS_LEAVE event when STA is not connected\n", - vif->mac->macid, vif->vifid); - return -EPROTO; - } + if (vif->sta_state != QTNF_STA_CONNECTED) + pr_warn("VIF%u.%u: BSS_LEAVE event when STA is not connected\n", + vif->mac->macid, vif->vifid); pr_debug("VIF%u.%u: disconnected\n", vif->mac->macid, vif->vifid); |