Commit b8d2e878 authored by Daniel Kim's avatar Daniel Kim Committed by John W. Linville
Browse files

brcmfmac: Fix reconnect failure after beacon timeout

The DISASSOC command needs to be sent to firmware when a connection
loss is detected by firmware (e.g., beacon timeout). Otherwise the
next connect request fails due to a lingering LINK(down) event from
firmware. This patch resolves the issue by using brcmf_link_down()
handler, instead of the incomplete duplicated codes.
Reviewed-by: default avatarArend Van Spriel <>
Reviewed-by: default avatarPieter-Paul Giesberts <>
Reviewed-by: default avatarHante Meuleman <>
Signed-off-by: default avatarDaniel Kim <>
Signed-off-by: default avatarArend van Spriel <>
Signed-off-by: default avatarJohn W. Linville <>
parent 3e99b08a
...@@ -4687,7 +4687,6 @@ brcmf_notify_connect_status(struct brcmf_if *ifp, ...@@ -4687,7 +4687,6 @@ brcmf_notify_connect_status(struct brcmf_if *ifp,
struct brcmf_cfg80211_profile *profile = &ifp->vif->profile; struct brcmf_cfg80211_profile *profile = &ifp->vif->profile;
struct ieee80211_channel *chan; struct ieee80211_channel *chan;
s32 err = 0; s32 err = 0;
u16 reason;
if (brcmf_is_apmode(ifp->vif)) { if (brcmf_is_apmode(ifp->vif)) {
err = brcmf_notify_connect_status_ap(cfg, ndev, e, data); err = brcmf_notify_connect_status_ap(cfg, ndev, e, data);
...@@ -4708,16 +4707,6 @@ brcmf_notify_connect_status(struct brcmf_if *ifp, ...@@ -4708,16 +4707,6 @@ brcmf_notify_connect_status(struct brcmf_if *ifp,
brcmf_dbg(CONN, "Linkdown\n"); brcmf_dbg(CONN, "Linkdown\n");
if (!brcmf_is_ibssmode(ifp->vif)) { if (!brcmf_is_ibssmode(ifp->vif)) {
brcmf_bss_connect_done(cfg, ndev, e, false); brcmf_bss_connect_done(cfg, ndev, e, false);
if (test_and_clear_bit(BRCMF_VIF_STATUS_CONNECTED,
&ifp->vif->sme_state)) {
reason = 0;
if (((e->event_code == BRCMF_E_DEAUTH_IND) ||
(e->event_code == BRCMF_E_DISASSOC_IND)) &&
reason = e->reason;
cfg80211_disconnected(ndev, reason, NULL, 0,
} }
brcmf_link_down(ifp->vif); brcmf_link_down(ifp->vif);
brcmf_init_prof(ndev_to_prof(ndev)); brcmf_init_prof(ndev_to_prof(ndev));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment