From patchwork Mon Oct 24 08:14:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 8212 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp317539wru; Mon, 24 Oct 2022 01:19:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM43egIxdizBDrKBwbt0ZhIXdfBtlypCS9qcwXN+Nc0GTE/8u4g1OaErcYoP6789aAFMe1+3 X-Received: by 2002:a17:907:9811:b0:79a:a1fe:8be6 with SMTP id ji17-20020a170907981100b0079aa1fe8be6mr13873998ejc.480.1666599553986; Mon, 24 Oct 2022 01:19:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666599553; cv=none; d=google.com; s=arc-20160816; b=JUYjtJ4h/4GNj01tewH9TXVoDI1Qn6vdKUAMHJkFYy0tgiUBrhYrKwLR4Rl7bDPNfE 5gQRZnKOIYbeVYDhvzBspZEPQ6T8ARzzmFlGc+fTO2E7D3lFadHEbNW8m4vg6gXxLjKP yZBhIEVZR9SEr4N4Ys5STvKUBFPzh91iAh9Tt9IAhNkvyTcRnW2HcKzBFuuZO0h0yDZH YU8n316L3vMafhJ2g/aYPA3bWk59U1MG47nZDbrv5TKAtNbrlbqcLBkrJkVo3dmsvceU x+XioIPlL+CkISIf7nabyIPxHsN8hlgVxhQK3EERxInQq6wAaiaVrrxIomBd5rQt9rnY sZQw== 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=JS9iLKAeDkiVJWxWw1cz3/8UrGOdyMEPQZrXu7NwBDw=; b=CVj8olOq5cU1DN5Np44TijDjDKuh0cAzIsa1d8Q7m4G+g+urx5407ShL5G/XYxMtPy eHoSL7cipVHbFIuHEpQhSWitab5IwW7KjSGtEx+P6LjpBw5ngdfEJ9KN2cF5+AZ96pEv V38EB+5OTFqn+czhh5rI4SyYwOpx+04MisRXF5jleuRqvnNimfS/aDok/omUh+w/sM8Z y2/MUpmrCSK61euZ4Y2Nn2r51Xbf+7o2CtD3nQd1zEy+kInBljMaYfBkdTdjSQxDu3nL ArL5M/3JIQNuD5h5TffwobKUqA0DpM9r80iexCXBVDi3+A6/JYTCtnJ3D9renQ0CUCIp RJqw== 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 b20-20020a056402351400b00461c0980a0dsi2842570edd.163.2022.10.24.01.18.50; Mon, 24 Oct 2022 01:19:13 -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 S230332AbiJXIQF (ORCPT + 99 others); Mon, 24 Oct 2022 04:16:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230266AbiJXIP0 (ORCPT ); Mon, 24 Oct 2022 04:15:26 -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 5E99F3340A for ; Mon, 24 Oct 2022 01:14:51 -0700 (PDT) Received: from ipservice-092-217-079-032.092.217.pools.vodafone-ip.de ([92.217.79.32] 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 1omsbc-0000nk-US; Mon, 24 Oct 2022 10:14:45 +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 17/17] staging: r8188eu: go2asoc is not needed Date: Mon, 24 Oct 2022 10:14:17 +0200 Message-Id: <20221024081417.66441-18-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221024081417.66441-1-martin@kaiser.cx> References: <20221024081417.66441-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?1747556293978942894?= X-GMAIL-MSGID: =?utf-8?q?1747556293978942894?= Remove the go2asoc variable in OnAuthClient and call start_clnt_assoc directly. This makes the code a tiny bit shorter. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index 77402e55f640..ffb708f242e6 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -796,7 +796,6 @@ static void OnAuthClient(struct adapter *padapter, struct recv_frame *precv_fram { unsigned int seq, len, status, offset; unsigned char *p; - unsigned int go2asoc = 0; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; u8 *pframe = precv_frame->rx_data; @@ -843,15 +842,12 @@ static void OnAuthClient(struct adapter *padapter, struct recv_frame *precv_fram return; } else { /* open system */ - go2asoc = 1; + start_clnt_assoc(padapter); } } else if (seq == 4) { if (pmlmeinfo->auth_algo == dot11AuthAlgrthm_Shared) - go2asoc = 1; + start_clnt_assoc(padapter); } - - if (go2asoc) - start_clnt_assoc(padapter); } static void UpdateBrateTbl(u8 *mbrate)