Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275058
b: refs/heads/master
c: e3a4cc2
h: refs/heads/master
v: v3
  • Loading branch information
Jouni Malinen authored and John W. Linville committed Nov 2, 2011
1 parent f32a979 commit 925e118
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 94d55d62bd757611f07a9122e5e07ce929b8d38d
refs/heads/master: e3a4cc2f073739c9c9c2e97efc774703061f034a
12 changes: 6 additions & 6 deletions trunk/net/mac80211/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,12 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
if (is_multicast_ether_addr(mac))
return -EINVAL;

/* Only TDLS-supporting stations can add TDLS peers */
if ((params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER)) &&
!((wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS) &&
sdata->vif.type == NL80211_IFTYPE_STATION))
return -ENOTSUPP;

sta = sta_info_alloc(sdata, mac, GFP_KERNEL);
if (!sta)
return -ENOMEM;
Expand All @@ -841,12 +847,6 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,

sta_apply_parameters(local, sta, params);

/* Only TDLS-supporting stations can add TDLS peers */
if (test_sta_flag(sta, WLAN_STA_TDLS_PEER) &&
!((wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS) &&
sdata->vif.type == NL80211_IFTYPE_STATION))
return -ENOTSUPP;

rate_control_rate_init(sta);

layer2_update = sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
Expand Down

0 comments on commit 925e118

Please sign in to comment.