From patchwork Sat Oct 15 15:24:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 2954 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp683854wrs; Sat, 15 Oct 2022 08:26:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4y8pQ986oYw6YiGC9QrNKwFdNYL19VPvWtgxJ+qyY12bhA99wVKqaWI0ofcaznVkf3wK5E X-Received: by 2002:a17:90a:a415:b0:20a:f813:83a3 with SMTP id y21-20020a17090aa41500b0020af81383a3mr4003210pjp.238.1665847578231; Sat, 15 Oct 2022 08:26:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665847578; cv=none; d=google.com; s=arc-20160816; b=ZRw96rYxNKJgyFknvl0E6fB/Eg6sm4+v72d1MwqbZ2Flu+qDBjHMmHXQ14Nt+hWT5O 4fnEe5MNJ1THYVZWwarHNpu9kxZRq7gTO1gLiRqrEfqJrRM3CECiQA/k7gOXbxIlP8+J iPiTQchzlvBmEU+s+DLTlK3Eno3qFKvp3iGmqLJXeWSAH9axTiIcFre8OfqwNwmNyeBy mB7lafemJGchAXeSbqiO8OJRraBBpREClmEVzP1gIKkWrttLI47eSDeKacCaPx2CirTo fB2D84jjDuEPV6JZKl8yGb7yVwmUuvyPq/TOUbwJDaMUuWs8fTAfW6Oox9cMiEOFaHCs QgTw== 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=rumPT1IMPmbW7LSJo1fyPgLXKZtCizJE++z5olHpC+U=; b=lD1FPzN0tNkmZU+Tb9YJLDjnGWMcoQyJ4maTSd7b42BtOXvS1zvjE1ADayk2l/V7wM iqT/0Ma9ueWl/hxvEhCadLtDsR7lEtQCwQSgFxnP25VlPW9gP1Y+B6ew0sT8NCQth2ng 4kqlPHXYPuSf2Hu39ewrTEILOsNtTaMcTI8Agxo1VYr96YoM7hMBVH137+iWKFvsg7m1 A5b4en612zG0mHbpE6C1thmARcXb5AdWz+n3FoOMzFguXhV2Yw5RKLEmukgNfiTmzoIV rbWogHUYAPCqNhkRoDTRVm2z012VjmvuQzrFA756c6nAyy9cJtPNYMNKAKINYP+FallE /Z8A== 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 bf11-20020a656d0b000000b0042ac5a24f3fsi6478013pgb.493.2022.10.15.08.26.02; Sat, 15 Oct 2022 08:26:18 -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 S229717AbiJOPZD (ORCPT + 99 others); Sat, 15 Oct 2022 11:25:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229673AbiJOPY6 (ORCPT ); Sat, 15 Oct 2022 11:24:58 -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 0B8BC27DD7 for ; Sat, 15 Oct 2022 08:24:55 -0700 (PDT) Received: from ipservice-092-217-066-135.092.217.pools.vodafone-ip.de ([92.217.66.135] 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 1ojj1w-000722-DE; Sat, 15 Oct 2022 17:24:52 +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 4/9] staging: r8188eu: use sa instead of Addr2 Date: Sat, 15 Oct 2022 17:24:35 +0200 Message-Id: <20221015152440.232281-5-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221015152440.232281-1-martin@kaiser.cx> References: <20221015152440.232281-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?1746767790084056247?= X-GMAIL-MSGID: =?utf-8?q?1746767790084056247?= For management frames, Addr2 is the Source Address (SA). Use sa from the mgmt structure and remove the GetAddr2Ptr call. GetAddr2Ptr is a driver-specific function that we should eventually remove. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index fd2daeca7112..732ada6ab932 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -1479,7 +1479,7 @@ unsigned int OnDeAuth(struct adapter *padapter, struct recv_frame *precv_frame) struct sta_info *psta; struct sta_priv *pstapriv = &padapter->stapriv; - psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe)); + psta = rtw_get_stainfo(pstapriv, mgmt->sa); if (psta) { u8 updated = 0;