From patchwork Sat Oct 15 15:24:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 2963 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp684545wrs; Sat, 15 Oct 2022 08:28:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM73uwEY2lWA5K3S/dscIRrma9dbkpVPSk0BEGXpuFG2tZonHUZ4fEc+R2n0S35AGq7sM+/Y X-Received: by 2002:a17:90b:128d:b0:20a:da54:788 with SMTP id fw13-20020a17090b128d00b0020ada540788mr4016484pjb.65.1665847693925; Sat, 15 Oct 2022 08:28:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665847693; cv=none; d=google.com; s=arc-20160816; b=UrtvTlFR3Iewgwfn0kjugO0NlLW8Kb5asYLOUy9H7LtDc8e5QzWeaCICDiK+a6Hhc4 +Cg4T0d3D2E/+LyHlJ/mG7GLDTWzNgz79uy8Jdhp8RYHVhhpiCJO5nkC04tNJD5YOtho LWrVJZmKvoJxlwfSx9SYaT8ILetwi9Mhcm9fNWk1QVSaVxkrEeAOKaSOh9SMi93zKft+ 7Y6cTDqIz+OgttCg/MFRco18yFgbzVtnc/I7gTEHTkb91L/A+Dy4xIZ2QIGV6JJmCfyV 91aFO5qI7N5pzywVtoDIR5xdC2IvAzM3EztqIZ0wyJMtVeQ4UAwdzXPn28sEHUYnVZWD uP1A== 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=BITPpihr0bzemqLpJHDbddmz7hAzCG2dbCkDYLAzYHc=; b=XqVVBWVMcxHLYkkOrO3bgZjN+SUbBYoGcvf0pHIraf2CgnFKddyFq3RclEV7qvkHHn 1R4WaTzqSY4TX2vSP1Y/Yylpx1VeR1Wn6FWAwKV3m9NSQt3IhdsnjLRaYHFfNRnqHAZr +RS5c73sjesfqnmUsSZX0ukESFt9TJjek7XFpwP33d+/qddi/Y3YE1PkDc0UjbhZdUw0 d/XAl4qzNiGX3Nm1ES23MOXFHvKussdBeYQA7TFVSww2J4YIyg1TGfg58MIEwuIxvD+w z45gfHP4rZmVQMOuX5b549Dgr6ZbQav/LZUyGW31fTyY+lbBxv5kcMcsubGGBoBppE+M wk2g== 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 c13-20020a170902b68d00b0018040bdb798si6138635pls.242.2022.10.15.08.28.02; Sat, 15 Oct 2022 08:28:13 -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 S229902AbiJOPZ3 (ORCPT + 99 others); Sat, 15 Oct 2022 11:25:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229849AbiJOPZN (ORCPT ); Sat, 15 Oct 2022 11:25:13 -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 564EF186C9 for ; Sat, 15 Oct 2022 08:24:57 -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 1ojj1x-000722-5T; Sat, 15 Oct 2022 17:24:53 +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 5/9] staging: r8188eu: get bssid from mgmt struct Date: Sat, 15 Oct 2022 17:24:36 +0200 Message-Id: <20221015152440.232281-6-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?1746767911836607767?= X-GMAIL-MSGID: =?utf-8?q?1746767911836607767?= For management frames, Addr3 is the BSSID. Read it from the mgmt structure instead of calling GetAddr3Ptr. The pframe variable is now unused and can be removed. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index 732ada6ab932..742976c38cd5 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -1462,7 +1462,6 @@ unsigned int OnDeAuth(struct adapter *padapter, struct recv_frame *precv_frame) struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; - u8 *pframe = precv_frame->rx_data; struct wifidirect_info *pwdinfo = &padapter->wdinfo; if (memcmp(mgmt->bssid, get_my_bssid(&pmlmeinfo->network), ETH_ALEN)) @@ -1514,7 +1513,7 @@ unsigned int OnDeAuth(struct adapter *padapter, struct recv_frame *precv_frame) } if (!ignore_received_deauth) - receive_disconnect(padapter, GetAddr3Ptr(pframe), reason); + receive_disconnect(padapter, mgmt->bssid, reason); pmlmepriv->LinkDetectInfo.bBusyTraffic = false; }