]> git.karo-electronics.de Git - linux-beck.git/commitdiff
brcmfmac: Fix reconnect failure after beacon timeout
authorDaniel Kim <dekim@broadcom.com>
Mon, 12 May 2014 08:47:32 +0000 (10:47 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 13 May 2014 19:56:48 +0000 (15:56 -0400)
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: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Daniel Kim <dekim@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c

index a91514ad57b3705e2e5c3dba2aa1d9f41f295ea7..e9d7413522b386bfa57d4612d13d4bc714c9c1b4 100644 (file)
@@ -4687,7 +4687,6 @@ brcmf_notify_connect_status(struct brcmf_if *ifp,
        struct brcmf_cfg80211_profile *profile = &ifp->vif->profile;
        struct ieee80211_channel *chan;
        s32 err = 0;
-       u16 reason;
 
        if (brcmf_is_apmode(ifp->vif)) {
                err = brcmf_notify_connect_status_ap(cfg, ndev, e, data);
@@ -4708,16 +4707,6 @@ brcmf_notify_connect_status(struct brcmf_if *ifp,
                brcmf_dbg(CONN, "Linkdown\n");
                if (!brcmf_is_ibssmode(ifp->vif)) {
                        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)) &&
-                                   (e->reason != WLAN_REASON_UNSPECIFIED))
-                                       reason = e->reason;
-                               cfg80211_disconnected(ndev, reason, NULL, 0,
-                                                     GFP_KERNEL);
-                       }
                }
                brcmf_link_down(ifp->vif);
                brcmf_init_prof(ndev_to_prof(ndev));