Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp12396768rwb; Sat, 26 Nov 2022 08:24:08 -0800 (PST) X-Google-Smtp-Source: AA0mqf7t6LdcKZTc+RmKZHA9uBFFzEBKj4MoALCP0+OJ23ALkfbbd9WwtCMgCgu7Ei2SA6WurAka X-Received: by 2002:a17:906:aac8:b0:7ae:df97:a033 with SMTP id kt8-20020a170906aac800b007aedf97a033mr20696423ejb.344.1669479848420; Sat, 26 Nov 2022 08:24:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669479848; cv=none; d=google.com; s=arc-20160816; b=YahVR5I+X/6Dy+y8b4oCf3mG+mB+wUu1E1J/LC1wrXi/H3S5X+L2hrH9QaQxwK0JrY zaNINMDz0C9YZlyBf0G1PvqQg/X8GZa1wGUceExJ6GBxCdskZDHNPSiTXAHgG37V4RSB 1hpTfAaYVSSy/odQzlhjJGJphpTWEeM4fGUBV6js9ufrahmJBMmv4/6EKGWOhk+YBdB/ Z7k+KuycbNmhAombfBHa+H85C46fODNWDGUWK79NHfuIGdIPeh1gcCUVC1waxL4/QqNl gg2Zc4G6o+1u0WM0txW4IKzOgSprHe8+dXiEdLMSW7rma6+GPIbk+h+9NTV0UFNA8glB F8AA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa7-20020a170907868700b007bb92113ca1si7325414ejc.67.2022.11.26.08.23.47; Sat, 26 Nov 2022 08:24:08 -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 + 84 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 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 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); } } } -- 2.30.2