aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index a083cc78855e..b0c41a0cee79 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -562,13 +562,6 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
562 if (!netif_running(dev)) 562 if (!netif_running(dev))
563 return -ENETDOWN; 563 return -ENETDOWN;
564 564
565 /* XXX: get sta belonging to dev */
566 sta = sta_info_get(local, mac);
567 if (sta) {
568 sta_info_put(sta);
569 return -EEXIST;
570 }
571
572 if (params->vlan) { 565 if (params->vlan) {
573 sdata = IEEE80211_DEV_TO_SUB_IF(params->vlan); 566 sdata = IEEE80211_DEV_TO_SUB_IF(params->vlan);
574 567
@@ -579,8 +572,8 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
579 sdata = IEEE80211_DEV_TO_SUB_IF(dev); 572 sdata = IEEE80211_DEV_TO_SUB_IF(dev);
580 573
581 sta = sta_info_add(local, dev, mac, GFP_KERNEL); 574 sta = sta_info_add(local, dev, mac, GFP_KERNEL);
582 if (!sta) 575 if (IS_ERR(sta))
583 return -ENOMEM; 576 return PTR_ERR(sta);
584 577
585 sta->dev = sdata->dev; 578 sta->dev = sdata->dev;
586 if (sdata->vif.type == IEEE80211_IF_TYPE_VLAN || 579 if (sdata->vif.type == IEEE80211_IF_TYPE_VLAN ||