Received: by 2002:a05:6358:795:b0:dc:4c66:fc3e with SMTP id n21csp764654rwj; Sat, 29 Oct 2022 10:25:21 -0700 (PDT) X-Google-Smtp-Source: AMsMyM77e3JPHYII5hkcJdr0BsIu3SsMrRDxMLCc3UApk0X3oh2mJ7A9fV/ySOpCCcm/QLMcg16m X-Received: by 2002:a17:90b:4f4d:b0:20d:2225:4275 with SMTP id pj13-20020a17090b4f4d00b0020d22254275mr5759676pjb.191.1667064321258; Sat, 29 Oct 2022 10:25:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667064321; cv=none; d=google.com; s=arc-20160816; b=QafFc4I9pof9ZgpbaEX6gAUhRsSzhyL6ecF6eyDf8gSjdb5BxnHYU1N6VX3GLVtnTs zIgnckKPoUGsR/Nv/5IizvK25UMTZ8zFU4p6MkPhyYTPppxrFUlAEs9VfZCIqsD40+1H lR0dhgQFb+nfDeaxLmeOBfX/9MItbHPvQf5azkICohCFEyivi5jo+1IYX5s3wOXwfYVV bHsOOnp3wgscgAVr9XO13Ml9k4A04KHgPcHArlxK7+zyFh0F3qH3CfJTFlAGbUDK0Pan tHlfKAaLBKDARa9hBjAROduuvcw5z3OKi944VmwmX5rvLrAxQwWAdZgTwjYO8Y9lPYFZ eXSw== 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=xGkbsYIGdf1bX1Xk2rKt73iY72Ic2c2JIuLKhOGR4RaCGTPKFi8DxR8kkfTHFDX/LL lZOwqJIT5UipGQb/dB4wU+DDkPQNQnFiIzvgLZKQvDfI5J88f29s6p+510nvvWP+PjX8 8iNd99S/GhKTRSz8QclddOKTKgeBK05MNFkKtet7m8taeGhsMoa1OXJCu5gpStzwdVM+ vhzzLcxg7BC5Af9J4wss1XI81BJcDDO0MdFBQAB1boo0Ft4ZzHfptUxGRumMiRK7DkZM kfuOnz17gr1cRqeOIPIhc/B9yjA8RWQkAjfhtyxqlldSf61+QuPsoPDvuXJdIndCOJbp NlfA== 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 b23-20020a170902b61700b00186a2d376afsi2426009pls.273.2022.10.29.10.25.09; Sat, 29 Oct 2022 10:25:21 -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 S229744AbiJ2RYA (ORCPT + 99 others); Sat, 29 Oct 2022 13:24:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229727AbiJ2RX7 (ORCPT ); Sat, 29 Oct 2022 13:23:59 -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 947F5402E5 for ; Sat, 29 Oct 2022 10:23:57 -0700 (PDT) Received: from dslb-188-097-213-253.188.097.pools.vodafone-ip.de ([188.97.213.253] 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 1oopYn-00074v-S8; Sat, 29 Oct 2022 19:23:53 +0200 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 01/13] staging: r8188eu: replace a GetAddr1Ptr call Date: Sat, 29 Oct 2022 19:23:25 +0200 Message-Id: <20221029172337.1574593-2-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221029172337.1574593-1-martin@kaiser.cx> References: <20221029172337.1574593-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