From patchwork Sat Nov 26 16:01:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 26264 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp4707559wrr; Sat, 26 Nov 2022 08:03:43 -0800 (PST) X-Google-Smtp-Source: AA0mqf4AvzReZ0gfxWPn8bJ7WEx3/wcYKbQkR/SS+1s82eCewIEdlMbKHvtVRMSCw4Fs1WWeiacw X-Received: by 2002:a17:902:c792:b0:17e:802b:fd6e with SMTP id w18-20020a170902c79200b0017e802bfd6emr24293298pla.116.1669478623556; Sat, 26 Nov 2022 08:03:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669478623; cv=none; d=google.com; s=arc-20160816; b=sdOCoktnxv8NuqiiHxp+6JiRUzV08MK96bKM8cTDyNcF8cRsfef9vYErggP8b/WVQu q8eHWKMEKHRaqHw9VKNKPeMoE7oKq+1tDTJESa6+4NMdnVGUcHccfEsb7w+iQboTjbA5 JEVIczZuNwm0gvVGeliYzJ9Sp2FTqvuwO6M8qQo8dwdV6C2bV5jCcJIHmnncBWequPjN OPKGvT1mQqTn8iSfrxngmn3BnvKbzkveBNPqDXZD/nQ9Rupg912X1xtK9a02ryf86mqJ Ds8TdPTZINB5Qor7j9WJx51eyTw/jhPJhDeTcesKQbZWNyRESy4+USnvt8VkRejubMJT Mv0Q== 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=mLSzw4tE/eHq4K/DRroyFHvcdMnttCFInfmRZy1f+wQ=; b=zcs4W3b3hm1Y71s3UkY52/GYQeYXVsCzvf/uWsL9m4HvdWX8m2HmOWx8Hc/vZGrFb9 leYtNqqJPi22F1IgZsp4Z62kfnzqutJAOol6jXIYfvEJijyEGCX8opBURwC0lK+R1S3i 9NeI8iDW4wLvWxnxBM2O4AJRe9lJ99cMOx9AHexHLG3Nh2swu4NvGq4v2qF7K4KfFqgi 4ZEWuKAQJrSpBPCMpf0ByV+lOb0mijIHUC9+5MNnd2KsX+rszMIR74PPJuPYd4idZGNL AUK89832zukXzziztXSl/2g3LKZtvOgE4ZADX2cvqtwzHzJEyrqUZwbGrPYdouCOJUoq y38A== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e128-20020a636986000000b00476e62744a8si7127939pgc.388.2022.11.26.08.03.29; Sat, 26 Nov 2022 08:03: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 S229732AbiKZQB4 (ORCPT + 99 others); Sat, 26 Nov 2022 11:01:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229586AbiKZQBm (ORCPT ); Sat, 26 Nov 2022 11:01:42 -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 605ED193E0 for ; Sat, 26 Nov 2022 08:01:42 -0800 (PST) Received: from dslb-188-096-151-149.188.096.pools.vodafone-ip.de ([188.96.151.149] 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 1oyxcW-0000Ub-D3; Sat, 26 Nov 2022 17:01:36 +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 03/10] staging: r8188eu: replace GetAddr2Ptr calls Date: Sat, 26 Nov 2022 17:01:22 +0100 Message-Id: <20221126160129.178697-4-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221126160129.178697-1-martin@kaiser.cx> References: <20221126160129.178697-1-martin@kaiser.cx> MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750575217367329697?= X-GMAIL-MSGID: =?utf-8?q?1750575217367329697?= Get the source address of a beacon frame from our struct ieee80211_mgmt instead of using the driver's internal GetAddr2Ptr helper. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index 66e3a90da3a3..5a31b20dc46d 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -586,7 +586,7 @@ static void OnBeacon(struct adapter *padapter, struct recv_frame *precv_frame) } if (((pmlmeinfo->state & 0x03) == WIFI_FW_STATION_STATE) && (pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS)) { - psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe)); + psta = rtw_get_stainfo(pstapriv, mgmt->sa); if (psta) { ret = rtw_check_bcn_info(padapter, pframe, len); if (!ret) { @@ -601,7 +601,7 @@ static void OnBeacon(struct adapter *padapter, struct recv_frame *precv_frame) process_p2p_ps_ie(padapter, (pframe + WLAN_HDR_A3_LEN), (len - WLAN_HDR_A3_LEN)); } } else if ((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE) { - psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe)); + psta = rtw_get_stainfo(pstapriv, mgmt->sa); if (psta) { /* update WMM, ERP in the beacon */ /* todo: the timer is used instead of the number of the beacon received */ @@ -621,8 +621,7 @@ static void OnBeacon(struct adapter *padapter, struct recv_frame *precv_frame) pmlmeext->TSFValue = le64_to_cpu(mgmt->u.beacon.timestamp); - /* report sta add event */ - report_add_sta_event(padapter, GetAddr2Ptr(pframe), cam_idx); + report_add_sta_event(padapter, mgmt->sa, cam_idx); } } }