wl12xx: don't join upon disassociation
authorEliad Peller <eliad@wizery.com>
Sun, 26 Dec 2010 08:27:50 +0000 (09:27 +0100)
committerLuciano Coelho <coelho@ti.com>
Mon, 24 Jan 2011 20:11:51 +0000 (22:11 +0200)
wl12xx "rejoins" upon every BSS_CHANGED_BSSID notification.
However, there is no need to rejoin after disassociation, so just
filter out the case when the new bssid is 00:00:00:00:00:00.

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

index 8a35491629992cfd41c1673032c002c03b9b6552..a3529f56a3d6e35a50369dac9f517a5c3b3c4da4 100644 (file)
@@ -2266,19 +2266,21 @@ static void wl1271_bss_info_changed_sta(struct wl1271 *wl,
            memcmp(wl->bssid, bss_conf->bssid, ETH_ALEN)) {
                memcpy(wl->bssid, bss_conf->bssid, ETH_ALEN);
 
-               ret = wl1271_cmd_build_null_data(wl);
-               if (ret < 0)
-                       goto out;
+               if (!is_zero_ether_addr(wl->bssid)) {
+                       ret = wl1271_cmd_build_null_data(wl);
+                       if (ret < 0)
+                               goto out;
 
-               ret = wl1271_build_qos_null_data(wl);
-               if (ret < 0)
-                       goto out;
+                       ret = wl1271_build_qos_null_data(wl);
+                       if (ret < 0)
+                               goto out;
 
-               /* filter out all packets not from this BSSID */
-               wl1271_configure_filters(wl, 0);
+                       /* filter out all packets not from this BSSID */
+                       wl1271_configure_filters(wl, 0);
 
-               /* Need to update the BSSID (for filtering etc) */
-               do_join = true;
+                       /* Need to update the BSSID (for filtering etc) */
+                       do_join = true;
+               }
        }
 
        if ((changed & BSS_CHANGED_ASSOC)) {