From patchwork Wed May 24 16:07:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 1785793 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=1j3fGBce; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=j0q2NtYw; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QRGR21bQvz20Pb for ; Thu, 25 May 2023 02:11:58 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :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=9UfNmvdM/DLwUqa8bmkJre9sbt9jSOw8h3Q9OSI0NUQ=; b=1j3fGBcesEn7Eh ENEp21nV7812hkNw4odpK61OYORqw4xWY+BVOaD6l8pvyKxIjdvEK3XVbkjTkp5MFZG3Rm89Gzff8 /BLRy4t5nymbE5Edr3tUGoPk445/5YNzKqshQkURAxrsH/KkDyoFZ9boyQoIKwO8UOT4yCCXmr03n xuZDR39ermGDCayszS6tFCM2OWHDg5aKXawdjBdZa+80cPfkeUBTi5HDK3FYfOh7nKfz+A2ejqEtt e1uHBO7nEG9MhOMOSQo186Xl8/zX0UN3naLp35iKD1qaNiQZASUD+EI239qyMaylXSX/WkDtfXPb/ LX97atnPs6ljDLv08EYA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q1r4X-00DxwX-04; Wed, 24 May 2023 16:10:45 +0000 Received: from mga17.intel.com ([192.55.52.151]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q1r4U-00DxvR-0q for hostap@lists.infradead.org; Wed, 24 May 2023 16:10:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684944642; x=1716480642; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=2PPzDJJU4LW8PhX3rkDHe5I5IVQwoH9K9IN2382Xmmo=; b=j0q2NtYwItgMscJDlYuYqK6hTgrCPPhfaEF3YJ8Oc1FGB3ndfSMeQ4AQ +elcd/ervaN0AhrgiCoGCLiTd8HRDRkG2lvPxOGTeNKRzxsX4yo8BV2qj bGUiM/OUuD+YkuQoxTtJd2y1Bpue1F8mSsx90O43TIzrrFIuyRUaScTdc BRjluKRP5tzCibZvqevCzLzqF8xlAptRCc/gwlDY8TsSI84hWi4DI912s vUM1RT5q7lV4kc9E6g/e93HJ8w+JBGRlyk6WnSl6ACnEJCFjEkST+Aj22 cXU2vojDIYIWrW3av0D9hnUn8hTyNO/+yZMPsZsCIIjEDvPZ8xLT1EoNa A==; X-IronPort-AV: E=McAfee;i="6600,9927,10720"; a="333970526" X-IronPort-AV: E=Sophos;i="6.00,189,1681196400"; d="scan'208";a="333970526" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 May 2023 09:07:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10720"; a="774306545" X-IronPort-AV: E=Sophos;i="6.00,189,1681196400"; d="scan'208";a="774306545" Received: from ldovgoro-mobl.ger.corp.intel.com (HELO aotchere-desk.intel.com) ([10.254.149.85]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 May 2023 09:07:29 -0700 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: Daniel Gabay Subject: [PATCH] defs: Enclose all structs between the pragma's Date: Wed, 24 May 2023 19:07:04 +0300 Message-Id: <20230524160704.20197-1-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230524_091042_430499_D6877D9B X-CRM114-Status: GOOD ( 10.11 ) X-Spam-Score: -2.7 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Daniel Gabay Many of the STRUCT_PACKED structs are not within the pragma's resulting in wrong packing using MSVC. Fix it by moving pragma to EOF to ensure proper packing. Content analysis details: (-2.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [192.55.52.151 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Daniel Gabay Many of the STRUCT_PACKED structs are not within the pragma's resulting in wrong packing using MSVC. Fix it by moving pragma to EOF to ensure proper packing. Signed-off-by: Daniel Gabay --- src/common/ieee802_11_defs.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h index 12789227c4..895dd0ef85 100644 --- a/src/common/ieee802_11_defs.h +++ b/src/common/ieee802_11_defs.h @@ -1184,9 +1184,6 @@ struct ieee80211_ampe_ie { */ } STRUCT_PACKED; -#ifdef _MSC_VER -#pragma pack(pop) -#endif /* _MSC_VER */ #define ERP_INFO_NON_ERP_PRESENT BIT(0) #define ERP_INFO_USE_PROTECTION BIT(1) @@ -2856,4 +2853,8 @@ struct ieee80211_neighbor_ap_info { u8 data[0]; } STRUCT_PACKED; +#ifdef _MSC_VER +#pragma pack(pop) +#endif /* _MSC_VER */ + #endif /* IEEE802_11_DEFS_H */