Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2221531rwi; Sat, 15 Oct 2022 09:49:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5CUTNiOc4uY4rOD/e1d722dt26DcWc6T3dlp9DE2mKOItHVw74FcvRWPcOrtFa1tt2FWMv X-Received: by 2002:a05:6402:2706:b0:459:788a:355b with SMTP id y6-20020a056402270600b00459788a355bmr2920632edd.315.1665852569031; Sat, 15 Oct 2022 09:49:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665852569; cv=none; d=google.com; s=arc-20160816; b=j6G+WnT+ojobMDzidaSSBtPTI4RRiQqBd/N2x28/TsRI4WRxOhgAyt3uFK4T6E1HXT dXwkHogcTusKdC2bZOzBRLMEx+jaUXIoGD+ZJKG7Un24I7KLexvlSpD3XNdJ3btFksDt 8ch4+frEPgQrIYIJLYv08x7OyBkOaF78x+Qt5GkjnJJzq+O4Z+3/WpoaFp+bVb8OKPuO BmvIUcUrIwSU1gS3NKzoCmAAaTiQXXRC8i9FeNZ/bqagclSth40Oz8rsMTZ9xhFopWsh hEYP9cGs+cAcv9MZ1V5laGZGxszbYHfaqeQX63C9oIPFCya29quoSmdninE/kIpdML5C kK0A== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oz39-20020a1709077da700b0073d581b0906si5993477ejc.278.2022.10.15.09.49.01; Sat, 15 Oct 2022 09:49:28 -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 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 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) { -- 2.30.2