Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp12393825rwb; Sat, 26 Nov 2022 08:21:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf7IxmMxAb/xqkv2va+Jpn744nswlt2MVYLK/RsNJ5LlLmIF78x+9K3onmBxYw0FHSKhhZ8a X-Received: by 2002:a17:906:541:b0:7b2:8431:6d75 with SMTP id k1-20020a170906054100b007b284316d75mr19007189eja.329.1669479673106; Sat, 26 Nov 2022 08:21:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669479673; cv=none; d=google.com; s=arc-20160816; b=aGvUaSleJFQyiWzvcYuLkhnOH/+qNazLtexMIg4IYS/Vo52zv3IsblOork+8Ik9xTO RZfks4iQdr/0536ecEPMQu1UnLiLo8E9XHRoCdUqq4aWQl6Brt6N1X98rk0+fPjj3sTy yUheMGRS5jT8MNdlO7Wjp9UkSrJmpBRhuPtp1P0huZQ3BxtLfB9PND599BZNVO6wkW4m LS7+c5dfrm7vSh3CGcqe9ZhbfzrwTB4J2x2aCCmbVrXVSsaX/ipHG3fFuy8MZAR4UqFe 5uJ8Znw9lGnjIiNC6hqFVtlP89+R2oQkESbHtR3t0mzTk6byjkIMb8C4dKsJqtIR9j5r L4/Q== 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=G3QpV+uZqky6opfOFJzM1Gt/LBPaaRVvsmp2AJpyE14=; b=ZJKQW4KPaER2xYEBpXAfGre9eAq4JX8L3RhAw4ugKoeXP36i7S1dWH5UM1QaX9WKIs A8zUozct0wxXQawAWKaMRxjoGcMnKo4nE7p4suk6oAZZeuYlKCBlM2TxywEF4RihW18g USzBqFv5sBQnL0dkV4KL2hHUXG4P6zRcBDIN40qvJgIVZ+TlYAKGfIq9Z9roR204tZUE ud/f/AoiPH/64oJIL8zDZLT2ncEYj/SV2pn//8RtWvSv4W0Z80ENMxHyxuQtiGdN+rfB 4Qx7/OOwQATCXeHnIM7ePb1ltBPutHcx/tzQviH6PmFwoUauCeHm1ObF3ZURpMBKT98H OTtA== 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 t13-20020a170906178d00b007adf3ed5d20si4145929eje.376.2022.11.26.08.20.48; Sat, 26 Nov 2022 08:21:13 -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 S229555AbiKZQBm (ORCPT + 84 others); Sat, 26 Nov 2022 11:01:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229453AbiKZQBl (ORCPT ); Sat, 26 Nov 2022 11:01:41 -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 2F604193DF for ; Sat, 26 Nov 2022 08:01:40 -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 1oyxcU-0000Ub-Q4; Sat, 26 Nov 2022 17:01:34 +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 01/10] staging: r8188eu: replace one GetAddr3Ptr call Date: Sat, 26 Nov 2022 17:01:20 +0100 Message-Id: <20221126160129.178697-2-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 Define a struct ieee80211_mgmt in the OnBeacon function. Use it to replace one GetAddr3Ptr call. This is a tiny step towards making GetAddr3Ptr obsolete. 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 93696892ec7d..80342b53a129 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -560,6 +560,7 @@ static void OnProbeRsp(struct adapter *padapter, struct recv_frame *precv_frame) static void OnBeacon(struct adapter *padapter, struct recv_frame *precv_frame) { + struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)precv_frame->rx_data; int cam_idx; struct sta_info *psta; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; @@ -576,7 +577,7 @@ static void OnBeacon(struct adapter *padapter, struct recv_frame *precv_frame) return; } - if (!memcmp(GetAddr3Ptr(pframe), get_my_bssid(&pmlmeinfo->network), ETH_ALEN)) { + if (!memcmp(mgmt->bssid, get_my_bssid(&pmlmeinfo->network), ETH_ALEN)) { if (pmlmeinfo->state & WIFI_FW_AUTH_NULL) { /* we should update current network before auth, or some IE is wrong */ pbss = kmalloc(sizeof(struct wlan_bssid_ex), GFP_ATOMIC); -- 2.30.2