From patchwork Wed Jun 12 18:53:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 1114779 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=narfation.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gGFxA78e"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=narfation.org header.i=@narfation.org header.b="Fqrm5tI/"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45PGGv3d20z9sBb for ; Thu, 13 Jun 2019 04:53:27 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=2dMiq/cvUNRRMOy0itn/zcBKhZuCXYjzXCnaKmjESrg=; b=gGFxA78ezu7Z+e XLDv5BHUrRInnZ80m+pra1dU58SqO3ywMtHAaAqFZwkSah+UTtXp9fqWqIHCW7/+XfZBiLPDoooWm VfDMZefpd4tGNYOFZgqvhCoROOM0kJvTGCuBLEaA8hUzM385QuHP6OTdbk3hnMzzJAfupb6jbaciZ N9mRN+Pqb2wpesZMxAwxRq4peiicsPYP2F3/h/SOfYwkeeu/KhxqKJypj51KwsmkPz4u3k4PhhFfW a38F82+f4ClTqBO5WZbYZ4ur099scAtapQ39SXdf25CRzVWKO6SEd0ohbnDvtMXKGTTMpfUEZRBmq YE4qel/HazfUrs1Vt2gg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hb8N8-0004AV-UB; Wed, 12 Jun 2019 18:53:22 +0000 Received: from durin.narfation.org ([79.140.41.39]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hb8N3-00049a-E5 for hostap@lists.infradead.org; Wed, 12 Jun 2019 18:53:19 +0000 Received: from sven-desktop.home.narfation.org (p200300C5971631EE000000000000070D.dip0.t-ipconnect.de [IPv6:2003:c5:9716:31ee::70d]) by durin.narfation.org (Postfix) with ESMTPSA id BB1571100ED; Wed, 12 Jun 2019 20:53:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=narfation.org; s=20121; t=1560365593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=4IyYOyqemlDmX+rqQaxHzHsdWjU/7qFwhNVsSe43b3E=; b=Fqrm5tI/Yagj7B9qxaztUf8TGk0e/nk1MotFH+KPaFvtdNFvdGBBSExy0wkjNC+cr3R53Q ebj7jUX4f+CGaHaHgyc0R5ll8W7Dth/cIjCedpJZRT+2urSvY3ntZK3gbkm38lCHmK85UB Mdb8gos2AgU4uo4rqJM5A/BPaXaQXds= From: Sven Eckelmann To: Jouni Malinen Subject: [PATCH] HE: Fix HE capability check for PPE threshold present Date: Wed, 12 Jun 2019 20:53:04 +0200 Message-Id: <20190612185304.8367-1-sven@narfation.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=narfation.org; s=20121; t=1560365593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=4IyYOyqemlDmX+rqQaxHzHsdWjU/7qFwhNVsSe43b3E=; b=Kw2PaBjAp/T/8G2zur4by6hh48dXDivqdT9S3cXNBlb7oCOoceMIesvCMMzrlo1NbsXnRx VPaFCb6bbbU2MniQQf2U5MfV3+QsNvBRDBHKBw00iNZ2DsDqG1fM4OfliPZz5dJayS01yk 6Y3gps2lCvgu4Wo1eCq5Dj0eUubS9jc= ARC-Seal: i=1; s=20121; d=narfation.org; t=1560365593; a=rsa-sha256; cv=none; b=r2znMMVvOc6W9AbhCE6ZDTfbAcn37IyhqQK6g6qbm876ETWc2xT59/tHIYL814SUYBtZjE 7sk/uVsjK1rtRFBMtYoShXwCo+v9qsWUgn3X95iu34lXbaceLyCDfqCbV8LBIj1rKnc4xr +8TnO/+wailRUsUu+0qQB4iLdKig8BI= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=sven smtp.mailfrom=sven@narfation.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190612_115317_763569_56164863 X-CRM114-Status: UNSURE ( 9.21 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [79.140.41.39 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hostap@lists.infradead.org, Shashidhar Lakkavalli , Sven Eckelmann , John Crispin Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Sven Eckelmann The the mask for PPE threshold present in the HE phy capability byte 6 is 0x80 and not 0x6. The latter breaks the length calculation and the acceptance of the HE capabilities for STAs which either: * don't have PPE threshold present AND the highest bit of the sounding dimension <= 80 Mhz or lowest bit of the sounding dimension > 80Mhz set * do have PPE threshold present AND not the highest bit of the sounding dimension <= 80 Mhz and not lowest bit of the sounding dimension > 80Mhz set Fixes: 8f5fc369e263 ("HE: Fix HE Capabilities element variable length encoding") Signed-off-by: Sven Eckelmann --- Cc: John Crispin Cc: Shashidhar Lakkavalli --- src/ap/ieee802_11_he.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ap/ieee802_11_he.c b/src/ap/ieee802_11_he.c index ba22a174a..d3d3c1db3 100644 --- a/src/ap/ieee802_11_he.c +++ b/src/ap/ieee802_11_he.c @@ -23,7 +23,7 @@ static u8 ieee80211_he_ppet_size(u8 ppe_thres_hdr, const u8 *phy_cap_info) u8 sz = 0, ru; if ((phy_cap_info[HE_PHYCAP_PPE_THRESHOLD_PRESENT_IDX] & - HE_PHYCAP_PPE_THRESHOLD_PRESENT_IDX) == 0) + HE_PHYCAP_PPE_THRESHOLD_PRESENT) == 0) return 0; ru = (ppe_thres_hdr >> HE_PPE_THRES_RU_INDEX_BITMASK_SHIFT) &