]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'fixes-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 30 Nov 2007 12:29:27 +0000 (23:29 +1100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 30 Nov 2007 12:29:27 +0000 (23:29 +1100)
1  2 
net/mac80211/ieee80211.c

diff --combined net/mac80211/ieee80211.c
index 59350b8727ecdcb97230f5e8e3530d886021fdaa,0dc114c4ef2b4d97fcbfcaaf962d7825e7815625..505af1f067ab06620fcb2050a2725a711c321f66
@@@ -216,6 -216,7 +216,7 @@@ static int ieee80211_open(struct net_de
                        res = local->ops->start(local_to_hw(local));
                if (res)
                        return res;
+               ieee80211_hw_config(local);
        }
  
        switch (sdata->type) {
                        netif_tx_unlock_bh(local->mdev);
  
                        local->hw.conf.flags |= IEEE80211_CONF_RADIOTAP;
-                       ieee80211_hw_config(local);
                }
                break;
        case IEEE80211_IF_TYPE_STA:
                tasklet_enable(&local->tasklet);
        }
  
 +      /*
 +       * set_multicast_list will be invoked by the networking core
 +       * which will check whether any increments here were done in
 +       * error and sync them down to the hardware as filter flags.
 +       */
 +      if (sdata->flags & IEEE80211_SDATA_ALLMULTI)
 +              atomic_inc(&local->iff_allmultis);
 +
 +      if (sdata->flags & IEEE80211_SDATA_PROMISC)
 +              atomic_inc(&local->iff_promiscs);
 +
        local->open_count++;
  
        netif_start_queue(dev);
@@@ -295,18 -284,6 +295,18 @@@ static int ieee80211_stop(struct net_de
  
        netif_stop_queue(dev);
  
 +      /*
 +       * Don't count this interface for promisc/allmulti while it
 +       * is down. dev_mc_unsync() will invoke set_multicast_list
 +       * on the master interface which will sync these down to the
 +       * hardware as filter flags.
 +       */
 +      if (sdata->flags & IEEE80211_SDATA_ALLMULTI)
 +              atomic_dec(&local->iff_allmultis);
 +
 +      if (sdata->flags & IEEE80211_SDATA_PROMISC)
 +              atomic_dec(&local->iff_promiscs);
 +
        dev_mc_unsync(local->mdev, dev);
  
        /* down all dependent devices, that is VLANs */
                        ieee80211_configure_filter(local);
                        netif_tx_unlock_bh(local->mdev);
  
-                       local->hw.conf.flags |= IEEE80211_CONF_RADIOTAP;
-                       ieee80211_hw_config(local);
+                       local->hw.conf.flags &= ~IEEE80211_CONF_RADIOTAP;
                }
                break;
        case IEEE80211_IF_TYPE_STA:
                        cancel_delayed_work(&local->scan_work);
                }
                flush_workqueue(local->hw.workqueue);
+               sdata->u.sta.flags &= ~IEEE80211_STA_PRIVACY_INVOKED;
+               kfree(sdata->u.sta.extra_ie);
+               sdata->u.sta.extra_ie = NULL;
+               sdata->u.sta.extra_ie_len = 0;
                /* fall through */
        default:
                conf.if_id = dev->ifindex;
@@@ -389,8 -370,8 +393,8 @@@ static void ieee80211_set_multicast_lis
  
        allmulti = !!(dev->flags & IFF_ALLMULTI);
        promisc = !!(dev->flags & IFF_PROMISC);
 -      sdata_allmulti = sdata->flags & IEEE80211_SDATA_ALLMULTI;
 -      sdata_promisc = sdata->flags & IEEE80211_SDATA_PROMISC;
 +      sdata_allmulti = !!(sdata->flags & IEEE80211_SDATA_ALLMULTI);
 +      sdata_promisc = !!(sdata->flags & IEEE80211_SDATA_PROMISC);
  
        if (allmulti != sdata_allmulti) {
                if (dev->flags & IFF_ALLMULTI)