From patchwork Sat Nov 26 16:01:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 26262 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp4707363wrr; Sat, 26 Nov 2022 08:03:25 -0800 (PST) X-Google-Smtp-Source: AA0mqf6nd/XgSpVKpIf5vhG40HNJHcvqKxAh+41OVjBz6UXwEE6asxRf93JwZnQCEDk5MREJMlbN X-Received: by 2002:a05:6a00:290f:b0:56b:e15a:7215 with SMTP id cg15-20020a056a00290f00b0056be15a7215mr24074076pfb.27.1669478605257; Sat, 26 Nov 2022 08:03:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669478605; cv=none; d=google.com; s=arc-20160816; b=zsmAYr1Nid4ltcYD3ejDRHTWRnXF9FEiCVOeydI2f6tjtCw3uUPMrdkJNSEcbJpI+b zUB93Ldg4W12jN0zdkszD7sBnpsziQ2UpB8FWDdNVBIaovLY8BKFzUi67skcjxxq/jLo cPAja+wvA1Tv36MZQUPQ2vFFmjCZT8so9yk3ZR5LAryNBB7hkDX2MR9Kv9vWCyIHmA+l V1N6ZbyQ5SsaicE1HCFT5ryhCeWLjt+B+IkeeGfACIHv1EOEJFDJGF0WI1h+4JheOIET 6CLFWtBohUX8Fby1RNQkv+f64lfhdcG3RscjU1hBgftT8LiqQxDQ/81zNmJREfnqo+YF zHag== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u11-20020a170902b28b00b00174de06d92csi6542282plr.74.2022.11.26.08.03.11; Sat, 26 Nov 2022 08:03:25 -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 + 99 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 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?1750575197753457849?= X-GMAIL-MSGID: =?utf-8?q?1750575197753457849?= 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);