]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
net: wireless: bcmdhd: update disconnect event to upper layer
authorOm Prakash Singh <omp@nvidia.com>
Wed, 19 Aug 2015 06:43:43 +0000 (12:13 +0530)
committermobile promotions <svcmobile_promotions@nvidia.com>
Tue, 25 Aug 2015 17:25:24 +0000 (10:25 -0700)
When driver receives back to back connect/disconnect events,
sometimes driver state gets stuck in DISCONNECTING state.
On next connect/disconnect cycle, disconnect is not propagated
to upper layers since driver is in DISCONNECTING state.
Originally DISCONNECTING state check was added to send DISASSOC
only if driver state is not DISCONNECTING but notification to
upper layers is also added in the condition. Moving the notification
out of the condition to resolve this issue.

Bug 200120612

Change-Id: Ibd3cc207e1f7558b9d2da7a524b4e2729e85ae8b
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: http://git-master/r/785780
Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
drivers/net/wireless/bcmdhd/wl_cfg80211.c

index 0c4c23bd958fe5c82ae4398198ace73814041995..c9870ae073ac3c17c201da8c180be1d500b7d699 100644 (file)
@@ -8890,11 +8890,11 @@ wl_notify_connect_status(struct bcm_cfg80211 *cfg, bcm_struct_cfgdev *cfgdev,
                                                WL_ERR(("WLC_DISASSOC error %d\n", err));
                                                err = 0;
                                        }
-                                       cfg80211_disconnected(ndev, reason, NULL, 0, GFP_KERNEL);
-                                       wl_link_down(cfg);
-                                       wl_init_prof(cfg, ndev);
                                        memset(&cfg->last_roamed_addr, 0, ETHER_ADDR_LEN);
                                }
+                               cfg80211_disconnected(ndev, reason, NULL, 0, GFP_KERNEL);
+                               wl_link_down(cfg);
+                               wl_init_prof(cfg, ndev);
                        }
                        else if (wl_get_drv_status(cfg, CONNECTING, ndev)) {
                                printk("link down, during connecting\n");