Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2156864rwi; Sat, 15 Oct 2022 08:49:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4n6aAWwYrSfTDVhCDvvjkNPEU7oFdOPqcPLS3gHJlkRztd0h+07Vit5jVcsDFykljxKjps X-Received: by 2002:a17:90a:3841:b0:20b:650:60d1 with SMTP id l1-20020a17090a384100b0020b065060d1mr3973107pjf.102.1665848959622; Sat, 15 Oct 2022 08:49:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665848959; cv=none; d=google.com; s=arc-20160816; b=gzxCIh8EVMgwoPEwyZ3hi1f/i77ZdJcf/24Rs0LMezFB8Rk0QZfJxxSyzI5HXWn742 OQLFnFpQ4uNtzyRwiCu2f+2S4qg4iHR2O0k0HSuqGvFVxZPbBo123BqNdRqI9l64k5u9 jcjgu2zw3QGGCRhqm9HfuGJXL7ijuVHGW5r0wdZ0r9qvxK72c+0aQZsAwGcnwXNjRGY/ M6JjwcGm79Bh5C5b5gI+/vRUNCnR5hS0xNk+ECyIk7nIl8Eil+xf5tOfjZNRWaBGdH8+ QzTPDkPLo7R0b4xA0eYIRghty/Hq4qRdu1pJ+N+5n38mRk31j0yd/eZkCqGdlhRp9xDj 8byQ== 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=+O9tsDWkpMlvziEol7v6+/ak83cH1zkQGI5zBJ6WhZc=; b=x/lbZoe2zedmfcvlI8cp4xkAGn6+78rE+Esfq8eIwOx7nqPFex9eW2b9/DH6EF3Sc8 0V5IrzFgY6ME6ueiC3f9G+Uch8BzKeXt/yrfKe0AglZAcye/0cQLJ5R/OYqJa9R1l6KM VRAHbGwNxnZvIEeQ9RhuZKGp1C0a0YVssqNrpqhVebCCweIN0CQW6cy8j908wr1h9k93 KxzUmz3f0pk0uyn+skSs/ESnZe7kpA6Hc3HwgrID1Z7FB88fl9fA2GQsLJW1k+0LZm4U H3ll5+VWVx1tNUAz2JsN/AojXAtpVhHGOLKx8iTW7f5yZ5zskBa0kDbrIIweh3CIVjKI s8QQ== 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 k12-20020a6568cc000000b0041b577f3356si6231836pgt.720.2022.10.15.08.49.06; Sat, 15 Oct 2022 08:49:19 -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 S229827AbiJOPZK (ORCPT + 99 others); Sat, 15 Oct 2022 11:25:10 -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: 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 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, struct recv_frame *precv_frame) _set_timer(&pwdinfo->reset_ch_sitesurvey, 10); } - reason = le16_to_cpu(*(__le16 *)(pframe + WLAN_HDR_A3_LEN)); + reason = le16_to_cpu(mgmt->u.disassoc.reason_code); if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) { struct sta_info *psta; -- 2.30.2