Merge remote-tracking branch 'mac80211/master' into HEAD
authorJohannes Berg <johannes.berg@intel.com>
Wed, 19 Jun 2013 16:55:06 +0000 (18:55 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 19 Jun 2013 16:55:12 +0000 (18:55 +0200)
Merge mac80211 to avoid conflicts with the nl80211 attrbuf
changes.

Conflicts:
net/mac80211/iface.c
net/wireless/nl80211.c

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1  2 
net/mac80211/cfg.c
net/mac80211/ieee80211_i.h
net/mac80211/iface.c
net/mac80211/mlme.c
net/mac80211/rate.c
net/mac80211/util.c
net/wireless/nl80211.c

Simple merge
Simple merge
index 7cabaf261fede492c77f9aa93452000732c5cb15,98d20c0f6fed8829c1881e16b274c2bf97c589c4..a2a8250e2f845d6441f60e177357900d3d411155
@@@ -159,10 -159,10 +159,11 @@@ static int ieee80211_change_mtu(struct 
        return 0;
  }
  
- static int ieee80211_verify_mac(struct ieee80211_local *local, u8 *addr,
 -static int ieee80211_verify_mac(struct ieee80211_sub_if_data *sdata, u8 *addr)
++static int ieee80211_verify_mac(struct ieee80211_sub_if_data *sdata, u8 *addr,
 +                              bool check_dup)
  {
-       struct ieee80211_sub_if_data *sdata;
+       struct ieee80211_local *local = sdata->local;
+       struct ieee80211_sub_if_data *iter;
        u64 new, mask, tmp;
        u8 *m;
        int ret = 0;
                ((u64)m[2] << 3*8) | ((u64)m[3] << 2*8) |
                ((u64)m[4] << 1*8) | ((u64)m[5] << 0*8);
  
 +      if (!check_dup)
 +              return ret;
  
        mutex_lock(&local->iflist_mtx);
-       list_for_each_entry(sdata, &local->interfaces, list) {
-               if (sdata->vif.type == NL80211_IFTYPE_MONITOR &&
-                   !(sdata->u.mntr_flags & MONITOR_FLAG_ACTIVE))
+       list_for_each_entry(iter, &local->interfaces, list) {
+               if (iter == sdata)
                        continue;
  
-               m = sdata->vif.addr;
 -              if (iter->vif.type == NL80211_IFTYPE_MONITOR)
++              if (iter->vif.type == NL80211_IFTYPE_MONITOR &&
++                  !(iter->u.mntr_flags & MONITOR_FLAG_ACTIVE))
+                       continue;
+               m = iter->vif.addr;
                tmp =   ((u64)m[0] << 5*8) | ((u64)m[1] << 4*8) |
                        ((u64)m[2] << 3*8) | ((u64)m[3] << 2*8) |
                        ((u64)m[4] << 1*8) | ((u64)m[5] << 0*8);
@@@ -214,11 -213,7 +218,11 @@@ static int ieee80211_change_mac(struct 
        if (ieee80211_sdata_running(sdata))
                return -EBUSY;
  
 -      ret = ieee80211_verify_mac(sdata, sa->sa_data);
 +      if (sdata->vif.type == NL80211_IFTYPE_MONITOR &&
 +          !(sdata->u.mntr_flags & MONITOR_FLAG_ACTIVE))
 +              check_dup = false;
 +
-       ret = ieee80211_verify_mac(sdata->local, sa->sa_data, check_dup);
++      ret = ieee80211_verify_mac(sdata, sa->sa_data, check_dup);
        if (ret)
                return ret;
  
index e0939eb79060daca8239212e8239241a0d53b381,741448b308257c3a6f01c3d09ca36d7ddaa31ca3..34d54fe8148398826dcd80041556b8c4231fb050
@@@ -2653,12 -2743,16 +2723,15 @@@ static bool ieee80211_assoc_success(str
        ieee80211_sta_rx_notify(sdata, (struct ieee80211_hdr *)mgmt);
        ieee80211_sta_reset_beacon_monitor(sdata);
  
-       return true;
+       ret = true;
+  out:
+       kfree(bss_ies);
+       return ret;
  }
  
 -static enum rx_mgmt_action __must_check
 -ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
 -                           struct ieee80211_mgmt *mgmt, size_t len,
 -                           struct cfg80211_bss **bss)
 +static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
 +                                       struct ieee80211_mgmt *mgmt,
 +                                       size_t len)
  {
        struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
        struct ieee80211_mgd_assoc_data *assoc_data = ifmgd->assoc_data;
Simple merge
Simple merge
index 4ab1ffa9df11716facdbdd09ebb75f9a93aac886,b14b7e3cb6e65a76517752872753b53264baa7b4..f8ffb9a59c8343ee09894a5a43c0f3f3d0ab7fe0
@@@ -1527,12 -1564,17 +1527,17 @@@ static int nl80211_dump_wiphy(struct sk
        struct cfg80211_registered_device *dev;
        s64 filter_wiphy = -1;
        bool split = false;
-       struct nlattr **tb = nl80211_fam.attrbuf;
+       struct nlattr **tb;
        int res;
  
 -      mutex_lock(&cfg80211_mutex);
+       /* will be zeroed in nlmsg_parse() */
+       tb = kmalloc(sizeof(*tb) * (NL80211_ATTR_MAX + 1), GFP_KERNEL);
+       if (!tb)
+               return -ENOMEM;
 +      rtnl_lock();
        res = nlmsg_parse(cb->nlh, GENL_HDRLEN + nl80211_fam.hdrsize,
-                         tb, nl80211_fam.maxattr, nl80211_policy);
+                         tb, NL80211_ATTR_MAX, nl80211_policy);
        if (res == 0) {
                split = tb[NL80211_ATTR_SPLIT_WIPHY_DUMP];
                if (tb[NL80211_ATTR_WIPHY])
  
                        netdev = dev_get_by_index(sock_net(skb->sk), ifidx);
                        if (!netdev) {
 -                              mutex_unlock(&cfg80211_mutex);
 +                              rtnl_unlock();
+                               kfree(tb);
                                return -ENODEV;
                        }
                        if (netdev->ieee80211_ptr) {