From patchwork Sat Oct 15 15:24:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 2960 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp684362wrs; Sat, 15 Oct 2022 08:27:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7OKo1Hoad9hrFzM65RHrKdqlDMDWFb8yd+8ob6wmdQ7Y9lMDyoLuhoecMnG6k6afVLBzuL X-Received: by 2002:a17:90a:ea95:b0:20a:f65b:143b with SMTP id h21-20020a17090aea9500b0020af65b143bmr4016903pjz.230.1665847659390; Sat, 15 Oct 2022 08:27:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665847659; cv=none; d=google.com; s=arc-20160816; b=b8OeRFcmAw511UmLmEE60oPiuF03W703Bo0C2/WBU5KXQIqCL9mT+19F59yaWyrhNa JGBJCYoIHPR1Hw+2q2TI5iaPEW9o8s/+UjkGnsQLJW3BCG2jpVn289LYPhP5C8HRmZ1A AujzNxxuMAVtOjIQSIk3VTc0m+jZIEgKZb3Us8SucC1wMCmphCGkPk3f/52D2vXdqT8n /yRF126Z2jNxgmZzAZsqaQLajbPz/e5nCpEuHKe83yprOY/Fo1e6lBh+ja4S6AmAarzs 4NQIIkPi/aflrIOsooNnknHSKFQvUfgVPf4dS9KZE+zCODNHtpZqDu0BKA4iPrmpUa01 j0Bw== 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=zmrwNOjCRKEAB8w0yOrogGbJ542RwKPjsqdHZVDfmnE=; b=NhUrvWCW1jyzVfKH17jW6Ks6RgPM+o22tgOjml1Umf7A0UE9MnaiMDOZdwWtfVbdm3 2SkVBwBhCWrO7UxUsdYABI1aU9XftzRrQQ/Pddg0Nn2nWLb0ImvFCtKn1yrswYE4DEiz KAvYVV/FsjTk4j55TT7nh8VIt+AyZEsc3r5dwywdsKCZGeL4dI27tVEN3E1nohGbyYa3 dOCatuTIcR7MNhbxk4x/XmcnOAPYVakzZnP7MfT6k8TkvYV2T6homog+LdsGafOz/rjq Ez2eQT4aWYeINhHqbDhUrAiJMGfe5CHLE/VU/2gfbSiaTmgOnEewRCehhUFmBpHb8FYH xAOw== 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 l4-20020a63ba44000000b0044ed36e5a29si6406678pgu.715.2022.10.15.08.27.26; Sat, 15 Oct 2022 08:27:39 -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 S229894AbiJOPZY (ORCPT + 99 others); Sat, 15 Oct 2022 11:25:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229751AbiJOPZN (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 574E5175B8 for ; Sat, 15 Oct 2022 08:25:00 -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 1ojj1z-000722-Cb; Sat, 15 Oct 2022 17:24:55 +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 8/9] staging: r8188eu: summarize two flags checks Date: Sat, 15 Oct 2022 17:24:39 +0200 Message-Id: <20221015152440.232281-9-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?1746767875082105362?= X-GMAIL-MSGID: =?utf-8?q?1746767875082105362?= Summarize the two statements to check if either WIFI_FW_AUTH_STATE or WIFI_FW_ASSOC_STATE is set. 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 465f51bce0e3..09ffecc5b2b3 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -1500,8 +1500,7 @@ unsigned int OnDeAuth(struct adapter *padapter, struct recv_frame *precv_frame) * However, the Win8.1 with BRCM Wi-Fi will send the deauth with reason code 6 to us after receieving our deauth. * Added the following code to avoid this case. */ - if ((pmlmeinfo->state & WIFI_FW_AUTH_STATE) || - (pmlmeinfo->state & WIFI_FW_ASSOC_STATE)) { + if (pmlmeinfo->state & (WIFI_FW_AUTH_STATE | WIFI_FW_ASSOC_STATE)) { if (reason == WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA) { ignore_received_deauth = 1; } else if (reason == WLAN_REASON_PREV_AUTH_NOT_VALID) {