diff options
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index de65fe3ed9cc..2493c74c2d37 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1490,6 +1490,10 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev, | |||
1490 | if (params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER)) | 1490 | if (params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER)) |
1491 | sta->sta.tdls = true; | 1491 | sta->sta.tdls = true; |
1492 | 1492 | ||
1493 | if (sta->sta.tdls && sdata->vif.type == NL80211_IFTYPE_STATION && | ||
1494 | !sdata->u.mgd.associated) | ||
1495 | return -EINVAL; | ||
1496 | |||
1493 | err = sta_apply_parameters(local, sta, params); | 1497 | err = sta_apply_parameters(local, sta, params); |
1494 | if (err) { | 1498 | if (err) { |
1495 | sta_info_free(local, sta); | 1499 | sta_info_free(local, sta); |