]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/wireless/rt2x00/rt2x00mac.c
Merge git://git.infradead.org/battery-2.6
[karo-tx-linux.git] / drivers / net / wireless / rt2x00 / rt2x00mac.c
index 17b6bb034ebfefbe6f25181c03167fa9f4952437..c206b509207051331f4791373521c773f0fda5cd 100644 (file)
@@ -253,6 +253,13 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw,
         */
        rt2x00lib_config_intf(rt2x00dev, intf, conf->type, intf->mac, NULL);
 
+       /*
+        * Some filters depend on the current working mode. We can force
+        * an update during the next configure_filter() run by mac80211 by
+        * resetting the current packet_filter state.
+        */
+       rt2x00dev->packet_filter = 0;
+
        return 0;
 }
 EXPORT_SYMBOL_GPL(rt2x00mac_add_interface);
@@ -418,9 +425,9 @@ void rt2x00mac_configure_filter(struct ieee80211_hw *hw,
        rt2x00dev->packet_filter = *total_flags;
 
        if (!test_bit(DRIVER_REQUIRE_SCHEDULED, &rt2x00dev->flags))
-               queue_work(rt2x00dev->hw->workqueue, &rt2x00dev->filter_work);
-       else
                rt2x00dev->ops->lib->config_filter(rt2x00dev, *total_flags);
+       else
+               queue_work(rt2x00dev->hw->workqueue, &rt2x00dev->filter_work);
 }
 EXPORT_SYMBOL_GPL(rt2x00mac_configure_filter);
 
@@ -478,6 +485,12 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw,
                        rt2x00dev->intf_associated++;
                else
                        rt2x00dev->intf_associated--;
+
+               if (!test_bit(DRIVER_REQUIRE_SCHEDULED, &rt2x00dev->flags))
+                       rt2x00leds_led_assoc(rt2x00dev,
+                                            !!rt2x00dev->intf_associated);
+               else
+                       delayed |= DELAYED_LED_ASSOC;
        }
 
        /*