From patchwork Tue Jul 14 12:31:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Copeland X-Patchwork-Id: 6786891 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A66EEC05AC for ; Tue, 14 Jul 2015 12:32:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3241F206E5 for ; Tue, 14 Jul 2015 12:32:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 003C3206E3 for ; Tue, 14 Jul 2015 12:32:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752179AbbGNMcP (ORCPT ); Tue, 14 Jul 2015 08:32:15 -0400 Received: from mail-ie0-f179.google.com ([209.85.223.179]:34090 "EHLO mail-ie0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751813AbbGNMcO (ORCPT ); Tue, 14 Jul 2015 08:32:14 -0400 Received: by iebmu5 with SMTP id mu5so9947450ieb.1 for ; Tue, 14 Jul 2015 05:32:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=W2nURVRVQWej0LiXtotgAuKaUywDguR6oiZOSGx70zQ=; b=UcYs0qWn7Bl0Fv2Uk+ZxE02PjpXF0sjtma7jA8tZRPf7YWnZpdmWcdAxdNy8M0ZSDM C52V/ZMj5PqCfGyYrqx60PD6rai1aH9XaA6olivcfnXTgqjHZ6iBojy+EJKVtmX0eBK1 n32eVzbRDtMWjGAYurJtGn/QNfQWT7/HKGW9/jnF+gidulMwWPc4znUVcn3X/vLhvx9o sWT/qaZ7Cu++thssIkf8VJgfNkvBdQKIAkCc3cEVhzzYuc6Y7xqO1xgC4nS/WTA0k82v u5c4mLemD6776lY6zifWo8ZLG1dFD55KI9YVkCLu49NHbvh0ybrb0+Ny2cEzi7IiT/yl 9AcA== X-Gm-Message-State: ALoCoQm2RYwrJgXjoxsB+LtDU0W8Tf/3W/oxpbuENvo22inl8llrcF5jroC5Uxl+WUVGBs1mGI8U X-Received: by 10.107.152.146 with SMTP id a140mr51117206ioe.72.1436877133842; Tue, 14 Jul 2015 05:32:13 -0700 (PDT) Received: from hash ([2001:470:1d:6db:230:48ff:fe9d:9c89]) by smtp.gmail.com with ESMTPSA id c20sm439652ioc.40.2015.07.14.05.32.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Jul 2015 05:32:12 -0700 (PDT) Received: from bob by hash with local (Exim 4.84) (envelope-from ) id 1ZEzNS-0004aA-Dn; Tue, 14 Jul 2015 08:32:02 -0400 From: Bob Copeland To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, devel@lists.open80211s.org, Bob Copeland Subject: [PATCH v3 1/5] mac80211: correct aid location in peering frames Date: Tue, 14 Jul 2015 08:31:55 -0400 Message-Id: <1436877119-17577-2-git-send-email-me@bobcopeland.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1436877119-17577-1-git-send-email-me@bobcopeland.com> References: <1436877119-17577-1-git-send-email-me@bobcopeland.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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) ||