From patchwork Sat Oct 15 15:24:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 2961 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp684461wrs; Sat, 15 Oct 2022 08:27:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7Ni6WzaWPtQ2yS2VpJTE/UtRwQO8/g0asUrmkSZRz1yqz32mcLjFTobtDtx0E4p48vCKZ1 X-Received: by 2002:aa7:810a:0:b0:55b:674d:d123 with SMTP id b10-20020aa7810a000000b0055b674dd123mr3616992pfi.52.1665847677811; Sat, 15 Oct 2022 08:27:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665847677; cv=none; d=google.com; s=arc-20160816; b=X38wc2sMbcN9mos/igHehpDOd6qyJitDfJTQuNcPSEdsSjEsngQSM/LI51VB/4wEnm Y77nuF7DLa2+pDeK4vaIV8DjJc+EBV0GTM+PODmST44jeiKEeVj1JJx5BqwWpsQot0ZK fY8VGBcloM0Jp+Y6gbn3gjt2Kz+d9Tv8g2fRsT87IVcsXT+9QLnMO8zoHGkZxnQBHFUx wC2/GxWMkQ9H7C/6VYfivpYmnIE5tzmFx8A/Buz3HH6gg2XILmRNd01vDevqZu8jGe7X SWkzwlhwdK/tkB6jyn4REFa5MGBoC0nTVFxaLutPxm61/uwDrvGVLX5/5Y8U1jM6g+y9 n2Eg== 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=yqp9dmkl7qd/HaymImbEEaUL250kdLg+h2qGxfwLXMo=; b=Wv1pSWWCZusFf0d52D7tqdVeA8l1slKL+cp5JlpT1Sh/t5Z4b6KPEVgbOItIeWnb2m vlzhCnei4IMGsHOi9kidvg7JpyRP1/jIFEa/CBFbeD2uqvXc+hAzBURDIfBsCHfjogag ohZrWBgB5Rsqff2iJFy7IpKU8mPJI+rivBEI4X9FvCIFCJ004bhmfiQhE0FEPHb7QZL4 lY7bStBHQdKXK9pXPGIfzvrThH39oKUb7k4hPl8E92C7GbRUwEqhxKJdthQ3b7Kxojby sXeaD8W9DTVUr6XeqaFjO55n8v9brYp03/PfSLNb2r1sIWSwFxMmwPUO1DMObzC+HxsX Qxtg== 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 131-20020a621789000000b00561a2341e81si5220123pfx.125.2022.10.15.08.27.45; Sat, 15 Oct 2022 08:27:57 -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 S229939AbiJOPZj (ORCPT + 99 others); Sat, 15 Oct 2022 11:25:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229845AbiJOPZX (ORCPT ); Sat, 15 Oct 2022 11:25:23 -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 5701D1AF38 for ; Sat, 15 Oct 2022 08:24:59 -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 1ojj20-000722-7k; Sat, 15 Oct 2022 17:24:56 +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 9/9] staging: r8188eu: ignore_received_deauth is a boolean Date: Sat, 15 Oct 2022 17:24:40 +0200 Message-Id: <20221015152440.232281-10-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?1746767894625694816?= X-GMAIL-MSGID: =?utf-8?q?1746767894625694816?= The ignore_received_deauth is in fact a boolean variable. Change its type to bool and use true, false for its values. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index 09ffecc5b2b3..fda446b6779c 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -1493,7 +1493,7 @@ unsigned int OnDeAuth(struct adapter *padapter, struct recv_frame *precv_frame) associated_clients_update(padapter, updated); } else { - int ignore_received_deauth = 0; + bool ignore_received_deauth = false; /* Before sending the auth frame to start the STA/GC mode connection with AP/GO, * we will send the deauth first. @@ -1502,10 +1502,10 @@ unsigned int OnDeAuth(struct adapter *padapter, struct recv_frame *precv_frame) */ if (pmlmeinfo->state & (WIFI_FW_AUTH_STATE | WIFI_FW_ASSOC_STATE)) { if (reason == WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA) { - ignore_received_deauth = 1; + ignore_received_deauth = true; } else if (reason == WLAN_REASON_PREV_AUTH_NOT_VALID) { // TODO: 802.11r - ignore_received_deauth = 1; + ignore_received_deauth = true; } }