Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7584232rwl; Fri, 30 Dec 2022 10:36:44 -0800 (PST) X-Google-Smtp-Source: AMrXdXtVzLbjXOJsT60XJsw5Fe4+QPWapYnV7pZd7Ox0QJJ+npzib3/Be39P9WoMRcW13oT0qRw6 X-Received: by 2002:a17:903:32cc:b0:189:129e:92af with SMTP id i12-20020a17090332cc00b00189129e92afmr50090078plr.14.1672425403821; Fri, 30 Dec 2022 10:36:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672425403; cv=none; d=google.com; s=arc-20160816; b=XTY1sy35MOx+FaS1BdWs9uplXskET6YjMNtRar5S55eZogQJBykrtKP+ruDuc/XRXR rXd1tm0vid6Fp2oeoJsulBYhUFtD6R0jxOHdB9J500nOKbhxZVRAmM4r2tErGL415UO2 dsuj2cPBQ4fXR52OHM2V2lZFS34Zt2KtvEBqbXkR2xxf3hTRqrAceOBvFQ/dJw6nTeN9 PopUJa8I6co+LEr2BwPshJg68XNrq0cBYjZIU5ECJg+5o3SeN+fuxOdZpN6/GXHl32cn WOM6yvtwh3yDVo2XdR8GWj2iIM/vwqR+JxepKwwr1AO8PqLTNefgsv1cq9D4e49fULrt 6w/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=LYdEmGJv0lxWfkAx1zB5deNY7o1DdSOweCd+DCAayc8=; b=hAF9+URG2l8bzr7m5YOliDdqaYB1iM8CphbAy+kRzzDedW65DW72xvsIUUNrDGTTd/ /2I/tSGhiGTSE5nhRChnxKAn1hO37TRWd4XXXsRjidwkRQb6Gk+xScOZFZQXkOiUGv/k /enVFUDCz9lnB6iQn9e1ylytLYKHv+dzEMOzNnaeDle/nhMfXJsWA3DM/Lu/miFJMSHZ puwKEQQroj3YIjraKHunQqZG7Hly61WOA07FA16CmyxT0TIJjPskc9R4fzxEz2iRwRNs T/8KjwCvV/ODMgpeGGjlApGhdxKENqm/MQQ+KJ92N8cVi9sYnyoddg0ZBR0HYC4FRRdI 39XQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i9-20020a17090332c900b00186b1459953si23866031plr.382.2022.12.30.10.36.35; Fri, 30 Dec 2022 10:36:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235397AbiL3RyJ (ORCPT + 63 others); Fri, 30 Dec 2022 12:54:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229530AbiL3Rx7 (ORCPT ); Fri, 30 Dec 2022 12:53:59 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FFEAF1C for ; Fri, 30 Dec 2022 09:53:58 -0800 (PST) Received: from dslb-188-097-208-179.188.097.pools.vodafone-ip.de ([188.97.208.179] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pBJZp-0004hN-0t; Fri, 30 Dec 2022 18:53:53 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 3/4] staging: r8188eu: remove intermediate pframe pointer Date: Fri, 30 Dec 2022 18:53:25 +0100 Message-Id: <20221230175326.90617-4-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221230175326.90617-1-martin@kaiser.cx> References: <20221230175326.90617-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The pframe pointer in on_action_public is used only in the definition of frame_body, which points to the payload of an incoming action frame. We can use mgmt to locate the action payload and remove the pframe pointer. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index 0b2f5d6c1279..310e60c4b639 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -3738,8 +3738,7 @@ static unsigned int on_action_public_p2p(struct recv_frame *precv_frame) static void on_action_public(struct adapter *padapter, struct recv_frame *precv_frame) { struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)precv_frame->rx_data; - u8 *pframe = precv_frame->rx_data; - u8 *frame_body = pframe + sizeof(struct ieee80211_hdr_3addr); + u8 *frame_body = (u8 *)&mgmt->u; u8 token; /* All members of the action enum start with action_code. */ -- 2.30.2