Linux wireless drivers development
 help / color / mirror / Atom feed
From: Thomas Pedersen <thomas@cozybit.com>
To: linux-wireless@vger.kernel.org
Cc: anagar6@uic.edu, devel@lists.open80211s.org,
	Thomas Pedersen <thomas@cozybit.com>,
	johannes@sipsolutions.net, linville@tuxdriver.com
Subject: [PATCH 6/6] mac80211: check mesh peer's WMM parameters
Date: Wed, 19 Oct 2011 18:03:26 -0700	[thread overview]
Message-ID: <1319072606-28291-7-git-send-email-thomas@cozybit.com> (raw)
In-Reply-To: <1319072606-28291-1-git-send-email-thomas@cozybit.com>

For now, disallow peering if our WMM parameters don't match our peer's.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
---
 net/mac80211/mesh.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index b3a125f..dd83c8f7 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -103,6 +103,13 @@ bool mesh_matches_local(struct ieee802_11_elems *ie, struct ieee80211_sub_if_dat
 	     ieee80211_ht_info_to_channel_type(ie->ht_info_elem)))
 		goto mismatch;
 
+	if (ie->wmm_param) {
+		u8 wmm_local[sizeof(struct ieee80211_wmm_param_ie)];
+		ieee80211_build_wmm_ie(&sdata->vif, wmm_local);
+		if (memcmp(ie->wmm_param, wmm_local, sizeof(wmm_local)))
+			goto mismatch;
+	}
+
 	return true;
 mismatch:
 	return false;
-- 
1.7.5.4


      parent reply	other threads:[~2011-10-20  1:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-20  1:03 [PATCH 0/6] HT support for mesh Thomas Pedersen
2011-10-20  1:03 ` [PATCH 1/6] mac80211: Add HT helper functions Thomas Pedersen
2011-10-20  1:03 ` [PATCH 2/6] mac80211: add HT IEs to mesh frames Thomas Pedersen
2011-10-20  1:03 ` [PATCH 3/6] mac80211: set HT capabilities for mesh peer Thomas Pedersen
2011-10-20  1:03 ` [PATCH 4/6] mac80211: allow frame aggregation for mesh Thomas Pedersen
2011-10-20  9:46   ` Christian Lamparter
2011-10-20 16:48     ` Thomas Pedersen
2011-10-20  1:03 ` [PATCH 5/6] mac80211: add WMM IE to mesh frames Thomas Pedersen
2011-10-20 11:16   ` Johannes Berg
2011-10-20 17:41     ` Thomas Pedersen
2011-10-20 17:51       ` Johannes Berg
2011-10-20 17:56         ` Thomas Pedersen
2011-10-20 18:03           ` Johannes Berg
2011-10-20 18:08             ` Thomas Pedersen
2011-10-20 18:11               ` Johannes Berg
2011-10-20 18:14                 ` Thomas Pedersen
2011-10-20 18:22                   ` Johannes Berg
2011-10-20  1:03 ` Thomas Pedersen [this message]

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=1319072606-28291-7-git-send-email-thomas@cozybit.com \
    --to=thomas@cozybit.com \
    --cc=anagar6@uic.edu \
    --cc=devel@lists.open80211s.org \
    --cc=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