aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-12-14 06:20:28 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-12-15 14:45:45 -0500
commit92b62f28d02d3aafd824062f0ea57cc36fbc59d6 (patch)
tree11260b19058c81fad438454ebee029f686773685 /net/mac80211/cfg.c
parentbdd90d5e36a55271beb957b3d7ca3e29b2a90207 (diff)
mac80211: remove duplicate TDLS peer verification
This is already checked in cfg80211, so no need to repeat the checks here. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 944051b43bad..bc83a6605ea6 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -896,12 +896,6 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
896 if (is_multicast_ether_addr(mac)) 896 if (is_multicast_ether_addr(mac))
897 return -EINVAL; 897 return -EINVAL;
898 898
899 /* Only TDLS-supporting stations can add TDLS peers */
900 if ((params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER)) &&
901 !((wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS) &&
902 sdata->vif.type == NL80211_IFTYPE_STATION))
903 return -ENOTSUPP;
904
905 sta = sta_info_alloc(sdata, mac, GFP_KERNEL); 899 sta = sta_info_alloc(sdata, mac, GFP_KERNEL);
906 if (!sta) 900 if (!sta)
907 return -ENOMEM; 901 return -ENOMEM;
@@ -968,14 +962,6 @@ static int ieee80211_change_station(struct wiphy *wiphy,
968 return -ENOENT; 962 return -ENOENT;
969 } 963 }
970 964
971 /* The TDLS bit cannot be toggled after the STA was added */
972 if ((params->sta_flags_mask & BIT(NL80211_STA_FLAG_TDLS_PEER)) &&
973 !!(params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER)) !=
974 !!test_sta_flag(sta, WLAN_STA_TDLS_PEER)) {
975 rcu_read_unlock();
976 return -EINVAL;
977 }
978
979 /* in station mode, supported rates are only valid with TDLS */ 965 /* in station mode, supported rates are only valid with TDLS */
980 if (sdata->vif.type == NL80211_IFTYPE_STATION && 966 if (sdata->vif.type == NL80211_IFTYPE_STATION &&
981 params->supported_rates && 967 params->supported_rates &&