]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
wl12xx: flush packets before stopping dev role
authorEliad Peller <eliad@wizery.com>
Sun, 18 Dec 2011 18:25:42 +0000 (20:25 +0200)
committerLuciano Coelho <coelho@ti.com>
Tue, 20 Dec 2011 20:30:14 +0000 (22:30 +0200)
During sta disconnection, a deauth packet is being queued to
the dev role queue. However, the dev role is being stopped
before the packet was sent.

Flush the tx queue before stopping the dev role.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/wl12xx/cmd.c

index e0d2179794854487723ee8ea18d792202c892a1f..25990bd38be633d57bc17ae13573875f3cce4a7a 100644 (file)
@@ -1835,6 +1835,9 @@ int wl12xx_stop_dev(struct wl1271 *wl, struct wl12xx_vif *wlvif)
                      wlvif->bss_type == BSS_TYPE_IBSS)))
                return -EINVAL;
 
+       /* flush all pending packets */
+       wl1271_tx_work_locked(wl);
+
        if (test_bit(wlvif->dev_role_id, wl->roc_map)) {
                ret = wl12xx_croc(wl, wlvif->dev_role_id);
                if (ret < 0)