Received: by 2002:a05:6358:795:b0:dc:4c66:fc3e with SMTP id n21csp2063207rwj; Sun, 30 Oct 2022 10:36:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6yO1CuCV2E512idwIqFGWCT6NLq7h3vxVulDn6fp3wPJJ25BGi5+Q2cDqQ53mjVuaKtKiN X-Received: by 2002:a17:906:5d11:b0:7ad:4a55:a3fe with SMTP id g17-20020a1709065d1100b007ad4a55a3femr9504772ejt.185.1667151367464; Sun, 30 Oct 2022 10:36:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667151367; cv=none; d=google.com; s=arc-20160816; b=0FBn6C2HvGFT1vf5bsOXQL/RxZkt/n+yV2ZBt0lTbm9o/IJzrtS6LVISsFAy018EfY gLHNAOhzSkulE7s90gL7cGUuQH16zQh31SIE+qI5GZqbrN51PTLdzwJjCLT+b8TtQ6oy gYz0SffXE7k+dGbuyfVYuZHvVt5QtJuRrqx72O2YiIozggmGBQDG6ozxMrh+ZVN0JjiM RERpU3ODuneRKKL05dGoxJSIb+GJbuRkgAsF+EwwCCtHiffEYBOqp7YWPM7PFL07e1hm IYCW6xMQvbF1xcbPE+INx1QNYrLbUGriLIGhXm8Z2Dc5urPYW1wXhHNC1NqbJLfK/LR0 z6Sg== 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=+4nFpzvycB+rWza2dr2Uynel0dTJ66Cwt69EkBFU7MY=; b=iyfTCwC0O0EyCCMzKsmJBEPJ74iVotNl2jjXLxKwaDR6/mSkwCufAvwB8v32jbyzvp 8WpEqrMjV1P9aI75G+Rp/mfmoPRDWBkznZ4bbGfnSf2MN+gzNB4XURYJRHs2nXmikBnO +pH7FFmAdq3WVfmtCLSXS/aYjY72cawo5Bj6uFfpH+cWNrWHRs2khIAgnKv80+KASVSo L8xmmk/AaXKsY3fUyOxEh1FG5l1WceAoeUwigtjXWvvERXbKVFuYZwzeKEFqOG+O1oWR k9Oj2P9uI+e8qlaYsxc0F+6X8r4Uz/GddanSO1qp498oRJal2ZABJoeuwN7VQ7yZR4ZU DCGQ== 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 s4-20020a17090699c400b007a8dddc7ec8si5012423ejn.382.2022.10.30.10.35.42; Sun, 30 Oct 2022 10:36:07 -0700 (PDT) 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 S229822AbiJ3Rdv (ORCPT + 99 others); Sun, 30 Oct 2022 13:33:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229494AbiJ3Rdu (ORCPT ); Sun, 30 Oct 2022 13:33:50 -0400 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 3165595B4 for ; Sun, 30 Oct 2022 10:33:46 -0700 (PDT) Received: from ipservice-092-217-067-184.092.217.pools.vodafone-ip.de ([92.217.67.184] 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 1opCBp-000469-NY; Sun, 30 Oct 2022 18:33:41 +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 v2 01/13] staging: r8188eu: replace a GetAddr1Ptr call Date: Sun, 30 Oct 2022 18:33:14 +0100 Message-Id: <20221030173326.1588647-2-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221030173326.1588647-1-martin@kaiser.cx> References: <20221030173326.1588647-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 Define a struct ieee80211_mgmt and use it to read the destination address. This replaces one call to the driver-specific GetAddr1Ptr function, which should eventually be removed. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index 127dbc4e8b9a..5a366688a3f7 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -3815,13 +3815,14 @@ static unsigned int on_action_public_default(struct recv_frame *precv_frame) unsigned int on_action_public(struct adapter *padapter, struct recv_frame *precv_frame) { + struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)precv_frame->rx_data; unsigned int ret = _FAIL; u8 *pframe = precv_frame->rx_data; u8 *frame_body = pframe + sizeof(struct ieee80211_hdr_3addr); u8 category, action; /* check RA matches or not */ - if (memcmp(myid(&padapter->eeprompriv), GetAddr1Ptr(pframe), ETH_ALEN)) + if (memcmp(myid(&padapter->eeprompriv), mgmt->da, ETH_ALEN)) goto exit; category = frame_body[0]; -- 2.30.2