From nobody Tue Apr 7 12:53:57 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A855C4332F for ; Sat, 15 Oct 2022 15:25:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229832AbiJOPZM (ORCPT ); Sat, 15 Oct 2022 11:25:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229751AbiJOPZF (ORCPT ); Sat, 15 Oct 2022 11:25:05 -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 22B4815A04 for ; Sat, 15 Oct 2022 08:24:56 -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 1ojj1u-000722-Rn; Sat, 15 Oct 2022 17:24:50 +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 2/9] staging: r8188eu: get reason code from mgmt struct Date: Sat, 15 Oct 2022 17:24:33 +0200 Message-Id: <20221015152440.232281-3-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 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Read the deauth reson code from the newly added mgmt structure instead of calculating the offset ourselves. 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 0c4b3b99150d..5c59fc91ecae 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -1473,7 +1473,7 @@ unsigned int OnDeAuth(struct adapter *padapter, struc= t recv_frame *precv_frame) _set_timer(&pwdinfo->reset_ch_sitesurvey, 10); } =20 - reason =3D le16_to_cpu(*(__le16 *)(pframe + WLAN_HDR_A3_LEN)); + reason =3D le16_to_cpu(mgmt->u.disassoc.reason_code); =20 if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) { struct sta_info *psta; --=20 2.30.2