]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/mac80211/cfg.c
Merge branch 'upstream-net26' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
[linux-2.6-omap-h63xx.git] / net / mac80211 / cfg.c
index 6263cfc148c029efa5b7572535869e060c1975d3..6b183a3526b0ae2f4f0b0c703d1686a2d2bc5222 100644 (file)
@@ -17,8 +17,6 @@
 #include "ieee80211_rate.h"
 #include "mesh.h"
 
-#define DEFAULT_RATES 0
-
 static enum ieee80211_if_types
 nl80211_type_to_mac80211_type(enum nl80211_iftype type)
 {
@@ -654,10 +652,13 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
        } else
                sdata = IEEE80211_DEV_TO_SUB_IF(dev);
 
-       if (ieee80211_vif_is_mesh(&sdata->vif))
-               sta = mesh_plink_alloc(sdata, mac, DEFAULT_RATES, GFP_KERNEL);
-       else
-               sta = sta_info_alloc(sdata, mac, GFP_KERNEL);
+       if (compare_ether_addr(mac, dev->dev_addr) == 0)
+               return -EINVAL;
+
+       if (is_multicast_ether_addr(mac))
+               return -EINVAL;
+
+       sta = sta_info_alloc(sdata, mac, GFP_KERNEL);
        if (!sta)
                return -ENOMEM;
 
@@ -784,7 +785,7 @@ static int ieee80211_del_mpath(struct wiphy *wiphy, struct net_device *dev,
                                 u8 *dst)
 {
        if (dst)
-               return mesh_path_del(dst, dev, false);
+               return mesh_path_del(dst, dev);
 
        mesh_path_flush(dev);
        return 0;