wl12xx: stop device role on remove_interface
authorEliad Peller <eliad@wizery.com>
Sun, 18 Dec 2011 18:25:44 +0000 (20:25 +0200)
committerLuciano Coelho <coelho@ti.com>
Tue, 20 Dec 2011 20:30:15 +0000 (22:30 +0200)
When removing a sta/ibss role, the device role has to
stopped (and disabled) as well.

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

index 77493cc..0719fc8 100644 (file)
@@ -2189,7 +2189,11 @@ static void __wl1271_op_remove_interface(struct wl1271 *wl,
                if (ret < 0)
                        goto deinit;
 
-               if (wlvif->bss_type == BSS_TYPE_STA_BSS) {
+               if (wlvif->bss_type == BSS_TYPE_STA_BSS ||
+                   wlvif->bss_type == BSS_TYPE_IBSS) {
+                       if (wl12xx_dev_role_started(wlvif))
+                               wl12xx_stop_dev(wl, wlvif);
+
                        ret = wl12xx_cmd_role_disable(wl, &wlvif->dev_role_id);
                        if (ret < 0)
                                goto deinit;