summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2019-08-27 17:23:31 -0400
committerDavid S. Miller <davem@davemloft.net>2019-08-27 17:23:31 -0400
commit68aaf4459556b1f9370c259fd486aecad2257552 (patch)
tree99d92536a3263634969be6b70a96facea85a0df1 /net/mac80211
parentd00ee466a07eb9182ad3caf6140c7ebb527b4c64 (diff)
parent9e8312f5e160ade069e131d54ab8652cf0e86e1a (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Minor conflict in r8169, bug fix had two versions in net and net-next, take the net-next hunks. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/cfg.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index ed56b0c6fe19..7c6edb7c5f10 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1549,6 +1549,11 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
1549 if (!is_valid_ether_addr(mac)) 1549 if (!is_valid_ether_addr(mac))
1550 return -EINVAL; 1550 return -EINVAL;
1551 1551
1552 if (params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER) &&
1553 sdata->vif.type == NL80211_IFTYPE_STATION &&
1554 !sdata->u.mgd.associated)
1555 return -EINVAL;
1556
1552 sta = sta_info_alloc(sdata, mac, GFP_KERNEL); 1557 sta = sta_info_alloc(sdata, mac, GFP_KERNEL);
1553 if (!sta) 1558 if (!sta)
1554 return -ENOMEM; 1559 return -ENOMEM;
@@ -1556,10 +1561,6 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
1556 if (params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER)) 1561 if (params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER))
1557 sta->sta.tdls = true; 1562 sta->sta.tdls = true;
1558 1563
1559 if (sta->sta.tdls && sdata->vif.type == NL80211_IFTYPE_STATION &&
1560 !sdata->u.mgd.associated)
1561 return -EINVAL;
1562
1563 err = sta_apply_parameters(local, sta, params); 1564 err = sta_apply_parameters(local, sta, params);
1564 if (err) { 1565 if (err) {
1565 sta_info_free(local, sta); 1566 sta_info_free(local, sta);