]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/mac80211/iface.c
mac80211: Add netif state checking to ieee80211_ifa_changed
[mv-sheeva.git] / net / mac80211 / iface.c
index b4ec59a8dc0302f3a38bcf0a5089365fa88c5b8c..1afa9ec81fe8457a7243bfd952cd707491fb32b5 100644 (file)
@@ -10,6 +10,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+#include <linux/slab.h>
 #include <linux/kernel.h>
 #include <linux/if_arp.h>
 #include <linux/netdevice.h>
@@ -267,7 +268,6 @@ static int ieee80211_open(struct net_device *dev)
 
                changed |= ieee80211_reset_erp_info(sdata);
                ieee80211_bss_info_change_notify(sdata, changed);
-               ieee80211_enable_keys(sdata);
 
                if (sdata->vif.type == NL80211_IFTYPE_STATION)
                        netif_carrier_off(dev);
@@ -320,15 +320,6 @@ static int ieee80211_open(struct net_device *dev)
 
        ieee80211_recalc_ps(local, -1);
 
-       /*
-        * ieee80211_sta_work is disabled while network interface
-        * is down. Therefore, some configuration changes may not
-        * yet be effective. Trigger execution of ieee80211_sta_work
-        * to fix this.
-        */
-       if (sdata->vif.type == NL80211_IFTYPE_STATION)
-               ieee80211_queue_work(&local->hw, &sdata->u.mgd.work);
-
        netif_tx_start_all_queues(dev);
 
        return 0;
@@ -412,8 +403,7 @@ static int ieee80211_stop(struct net_device *dev)
 
        netif_addr_lock_bh(dev);
        spin_lock_bh(&local->filter_lock);
-       __dev_addr_unsync(&local->mc_list, &local->mc_count,
-                         &dev->mc_list, &dev->mc_count);
+       __hw_addr_unsync(&local->mc_list, &dev->mc, dev->addr_len);
        spin_unlock_bh(&local->filter_lock);
        netif_addr_unlock_bh(dev);
 
@@ -531,8 +521,8 @@ static int ieee80211_stop(struct net_device *dev)
                                BSS_CHANGED_BEACON_ENABLED);
                }
 
-               /* disable all keys for as long as this netdev is down */
-               ieee80211_disable_keys(sdata);
+               /* free all remaining keys, there shouldn't be any */
+               ieee80211_free_keys(sdata);
                drv_remove_interface(local, &sdata->vif);
        }
 
@@ -596,8 +586,7 @@ static void ieee80211_set_multicast_list(struct net_device *dev)
                sdata->flags ^= IEEE80211_SDATA_PROMISC;
        }
        spin_lock_bh(&local->filter_lock);
-       __dev_addr_sync(&local->mc_list, &local->mc_count,
-                       &dev->mc_list, &dev->mc_count);
+       __hw_addr_sync(&local->mc_list, &dev->mc, dev->addr_len);
        spin_unlock_bh(&local->filter_lock);
        ieee80211_queue_work(&local->hw, &local->reconfig_filter);
 }