linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 2/5] mac80211: remove duplicate TDLS peer verification
Date: Wed, 14 Dec 2011 12:20:28 +0100	[thread overview]
Message-ID: <20111214112312.886236327@sipsolutions.net> (raw)
In-Reply-To: 20111214112026.409514167@sipsolutions.net

From: Johannes Berg <johannes.berg@intel.com>

This is already checked in cfg80211, so no need
to repeat the checks here.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/mac80211/cfg.c |   14 --------------
 1 file changed, 14 deletions(-)

--- a/net/mac80211/cfg.c	2011-12-14 10:54:15.000000000 +0100
+++ b/net/mac80211/cfg.c	2011-12-14 10:55:24.000000000 +0100
@@ -896,12 +896,6 @@ static int ieee80211_add_station(struct
 	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;
@@ -968,14 +962,6 @@ static int ieee80211_change_station(stru
 		return -ENOENT;
 	}
 
-	/* The TDLS bit cannot be toggled after the STA was added */
-	if ((params->sta_flags_mask & BIT(NL80211_STA_FLAG_TDLS_PEER)) &&
-	    !!(params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER)) !=
-	    !!test_sta_flag(sta, WLAN_STA_TDLS_PEER)) {
-		rcu_read_unlock();
-		return -EINVAL;
-	}
-
 	/* in station mode, supported rates are only valid with TDLS */
 	if (sdata->vif.type == NL80211_IFTYPE_STATION &&
 	    params->supported_rates &&



  parent reply	other threads:[~2011-12-14 11:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-14 11:20 [PATCH 0/5] station management rework Johannes Berg
2011-12-14 11:20 ` [PATCH 1/5] cfg80211: validate nl80211 station handling better Johannes Berg
2011-12-14 11:20 ` Johannes Berg [this message]
2011-12-14 11:20 ` [PATCH 3/5] mac80211: use station mutex in configuration Johannes Berg
2011-12-14 11:20 ` [PATCH 4/5] mac80211: refactor station state transitions Johannes Berg
2011-12-14 11:35   ` [PATCH 4/5 v2] " Johannes Berg
2011-12-14 11:20 ` [PATCH 5/5] mac80211: count authorized stations per BSS Johannes Berg
2011-12-14 11:29 ` [PATCH 0/5] station management rework Johannes Berg
2011-12-14 11:35   ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111214112312.886236327@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).