All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Bob Copeland <me@bobcopeland.com>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org, devel@lists.open80211s.org,
	Bob Copeland <me@bobcopeland.com>
Subject: [PATCH v3 1/5] mac80211: correct aid location in peering frames
Date: Tue, 14 Jul 2015 08:31:55 -0400	[thread overview]
Message-ID: <1436877119-17577-2-git-send-email-me@bobcopeland.com> (raw)
In-Reply-To: <1436877119-17577-1-git-send-email-me@bobcopeland.com>

According to 802.11-2012 8.5.16.3.2 AID comes directly after the
capability bytes in mesh peering confirm frames.  The existing
code, however, was adding a 2 byte offset to this location,
resulting in garbage data going out over the air.  Remove the
offset to fix it.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
---
 net/mac80211/mesh_plink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

v3: split out from patch 4

diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index 1a7d98398626..956384087e12 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -306,7 +306,7 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata,
 		if (action == WLAN_SP_MESH_PEERING_CONFIRM) {
 			/* AID */
 			pos = skb_put(skb, 2);
-			put_unaligned_le16(plid, pos + 2);
+			put_unaligned_le16(plid, pos);
 		}
 		if (ieee80211_add_srates_ie(sdata, skb, true, band) ||
 		    ieee80211_add_ext_srates_ie(sdata, skb, true, band) ||
-- 
2.1.4


  reply	other threads:[~2015-07-14 12:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-14 12:31 [PATCH v3 0/5] mesh AID fixes Bob Copeland
2015-07-14 12:31 ` Bob Copeland [this message]
2015-07-17 12:38   ` [PATCH v3 1/5] mac80211: correct aid location in peering frames Johannes Berg
2015-07-14 12:31 ` [PATCH v3 2/5] mac80211: add missing length check for confirm frames Bob Copeland
2015-07-17 12:39   ` Johannes Berg
2015-07-14 12:31 ` [PATCH v3 3/5] mac80211: reorder mesh_plink to remove forward decl Bob Copeland
2015-07-14 12:31 ` [PATCH v3 4/5] mac80211: mesh: separate plid and aid concepts Bob Copeland
2015-07-14 12:31 ` [PATCH v3 5/5] mac80211: select an AID when creating new mesh STAs Bob Copeland
2015-07-17 13:48   ` Johannes Berg
2015-07-17 14:48     ` Johannes Berg
2015-07-17 14:50       ` Johannes Berg
2015-07-17 15:13         ` Bob Copeland

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=1436877119-17577-2-git-send-email-me@bobcopeland.com \
    --to=me@bobcopeland.com \
    --cc=devel@lists.open80211s.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.